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

Re: Parse



Robert wrote:
Actually, come to think further about this -- what does
XyBasic do anyway? You write a program in Basic, and it translates the code
into XPL?
Not quite. You write an XPL program in a format that is BASIC-like. E.g.,
instead of:
>
You write:
user.response$ = inkey$
Through manipulation of the text of the source code, the "compiler" translates the latter into the former.
 Or what? Anyone who is good enough to write a compiler of that sort
would naturally come to the conclusion that working in XPL directly is far more
efficient.
The efficiency is the same, because it's not really a compiler but a
translator. It began as a shortcut way of doing pfuncs. I thought: when
writing in XPL, why not type an abbreviation and do a CI at the end to put
in the pfuncs? I chose an initial apostrophe, because it's easy for
touch-typing. So I began to code using 'bc, 'xc, etc. then did a ci
/'bc// etc. That worked so well, that I thought--why not
have long variable names, like this.is.a.variable, then CI each of those to
a unique S/G number? And why not allow for formatting--this was in the days
before we had: ;*;
Well, each improvement suggested another. It grew over a 6 week period. I
switched early on from the "compiler" being written in XPL to it being
written in CB86 (a compiled BASIC). The final product does have some
compilation--i.e., things that are more than a translation--but pretty much
it is one-to-one. At root, it's a more typist-friendly way and
debugging-friendly way of entering the same XPL code.
The "compiler" xycomp.exe is 41k. It is comprehensive, but not deep. I've
been using it happily for about 8 years.

> Then, at the end of the PM, say something like:
>> JM 2.clearsgtsQ2 ;*;

Okay, I just entered it XyBasic-style as:

reserved$ = "568-598" : 'JM "2.clearsgts" 'Q2

which translated to:
[JM] 2.clearsgts[Q2]
Hmmmm. I can modify my "compiler" add this CLEARSGS call onto the end of every program! Another win for this method.
> But why not clear all the numbers
> out, once the program is finished?

Clear all what numbers out? That command above clears out everything in range
568-598 -- that's what you said you were using, right? You don't need to clear
out the transient Save/Gets 01-99 -- they clear themselves on program
termination (that's why they're "transient"). What else is there?
Oh, I only glanced at your code, and consequently misread it. I thought you
were specifying S/G 50 and the range 568-598. So I wondered, why clear only
S/G 50 of the double-digit S/Gs? Duh. Evelyn Wood to the contrary
notwithstanding, scanning is not reading.

Thanks again.
Harry

Harry Binswanger
hb@xxxxxxxx