Post Reply 
No way to get an element free of brackets
02-13-2021, 09:58 AM
Post: #1
No way to get an element free of brackets
Using SUB to extract an element from a list just render the element still being
enclosed in list brackets. Seems being no command to get the element free of
the brackets. Using "Get" does not work either. This lack of command makes it
impossible to store a list of values in variables contained in a list. For example:
Doing a "For loop" on 2 lists containing values and the variables to store the values in, cannot be done.

lst1:={1,2,3}, lst2:={'myv1', 'myv2', 'myv3'};

For i1 FROM 1 TO si DO
lst2(i1):=lst1(i1);
END;

Any rounds in this loop will just produce {1}:={'myv1'}, {2}:={'myv2'}, ...
and so on. You cannot get off the brackets.

This is a serious drawback, and render programming with the Prime an impossible
task.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
No way to get an element free of brackets - essen - 02-13-2021 09:58 AM



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