Post Reply 
Create a list of undefined user vars?
01-25-2016, 05:45 PM (This post was last modified: 01-25-2016 05:46 PM by toml_12953.)
Post: #8
RE: Create a list of undefined user vars?
(01-25-2016 04:18 PM)DrD Wrote:  [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-

I can't get it to work at all. My line looks like this:

CAS.expr("INPUT("+string(L1)+")");

and I get a syntax error with the cursor between the first open parenthesis and the quote mark.

Tom L

Tom L
Cui bono?
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? - toml_12953 - 01-25-2016 05:45 PM



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