Post Reply 
Create a list of undefined user vars?
01-25-2016, 04:18 PM
Post: #7
RE: Create a list of undefined user vars?
[HOME] Example: Input '5' dogs and '4' cats (quotes required by the INPUT function). I don't understand how the dogs and cats variables' content gets accessed? It's close with this format, but not quite there, yet.

Code:

EXPORT test()
BEGIN
  // !!CREATE IN CAS FIRST!! ==> L1:={'dogs', 'cats'};

  CAS.expr("INPUT("+string(L1)+")");   // Input type requires '5' and '4' (quoted numbers)   
  return eval(L1);  //  How to access contents of {dogs,cats} ==> {5,4}??

END;

-Dale-
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Create a list of undefined user vars? - DrD - 01-25-2016 04:18 PM



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