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

Re: v3 xpl buffer [was Case change bug workaround]

** Reply to note from "..."  Fri, 21 Mar 97 19:53:15 +0000

Annie:  "Stunningly original" indeed!  Robert's insights
revolutionized v3 XPL, and illuminate vast expanses
of v4. (Incidentally, concatenations which are mind-numbing to
code in 3 are a piece of cake in 4.)

One expression that I've always wished could be manufactured by
concatenation (but can't) is the GoLabel (GL) statement.  To
take a v4 example, suppose S/G 01 can have three possible
values: "red", "blue" and "green"; you want execution to branch
to a different LaBel depending on the content of 01.  How
convenient if this were just a matter of

[LBred][PRHow embarrassing!][EX]
[LBblue][PRHow depressing!][EX]
[LBgreen][PRHow charming!][EX]

But GoLabel can't see beyond its own subroutine.  If [IS01]
initially has the value "blue" (so that the concatenation
produces "[GLblue]"), PV'ing 01 produces Error 145 ("Go to
Label command requires a Label command").  There's no [LBblue]
within S/G 01 and, as far as GL is concerned, that's that; the
subroutine crashes.  To make matters worse, the main routine
forges ahead to LaBel "red", unaware of the attempted
branch to "blue".  Bummer.

You could get satisfaction in some cases by folding the LaBels
and associated code into the concatenation:

[SX01,"[GL"+[IS01]+"][LBred][PRHow embarrassing!][EX]
[LBblue][PRHow depressing!][EX]
[LBgreen][PRHow charming!][EX]"][PV01];*;

That's OK as long as [PV01] is the end of the routine, or the
program calls for all three branches to reunite at a single
point in the main routine.  But have the LaBels branch off in
three different directions and rejoin the main routine at
different points?  No can do.  You're relegated to a
prolilx series of IF's ... EndIf's.

Ideal would be if GL worked like the PRompt statement, so that
"[GL@01]" branched to the LaBel named by S/G 01.  That's one
for the wish list.


Carl Distefano  * * * CLDistefano@xxxxxxxxxxxxxxxx