HP Forums
Clear All Expression in App? - 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: Clear All Expression in App? (/thread-7581.html)



Clear All Expression in App? - DrD - 01-14-2017 09:23 PM

Can you share any ideas on how to best clear ALL of the expressions in an app, programmatically? (Like [Shift] [ ESC] does). I was wondering if there is such a thing as a fully qualified app_name.reset kind of thing?

Specifically, I'm working with the Advanced Graphing app...

Thanks,
-Dale-


RE: Clear All Expression in App? - Han - 01-14-2017 09:34 PM

Just set them to null strings. For example:

V0:="";

Code:

nullstring:="";
nullstring:=string(nullstring);
for n from 0 to 9 do
  cmd:="V" + n + ":=" + nullstring;
  expr(cmd);
end;

EDIT: Be aware that the number format could affect the way numbers are turned into strings.


RE: Clear All Expression in App? - DrD - 01-14-2017 09:48 PM

Thanks. That was the way I had been doing it, but thought there may be a simpler way, perhaps using the esc shift, somehow.