how to remove string?
|
05-31-2018, 06:44 PM
Post: #1
|
|||
|
|||
how to remove string?
hello boys,
how could i remove the string example: "hp_prime" >>>> hp_prime |
|||
06-01-2018, 04:56 AM
Post: #2
|
|||
|
|||
RE: how to remove string?
Hello,
When you see "hp_prime", it means that you have a string object that contains the text hp_prime. The double quote is not part of the string... it is an indicator... So you can not "remove" it... If what you want to do is display the content of the string on the screen, depending on what you want to do exactly, you could use the textout_p or print functions... If you want to convert that string into another object (for example, if your string contains the name of a variable and that you want to get the content of this variable), you could use expr... Please tell us more... 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. |
|||
06-01-2018, 06:48 AM
Post: #3
|
|||
|
|||
RE: how to remove string?
I CAN NOT MODIFY THE USER VARIABLES
[img]https://ibb.co/dFjTNd https://ibb.co/jPLPvy https://ibb.co/jfMWay https://ibb.co/gMhtoJ https://ibb.co/jSRa2d https://ibb.co/n2W8Nd[/img] |
|||
06-01-2018, 04:55 PM
Post: #4
|
|||
|
|||
RE: how to remove string?
CREATE USER VARIABLES
MY PROGRAM: edit the objects in the lists DAT1; DAT2; EXPORT PREGUNTA(Y,D) BEGIN PRINT; DAT1:=EXPR("YEAR_"+Y+"_DAY_"+D); // LIST DAT2:=EVAL("'YEAR_"+Y+"_DAY_"+D+"'"); // NAME LIST PRINT(DAT2)+PRINT(DAT1); wait(3); EDITLIST(DAT1); END; example why the changes made in the list YEAR_1999_DAY_2 are not kept? |
|||
06-01-2018, 08:54 PM
Post: #5
|
|||
|
|||
RE: how to remove string?
Code: EXPORT LIST_1:={1,2,3}; another example Why can not the global variables be modified from the program? |
|||
06-01-2018, 09:27 PM
Post: #6
|
|||
|
|||
RE: how to remove string?
(06-01-2018 08:54 PM)Richard Wrote: another example Is this what you want to do : Code: EXPORT LIST_1:={1,2,3}; |
|||
06-02-2018, 04:49 PM
Post: #7
|
|||
|
|||
RE: how to remove string?
Code: EXPORT LIST_1:={1,2,3}; |
|||
06-02-2018, 04:49 PM
Post: #8
|
|||
|
|||
RE: how to remove string?
Code: EXPORT LIST_1:={1,2,3}; |
|||
06-02-2018, 05:37 PM
Post: #9
|
|||
|
|||
RE: how to remove string?
(06-02-2018 04:49 PM)Richard Wrote: I don't know why your program ends up editing Ans instead of LIST_1, maybe Cyrille can provide some insights on how parameters are managed for EDITLIST. However here is a way to edit the list defined by ID: Code: NUMBER:=1; |
|||
06-03-2018, 10:23 AM
Post: #10
|
|||
|
|||
RE: how to remove string?
Hello,
It also works if you put ID in single quotes, like this: EDITLIST(EVAL('ID')); // LIST_1:={ 1,2,3 } CHANGE LIST_1:{100,200,300} -road |
|||
06-03-2018, 11:58 PM
Post: #11
|
|||
|
|||
RE: how to remove string?
Don't forget that EDITLIST returns the edited list - it doesn't automatically store it into the variable. SO you need to do MYVAR:=EDITLIST(...) to keep your changes...
TW Although I work for HP, the views and opinions I post here are my own. |
|||
06-04-2018, 01:29 PM
Post: #12
|
|||
|
|||
RE: how to remove string?
Thank you so much guys
I had broken my head trying to solve this, the truth that I am a novice with this calculator Thank you |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)