Post Reply 
No way to get an element free of brackets
02-24-2021, 10:11 AM
Post: #11
RE: No way to get an element free of brackets
(02-21-2021 05:27 AM)Han Wrote:  
(02-17-2021 06:26 PM)essen Wrote:  ----------------------

My gold was to store numerical values enclosed in list by variables enclosed in list.
Especially when the variables are unknown in memory ahead. Until now I thought it impossible to do this without declaring each variable ahead in the program. Now possible doing what I want, my gold has been fulfilled. There's a lot of Input in solving cad. And would be very time consuming storing every single input the way you show this time. Still nothing compares to William Wickes
RPL HP48GX, HP50 programming tool in this sort of work. And it's a sad behavior excluding this programming tool from the Prime. With the faster running of Prime, it should be there. The only thing that could be better was the lack of symbolic in vector and matrix calculations. Fortunately, these calculations could be done in lists.

essen

I think you may want to read up a bit more on indirection. For example, when you have the following lists (in the CAS view, as it is much more complex in Home view):
Code:
list1:={1.2,2.3,3.4};
list2:={var1, var2, var3};
And you wish to programmatically do something like var1:=1.2; it is not simply a matter of typing
Code:
list2(1):=list1(1);
Consider the statement above from the point of view of someone trying to parse what you wrote. Do you intend replace the first element of list2? Or, knowing a priori that list2 contains a list of variables, should list2(1) be evaluated first to obtain the variable 'var1' and then this variable be used? In other words, should evaluation occur before storing, or should the left hand side be parsed as is? And how is a reader -- or the HP Prime in this case -- supposed to know your intent?

To get around this, you need to use indirect access and use the EXPR() command or the CAS equivalent: CAS().

For Han and Albert.:

Sorry, my bad !

Well; I looked it up in a dictionary as not knowing the word, and
could not afterwards se any other meaning as used in Alberts text.

In my dictionary it stands like this:

indirection [indi'recSen] sb uaerlighed, svigfuldhed, kneb, fif.
These four words stands for;
dishonesty, deceitfulness, trick, dodge.

This created a meaning - a wrong one - unfortunately.
This dictionary are dated 1977. Could be the reason. Or this english
word just means other in us.

My excuse doesn't mean that I' m fishing for yours and Alberts
forgiveness. I am not. It just means I want to be honest telling how
this happend. I am not yet staying here.

By the way - concerning the answer to my Prime enquiry;
This is all there are too it: {48}[1]
Doing this in the command line places 48 on the stack without brackets.
Coming from HP48, this simple instruction was not just apparent to me.
Old fars on this forum could be expected to know it and posted this answer.

I tried to delete my account, as earlier said, I' m out from here. I am ready
to start translating HP48 programs to Prime. Already done a few ones

Kind regards
essen
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: No way to get an element free of brackets - essen - 02-24-2021 10:11 AM



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