[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Xy stuff
- Subject: Re: Xy stuff
- From: Robert Holmgren holmgren@xxxxxxxx
- Date: Tue, 7 Jan 1997 22:37:52 EST
** Reply to note from Harry Binswanger Tue, 7 Jan 1997 01:47:47 -0500 (EST)
> Hi Robert. You didn't deign to answer my question about your code...
> What is the CU XPL command you used:
>> GT +1>.{Tab}
>> +">>">
>> Huh??? What is "CUA"? It seems to refer to at the end, but CU is
>> not documented. No fair! What is the meaning of --what do
>> the quotes do?
> How 'bout it? Stocked up with noblesse oblige?
> Regards,
> Harry
Alright already. I didn't answer because I figured you hadn't really
_tried_ to dope it out. The solution is staring at you.
Let's examine it. What does this routine replace? A loop in your code,
right? Which you executed 255 times. Now we don't loop anymore, so
we must've replaced the loop with something on the order of "DO WHILE" --
right? Look at the form of the command: . It says "02" instead
of "2", so clearly we're referencing a Save/Get instead of a real number.
What's the content of S/G 02? "255". So, therefore, we infer:
DO something UNTIL a value equals 255, or DO something 255 times (in fact,
it's the latter). Now we look at CUA. Curious: there's a after the
, whereas there's no in the code! Ergo LaBel A marks the "End"
of the DO block. Since the DO block clearly generates a single Error
Message, and yet the program, when you execute it, prints out 255 Error
Messages, you can reach obvious conclusions.
This thing isn't documented, but there are several examples of it in .DLG.
CU = CountUp
Macro command: CU label,n
where "label" demarcates the end of a block of
executable code (the block begins with the CU command)
and alphanumeric "n" names a Save/Get
that contains a positive integer value
representing the number of times the code
block is executed
-----------------
As for:
+">>">
this is just a standard concatenation. The quotes allow string literals to
be concatenated. If, for example, the content of IS01 were "254", S/G 03
would contain the dumb string literal:
>
But when we subsequently Put S/G 03 with , we transform a dumb string
literal into the living breathing thing -- in other words, S/G 04 comes
into life and contains Error Message #254 (something about "Making a
temporary file"). All that remains is to write the content of S/G 04 into
the text window, with . Finis. Try it out for yourself.
-----------------
-----------
Robert Holmgren
holmgren@xxxxxxxx
-----------