[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Question on VA@ parsing

Reply to note from Harry Binswanger  Sat, 17 Apr 2004
14:20:15 -0400

> But just plugging in the variable doesn't seem to work. I
> tried:
> >>
> where 01 is the loop's index counter.

Nice try, Harry, but, as you saw, you can't just plunk in a variable
after the separator. A (literal) number is required. To get a number
into that position, and to increment it on each pass through a loop,
you need to manufacture the VA@ statement by concatenation and use the
PV operator to evaluate the concatenation each time. Like this


Here's the same in real XPL. To run it, issue DECODE, DeFine
the resulting block of code and issue RUNCODE:

b-gin [UNTITLED]
0{>}{<}PR(Hit a key to continue...) 02=@02{>}{<}SX02,{<}RK{>}

Of course, you could reach the same result with a more conventional
XS parse.

Carl Distefano