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

Re: Xy III & Faulty Memory?



Lots of good advice, Robert, on managing s/g's--recycling
etc. It's worth noting that ldpms also are permanent
memory-resident, like >99 s/g's to be used as a last resort.
@s/g's too occupy permanent memory, but xyW provides some
valuable tools to manage them--ldsgt/stsgt, clrsgt, and
remove commands--that deserve attention when programming
long.

≪ Use backward, not forward, references--that's a no-no
with interpreted languages--in other words, if you write
, it should refer to a LaBel A  which _precedes_
 in the code. ≫

Could you let us know where you read that? After I got an
XT clone I immersed myself in GW-BASIC for a while, more
recently have read quite a bit on programming PostScript,
and never came across that admonition in any book on either
language. I'd like to read more about it--although I believe
that to call xpl (like them) an interpreted language rather
inflates the case. However one tries to impose the structure
it resists, xpl more properly falls into the category
of script language.

Whatever, xpl loops often take an {lbA} ... If not error {glA}
form naturally, but it seems to me that trying to follow
that advice in other situations would result in unnecessarily
contorted and long code. Novice programmers (and presumably
Brian isn't since he mentioned that his pgm is 35k, I believe
--for publishing production, not unusual) learn quickly not
to write klutz code like:
	{if{er}}{glA}
	{ei}No-error code{glB}
	{lbA}Error code{lbB}Continue ...
But in the case of your preferred example--
	{sx01,0}{if{er}}Error code{sx01,1}
	{ei}{if{pv01}<1}No error code{ei}Continue ...
--the No error code would have to be *really* long
to justify not using the more economical:
	{if{er}}Error code{glA}
	{ei}No error code{lbA}Continue ...
Establishing an {isNN} flag and changing it
if error is often useful for later reference, e.g.,
where {is01} was established in an earlier test:
	{if{er}&{pv01}>0}Error code{glA}
	{ei}{if{pv01}>0}Error-irrelevant code{lbA}Continue ...
But taking those extra steps in a simple situation
just to avoid a forward jump to a label seems
counterproductive as well as counterintuitive. ... Ciao. 	--a

======================================= adpFisher  nyc
http://www.escape.com/%7Eyesss/_xypro.html ===========================