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

Re: Parse



** Reply to message from Harry Binswanger  on Fri, 24 Jan 2003
16:54:40 -0500


>> I'll bet its full of gratuitous verbosity.

> By your standards, sure.

What I mean is, that 7K is just huge. It's hard to imagine any program getting
that big. You will probably have problems, at that size.

> I take it that the idea is to find S/Gs used only once,
> and if there are say 7 of those, re-use the same S/G 7 times.

Exactly -- as long as looping back isn't going to wipe an important value out.
IFEI (IfEndIf program in U2) has an option in it to display a structured
listing of the program, which is incredibly handy when you start to get
confused. Just put your program in a window by itself (one program only),
command IFEI, then (after it tests for balanced conditionals) hit "Y"
to see the structured listing. You'll see... it's neat.

What I fail to understand is how you can write a Basic compiler for XyWrite
programs with, well, how to say it? these err ahh fundamental lacunae in your
own grasp of XPL? A compiler requires 101% understanding of every instruction,
both Basic *and* XPL! Plus I fail to see the "why" of it! XyWrite already has
its own language, which is pithy and apropos. You can't execute Basic within
XyWrite -- so... 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? 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.

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

> Will do, sounds like a clean way to go.

It's not just clean, it's essential to the life of your session. Otherwise you
leave a lot of dead wood lying around, eating and cluttering memory. Recipe
for OOM problems downstream (OutOfMemory).

> 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? If you
mean, clear them *manually*, after the program terminates, that's nuts -- let
the program do it, that's what "programs" are for.

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------