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

Re: Question about "array" variables in XPL



Reply to note from wbass@xxxxxxxxxxxx Sat, 20 Jul 2024 20:05:45 +0000 (UTC)

Wally,

> the EOF in the S/G serves the same function as the 'NO' function
> does, when you add it to the end -- it ups the relevant length
> count.

I'm not sure I fully understand your explanation, but maybe the following examples will help
clarify. Consider the two snippets below. Both are meant to do the same thing: put the string
"xx" at the bottom of the current file ("BF " stands for the 3-byte function
BF). For present purposes, the salient difference is that in snippet (1), subroutine 01 ends in
"x", while in (2) it ends in ">" (right guillemet).

(1)
<SV01,BF xx><PV01><EX>

(2)
<SV01,BF <SV02,xx><GT02>><PV01><EX>

I'm running XyWrite v3.58B. If I save (1) to a file and run it against itself, it puts
"xx" at the bottom of the file, as expected. If I do the same with (2), it puts the string
literal "<GT02>". As I understand your explanation, the "countdown" of the
length of sub 01 in (1) should stop short of the closing guillemet (or short of the final
"x"?), with the result that the string literal "BF xx" (or is it "BF
x"??) should be written to the screen. But in fact that doesn't happen; the code in 01 is
*executed*, and the result is as expected. In (2) I would have expected the string literal "BF
<SV02,xx><GT02>" to be written, but in fact it puts only "<GT02>".

On the theory that the bug might be in the procedure for detecting a balanced set of *nested*
guillemets, I tried this:

(3)
<SV01,BF <SV02,x><GT02>x><PV01><EX>

But (3) behaves the same as (1).

What am I missing?

-- 
Carl Distefano
cld@xxxxxxxxxx