[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: XPL questions
- Subject: Re: XPL questions
- From: "Robert Holmgren" holmgren@xxxxxxxx
- Date: Sun, 12 Mar 2006 20:11:19 -0500
** Reply to message from "Patricia M. Godfrey" on Sun, 12
Mar 2006 16:05:22 -0500
> Yes, but didn't you say in PARSEFRM.DOC that there was a way to make a
> program runnable either standalone (with RUN myprog.pm XC from the
> Commandline) or as a U2 frame
I didn't say it, because it's obvious that to convert a standalone program into
a U2 frame, compliant with the rules of U2, you have to feed arguments to S/G
50. Suppose you are developing a program as a standalone, and it accepts
arguments. The *first* thing in the code should be > -- grab the
arguments off the CMline, while S/G 00 is still valid. When at length you
convert the standalone to a U2 frame, the only thing you have to do is change
that single statement to >. And Done.
Note well that your new frame can now be called as child by any other frame,
simply by putting the arguments into S/G 50 in the *parent*, and then calling
the frame:
...JM 2.mynewframeQ2 ...
> The Helpkey's definition in xy4.kbd is
> NOXHJM(,2,.,P,r,s,C,M,l,i,n,e,). Sorry. Sometimes
> the most obvious
things are the things one misses. So if one is calling
> a frame with the HelpKey, one doesn't need to include
> JM 2.PrsCMlineQ2 in the actual frame, correct?
I would describe what is happening more precisely. When you hit your
, you are NEVER calling "a frame" or your true target frame; instead
you are ALWAYS calling U2 frame PRSCMLINE, only. PRSCMLINE, in its turn,
*reads* the entirety of your current command line and interprets it, i.e.
breaks it down into its framename + argument components. PRSCMLINE then
launches the framename that it found on your command line, after having placed
any arguments that you might also have supplied in Save/Get 50.
Re: Mr. regnawsniB (how does he pronounce yrraH?):
>>>JM 2.childframeQ2 . See that? SUb 01
>puts the CMline (the *entire* CMline) into S/G 50, then childframe
>operates on it.
> Is there some reason why the first part is a subroutine?
> Does it have to be, or would this be as good:
>JM 2.childframeQ2
It doesn't HAVE to be, but you should understand the difference, which is night
and day. If you do >, then you put the current content of S/G 00,
whatever it is, in S/G 50. The current content of S/G 00 may not be what you
think it is, or what you started out with; and it may have nothing to do with
the command line. The SUbroutine does something COMPLETELY different, and
really unrelated: It reads the *current* CMline in its entirety, from start to
finish. Current, mind you! Whatever is there NOW is what gets read, so you
gotta know what's there -- have you disturbed the CMline since you started?
altered it? wiped it? That is entirely unrelated to, say, the value of 00
when you RUN a standalone program, where 00 simply holds any arguments, but NOT
the RUN command or programname! With the SUb, you get the whole line.
-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------