[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
XPL question
- Subject: XPL question
- From: wbass@xxxxxxxx
- Date: Thu, 15 Jan 2009 10:29:10 -0700 (MST)
probabably for Carl or Bob
consider the following simple XPL program
'BC
~~>
~~>
~>0~>in_1st_if___
~>0~>
in_2nd_if___
~
past_1st_ei_
~
past_2nd_ei_
~
~Z
When you execute it, you enter 0 or 1 twice, to control how the IF
statements will evaluate, and the program then runs to completion, to tell
you where it's been.
This is my understanding. Please correct me if I'm wrong.
Now, in XyWrite III+, nested IFs are ostensibly "not allowed," but they
"work" in the sense that the above program "works," and in the sense that
both IFs must be true to get to the "in 2nd if" blurb. Not only that, they
are useful, because the 2nd IF can contain a clause that is not always
evaluatable (undefined S/G, for example) so long as it is evaluatable if
the first if is true. However, in XyWrite III+, the 1st EI effectively
"terminates" all open IFs. That is, the "past 1st ei" blurb is emitted
regardless of choice of inputs, and the 2nd EI is meaningless.
In XyWrite IV, nesting of IFs is allowed, so I presume I wouldn't get the
"past 1st ei" emit if the first IF evaluates false.
So, several questions:
1. Do I have this right?
2. This seems to represents an "incompatability," where a "working"
(although a not-by-the-book) XY III XPL program behaves differently under
XyWrite IV (despite Harry's constant claim of 99.99% backwards
compatability). Does that seem to be correct to you.
3. Have you seen a significant use of nested IFs, with a single trailing
EI, in practice under XyWrite III+?
TIA
Wally Bass
PS: I'm nearing a new release of the XYENC package. It will probably be
today or tomorrow.