HP Forums
string() function reverse - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: string() function reverse (/thread-9207.html)



string() function reverse - primer - 10-01-2017 12:46 PM

Hello,
let's say I perform a STRING command to an objet (like a list, a matrix... for example).
how can I transform it to its original form ?

in other word, what is the reverse function of STRING ?

Thank you.


RE: string() function reverse - DrD - 10-01-2017 01:39 PM

Do you mean a string relationship like quote() is to eval()? (A specific example would be helpful).


RE: string() function reverse - Didier Lachieze - 10-01-2017 01:43 PM

EXPR: Parses a string into a number or expression and returns the result evaluated.

For ex:
Code:
L1:={2,4,6,8,10}
STRING(L1)           -> "{2,4,6,8,10}"
EXPR("{2,4,6,8,10}") -> {2,4,6,8,10}



RE: string() function reverse - primer - 10-01-2017 01:54 PM

(10-01-2017 01:43 PM)Didier Lachieze Wrote:  EXPR: Parses a string into a number or expression and returns the result evaluated.

For ex:
Code:
L1:={2,4,6,8,10}
STRING(L1)           -> "{2,4,6,8,10}"
EXPR("{2,4,6,8,10}") -> {2,4,6,8,10}

Yes, thank you Dider, that's exactly that.

BTW, I found that Connectivity Kit can not save/export user variables,
if you want to export your variable, you have to use built in ones (L0 to L9 for lists)
or use Notes trick, see below :
for example : Notes("myList_saved"):=STRING(mylist); -- Notes can be exported to windows with CK...
and then EXPR is needed to recover mylist:=EXPR(Notes("mylist_saved"));