Post Reply 
How do you assign a global var in a CAS function?
11-05-2017, 11:58 PM (This post was last modified: 11-06-2017 12:14 AM by webmasterpdx.)
Post: #3
RE: How do you assign a global var in a CAS function?
Never mind! I think I got it figured....

If you do the following...

#cas
TEST(l):=
BEGIN
m:={5,4,3,2,1};
RETURN l[3]*m[2];
END
#end

m is now a global CAS variable of type list.

Also, if the program was a Home program (defined with EXPORT), then assigning m the same way (not declared as LOCAL), it would be a Home variable of type List...and global. i.e. EXPORT is only needed for global variable definition if outside a program definition.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How do you assign a global var in a CAS function? - webmasterpdx - 11-05-2017 11:58 PM



User(s) browsing this thread: 1 Guest(s)