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

Re: U2 fram PrsExe50



Reply to note from Harry Binswanger  Mon, 15 Sep 2008
23:45:11 -0400

Harry:

Your explication of the logic is basically correct.

> If I'm assigning the ENTER key to this frame, I still have to
> wrap your whole routine in a test for VA$TX = 0, and put out
>  if it isn't 0, right?

Right. As per frame EnterXCorU2, which I posted earlier and have sent
to you privately as an attachment.

> how does one understand what this, for example, *means*?
>
> 

It's no different from >, where S/G 02 contains
the string literal "BX dirQ2 " ; in other words, it's the equivalent
of >. In Xy4 and later, you can use a
string directly (by enclosing it in double quotes) without first
saving it to a Save/Get.

Of course, in your example, there's no reason to say
, because no part of the saved string requires
evaluation. You can say, simply,  or
. Compare the following statement from frame XCorU2;
it uses concatenation, or chaining ("+"), to fold the current VAlues
of Error Beep (S/G 01) and WAit time (S/G 02) into a string which,
when executed later, restores those VAlues:

>>+",wa="
++"Q2 ">

Stare at it awhile and you'll see what it's doing. If the current
value of Error Beep is (e.g.) 5000,20000, and WAit time is set to 6,
the manufactured statement is "BX es 1Q2 BX d eb=5000,20000,wa=6Q2 ",
which is saved as a string to S/G 01. When the contents of S/G 01 are
executed later in the routine, with , the saved EB and WAit
VAlues are restored.

If you want to know more, read Robert's CTRLCHAR.TXT -- specifically
the section entitled "Concatenation". The discussion and examples are
geared to Xy3 (the treatise is almost 19 years old!), but apply
equally to Xy4.

--
Carl Distefano
cld@xxxxxxxx