home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!NUSVM.BITNET!CCENGNM
- Message-ID: <CCENGNM.920814.130948.C0@NUSVM.BITNET>
- Newsgroups: comp.lang.rexx
- Date: Fri, 14 Aug 1992 01:21:29 -0400
- Sender: REXX Programming discussion list <REXXLIST@UGA.BITNET>
- From: Anthony Ng <CCENGNM@NUSVM.BITNET>
- Subject: Re: Stem vars as arguments?
- In-Reply-To: JAY@WVNVM.WVNET.EDU message of Thu, 13 Aug 1992 16:54:02 EDT
- Lines: 50
-
- >From: James Justice <JAY@WVNVM.WVNET.EDU>
- >Subject: Re: Stem vars as arguments?
- >
- >REXX does allow a stem to be EXPOSED.
- >
- >---Cut and Paste ---
- >/**/
- >t.1 = '1'
- >t.2 = '2'
- >t.3 = '3'
- >Call tryit
- >
- >Exit
-
- >tryit: Procedure EXPOSE t.
- >Say t.1 t.2 t.3
- >Return
- >
- >This works with "1 2 3" being printed out!
-
- Also, the procedure can alter the stem content:
-
- op.0=3; op.1='a'; op.2='b'; op.3='c'
- call try1
- call try2
- say op.0 op.1 op.2 op.3 op.4
- exit
-
- try1: procedure expose op.
- say op.0 op.1 op.2 op.3
- op.0=4; op.2='e'; op.4='d'
- return
-
- try2: procedure expose op.
- say op.0 op.1 op.2 op.3 op.4
- op.0=2; op.1='x'; op.2='y'
- return
-
- should gives you:
- 3 a b c
- 4 a e c d
- 2 x y c d
-
- ---------
- *****************************************************************
- * Anthony Ng * "Don't Look Back !" *
- * Systems Programmer * Luke 9:62 *
- * NATIONAL UNIVERSITY OF SINGAPORE * "Batteries NOT included, *
- * Bitnet : CCENGNM@NUSVM * neither any guarantte." *
- *****************************************************************
-