NewBie's Corner Session 21 Parameters Part II
Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.
Parameters
In the previous session we saw how to call RtnB from RtnA with Parameters.
We also defined Parameters as another name for Variables when used in passing data from one Routine to another, or, from one Label to another.
Calling a routine from a Label, or to a Label, from within a routine is very similar to calling a routine itself.
To call a Label in the current routine would look like:
Do MyLabel(Parm1, Parm2, Parm3) ; Actual Call List
The code in the called Label would look like:
MyLabel(Parm1, Parm2, Parm3) ; Formal Call List
Note: MyLabel would start in column 1.
Now, if the label exists in another routine, it would look like:
RtnA
. . . .
. . . .
Do MyLabel^RtnB(Parm1, Parm2, Parm3) ; Actual Call List
. . . .
. . . .
Quit
The code in RtnB would look like:
RtnB
. . . .
. . . .
MyLabel(Parm1, Parm2, Parm3) ; Formal Call List
. . . .
. . . .
Quit
More on parameters in the next session.
--Mike Kadow
If you have a comment, please respond through the InterSystems Developer Community, don't send me private email, unless of course you wish to address me only.
See "Newbie's Corner Index" for an index of all NewBies' Posts