[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Parse
- Subject: Re: Parse
- From: cld@xxxxxxxx (Carl Distefano)
- Date: Wed, 22 Jan 2003 22:03:27 -0500
Reply to note from Harry Binswanger Wed, 22 Jan
2003 17:42:13 -0500
Harry:
> Could you say a little more about error conditions in parsing
It's straight-forward. Take . If 01 contains any
case variant of 02, then 03 and 05 *will* have content (which may be
the null string, depending on the position of 02 in 01).
If 01 does not contain 02, any pre-existing contents of Save/Gets 03
and 05 remain unchanged (if they were uninitialized, they remain
so), and the null string is assigned to Save/Get 04 (i.e.,
==0).
> Any other strange error conditions?
Not that I can think of. The main thing is, you've got to set up
your own conditions for going in, and getting out of, the parse.
For example, if there's any doubt whatsoever whether 01 will have
content going into the parse, test for before doing XS.
Likewise, if there's any doubt whether 01 contains 02, test for
@upr(){238}@upr() or @upr(){240}@upr().
(You need @UPR because, remember, XS is case-INsensitive.) If
you're executing a loop, set a "do while" condition, i.e., "while 01
has length greater than 0":
> 0>......
> E.g., is it kosher to use the same s/g twice as in:
> or ?
No, you canNOT reuse 01 -- absolutely verboten! XS *will* crash
(and, eventually, so will Xy).
But you can reuse 02! All of the following are legal:
, , ,
, , even .
Moreover, you can omit the Save/Get in position 3 or 4 (but not
both): or . The value for that
position will be assigned to Save/Get 00.
I hope this helps.
--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/