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

Re: XPL questions



Reply to note from "Patricia M. Godfrey"  Sun,
12 Mar 2006 16:54:20 -0500

Patricia:

> But if the HELPKey is what stuffs the argument
> into S/G 50, wouldn't one need some other method when running
> it as a stand-alone program?

Yes, of course. The usual method. Grab the argument from S/G 00,
thus: >.


Perhaps a template will help:

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}SX50,{<}IS00{>}{>}{<}GLa{>}[cr|lf][cr|lf]{{;5test}} [cr|lf
]{002}{<}LBa{>}{<}PR@50{>}{<}EX{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

DECODE it, and save the decoded result as TEST.PM. Also, DeFine the
U2 frame (starting with the double braces, down to the 
following the second Ascii-2) and add it to U2 with ADD2U2.
To demo it, issue RUN TEST.PM Hello, then TEST Hello.
In both cases, the argument is echoed to the PRompt line ().

A couple of things to note: The GoLabel-LaBel pair redirects the
program flow to avoid "executing" the braces, the framename, and the
initial Ascii-2 when the routine is launched with RUN. Similarly,
the final  avoids "executing" the closing Ascii-2. (In a U2-
only routine, the final  can be omitted; the closing Ascii-2
signals the end of the program.)

--
Carl Distefano
cld@xxxxxxxx