Post Reply 
Create a list of undefined user vars?
01-25-2016, 07:49 AM
Post: #2
RE: Create a list of undefined user vars?
Hello,

Yes, you can create a list of undefined variables, to do so, you need to use the CAS (which can do it), and transform the CAS result in a home result.
For example L1:=CAS("{a, b, c, d}") will work.

Now, the question about the INPUT(L1) not working is a different one.
INPUT(A), as you know asks you to input a value for the variable A.
therefore INPUT(L1) should ask you a value for variable L1, not for the variables contained in the list stored in L1.
It's a case of 'you can not have the butter and the money from the butter'...

The first parameter of INPUT is one of these special cases where the parameter is NOT evaluated by the function.

So, how do you deal with the situation?
Well, one way is to generate an INPUT call with the CONTENT of L1 as a parameter. exrp("INPUT("+string(L1)+")"); will do that.
It creates a string that contains the command and then executes it!

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
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? - cyrille de brébisson - 01-25-2016 07:49 AM



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