| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Passing Arrays |
Is there any way I can pass an array from one REXX program to an external
REXX function, and return an array to the calling program? I can do it
relatively easily if the function is internal to the main program file.
Also, is there a way to either (1) force selected variables in an included
function as private without using the PROCEDURE statement, or (2) use
something like a PROCEDURE EXPOSE statement to expose an array name passed
as an arguement to the function? An example would be something like this:
/* REXX Main */
array_var.0 = 0
call test_fcn 'array_var'
say 'Returned array value 3 is "'array_var.3'"'
exit 0
test_fcn:
parse arg array_root junk
interpret 'procedure expose' array_root'.'
interpret array_root'.3 = "Third element of array."'
return 0
As I read it, the PROCEDURE statement (or INTERPRET 'PROCEDURE EXPOSE'
array_root) must procede the ARG (or PARSE ARG) statement, which makes the
example test_fcn procedure fail. I get the feeling that I'm missing
something simple here. Any suggestions?
Many thanks...
Bob
[bswift{at}connect.ab.ca]
--- GoldED/2 2.50+
* Origin: The Power Station * (403) 963-1859 * (FidoNet 1:342/5)SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407 SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1 @PATH: 342/5016 61 3615/50 396/1 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.