Topic: Re: Predefined string values and text registers (1 of 2), Read 34 times
Conf: VEDIT Macro Language Support
From: Christian Ziemski
Date: Saturday, August 17, 2002 01:25 PM

>I tried to save string values like BOL_Pos in text registers in order
>to use them in "Goto_pos" commands as shown in the following fragment.
>
>However, i get a "bad parameter" message. What's wrong here?

You are using the string "BOP_Pos", not the function BOP_Pos here!

BOL_Pos etc. are _numerical_ values.
So it should be easier to store them in numeric registers:

#80 = BOP_Pos
// ...
// ...
Goto_Pos(#80)



Christian

 


Topic: Re: Predefined string values and text registers (2 of 2), Read 35 times
Conf: VEDIT Macro Language Support
From: Fritz Heberlein
Date: Sunday, August 18, 2002 11:11 AM

> You are using the string "BOP_Pos", not the function BOP_Pos here!

Thanks, Christian, for the clarification. In the meantime, Ted had pointed me in the same direction. Now, i have rewritten the core part of the macro as cited below. Clumsy, he? May be, but works well.
The new BOP_Pos etc. commands are of great help!

Fritz
----------------------------------------------------------

repeat(all){
s("|@(5)",errbreak) //search for first string

if(#5==1){#80=BOP_Pos //determine block margins
#81=EOP_Pos}
if(#5==2){#80=BOL_Pos
#81=EOL_Pos}

Goto_Pos(#80)
if(sb("|@(6)",#80,#81,noerr)==1) // search for 2nd string within block
{v() // if any, show it and
Gotopos(#81)} // resume at EOL_POS / EOP_Pos.
else{Gotopos(#81)} // else go to EOP-pos
}