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

Re: AS Command?



** Reply to note from  05/06/96 12:45pm

> AS stands for "Argument Insert" (or "Argument String") and takes the string
> passed in from the RUN command and saves it to macro 00. See page 204 of the
> Customization Guide for Xy4 for more details. -- K.

This information is not accurate. Page 204 is also incorrect and imprecise.
 dates from the earliest days of XPL. It was duplicated & superseded by the concept
of S/G 00. (Interestingly, the concept of "extended
Save/Gets" with double/triple/quadruple digits grew out of S/G 00, which, for several
undocumented years, was the lone extended Save/Get.)

 does NOT save CMline arguments to S/G 00. CMline args are saved as string literals
to S/G 00 automatically, whether you command  or not.

 does NOT retain the original arguments passed with the RUN command (what
Ken calls "the string"). If the value of S/G 00 changes during the course of a PM, e.g.
by foolishly commanding  or by re-evaluating the
CMline with >>, then  will reflect those altered values of S/G
00.

The _only_ thing that  does (to my knowledge) is to insert the current content of S/G
00 at the current cursor position (either in text or on the
CMline). This is functionally identical to command .

There used to be a general understanding that  worked only with free-standing file-
based PMs which were RUN. In fact,  works with any
PM in any form, including Help files (U2, DLG, whatever).

The statement in Example #2 on p.204 (==>) is sheer baloney.
First of all, you can't compare  to a numeric value. Second, even in form
==>, the statement is illegal (cf. ==>), because  (like
) is not intended for _evaluation_ (e.g. comparison).  only *acts*, and slaps
the value of S/G 00 onto the screen.

The only proper command syntax is . Something like  appears to "work", in
much the same way that a CMline command such as "pv Bill" will generate the statement
 in text; but both are errors, and
XyWrite will trap and report them without executing the subject PM.

 is an anachronism, retained only for backward compatibility.

-----------
Robert Holmgren
-----------