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

XyBasic and XyENC



After spending a couple of hours looking into making an inverse of XyBasic,
I see that it would take much more time than I can in good conscience
invest. It's become very clear to me that encoding to ASCII and back is a
quite different thing from creating a user-friendly "front end" for
composing XyWrite programs.
Since I never intended XyBasic to serve as an encode/decode facility, and
since Wally's new programs do that superbly, I'm bowing out on that.
Wally pointed out the inadequacies of XyBasic's MID$, LEFT$, and RIGHT$
functions. The solution is to call U2's LRCS frame within XyBasic source:

DEFSTR U2$ = 50   <=== U2 requires S/G 50 be used for input and output
U2$ = "Hello,3"
'JM "2. LEFT" 'Q2
'BC PRINT U2$    <=== Display the result, "Hel", on the command line.

or, equivalently, using the XPL guillemets:

""  <==== XPL enclosed within quotes works as XPL in XyBasic
'JM "2.LEFT" 'Q2
'BC PRINT ""
The same usage applies for the U2 frames: RIGHT, CENTER, and SUBSTR. (SUBSTR is the U2 equivalent of MID$, and it needs three arguments in S/G 50; see HELP SUBSTR.)
These U2 functions have several nice options--e.g., parse either by byte or
by displayed character.




Harry Binswanger
hb@xxxxxxxx