How can you get all CAS variable names in a list?
|
01-13-2022, 09:01 PM
Post: #1
|
|||
|
|||
How can you get all CAS variable names in a list?
In xcas, you can get a list of names for all defined CAS variables using the VARS function. How would you do such a thing with the HP Prime?
If there's no way to do such a thing, how would I file a feature request for it? This function is really quite important for more advanced programs and should be extremely easy to toss in. Practically all of the necessary code already exists, as they provide the CAS variable list in the "Mem" screen. For reference for those unfamiliar, here is a link to the xcas documentation: http://www-fourier.ujf-grenoble.fr/~pari...sec%3AVARS In order to work on the Prime, the function might need a minor modification such that it returns the names as strings in the list. For instance, rather than {x,y,f,k}, it would return {"x","y","f","k"}. I also noticed that the VARS function itself was removed for the Prime. Does anyone know why? |
|||
01-14-2022, 05:45 AM
Post: #2
|
|||
|
|||
RE: How can you get all CAS variable names in a list?
As you can guess, it was not me. The code exists, but VARS was removed from the keywords list recognized by the parser.
|
|||
01-14-2022, 09:40 AM
Post: #3
|
|||
|
|||
RE: How can you get all CAS variable names in a list?
(01-14-2022 05:45 AM)parisse Wrote: As you can guess, it was not me. The code exists, but VARS was removed from the keywords list recognized by the parser. Interesting. Thank you for the response. By the sound of it, it seems unlikely that the feature would be added back in, then. I'm struggling to understand why it was removed at all. The lack of this one feature is presently the only thing preventing me from implementing a CAS serialization workaround. All it would take is a list of names of the variables. From those, you just need to wrap it all up with [name]+":="+CAS.eval([name]), put those strings in a list on Home view, and save the Home view. To load, you just go through the list with CAS(eval([list entry])) commands to reconstruct the CAS variables. It's not quite as complete as the full stack restoration you get with Home view, but it's better than nothing. |
|||
01-14-2022, 10:05 AM
Post: #4
|
|||
|
|||
RE: How can you get all CAS variable names in a list?
(01-14-2022 09:40 AM)IHarwell Wrote: ...Hi, please post your request to the new responsible for the HP calculators, Klaas Kuperus from Moravia, see https://www.hpmuseum.org/forum/thread-17...#pid153940 e.g. by PM, and please repost the answers and maybe corrections here. Thank you! |
|||
06-08-2024, 05:41 AM
Post: #5
|
|||
|
|||
RE: How can you get all CAS variable names in a list?
Has anyone discovered a method to access a list of CAS variables on the Prime?
- neek |
|||
06-08-2024, 07:31 AM
Post: #6
|
|||
|
|||
RE: How can you get all CAS variable names in a list?
Shift – Mem ("B" key)
CAS Vars Enter |
|||
06-08-2024, 02:04 PM
(This post was last modified: 06-08-2024 05:16 PM by ftneek.)
Post: #7
|
|||
|
|||
RE: How can you get all CAS variable names in a list?
Thanks, but I should have been a little more specific. I’m looking for a way to access a list of CAS variables and do some manipulation on the list/variables from a program, like how HVars returns a list of home variables.
- neek |
|||
06-08-2024, 04:44 PM
Post: #8
|
|||
|
|||
RE: How can you get all CAS variable names in a list?
I made a change so that the VARS command become visible.
|
|||
06-08-2024, 05:21 PM
Post: #9
|
|||
|
|||
RE: How can you get all CAS variable names in a list?
Thank you, now just have to wait for the update to be available
- neek |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)