HP Forums

Full Version: How do I save all the User settings, on the Prime? (SOLVED!)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!
I'd like to Know if there's a command that saves all the User settings(on the Prime), just like in the old times with the 50G using the command "STOF".
I've been searching the Prime's documentation, the forum, the web etc... and I just can find anything related to this matter, unless I go over each setting one by one. I think I need a little bit of help here please!
You can just make a list and populate it with each setting. I am not aware of anything resembling RCLF Like on the HP48 series.
Han thank for replaying!
I can store each setting into a variable and then restore those settings at the end of my program. but I'm not quite sure about populating lists. perhaps I'm just a beginner in the HPPPL.
Just as a quick example:

Code:
  local UserSettings:={};
  UserSettings(1):=HAngle;
  UserSettings(2):=Base;
  UserSettings(3):=Entry;
  RETURN(UserSettings);

You can restore them in a similar fashion:

Code:
  HAngle:=UserSettings(1);
  Base:=UserSettings(2);
  Entry:=UserSettings(3);

Make a program that saves the settings into an exported (global) variable. Make a second program that restores the settings. Then in your programs, you can simply call the two programs to save and restore the user's settings.
Thank Han you for the feedback!
It is a very valuable information for me (and maybe for others).
Bonjour

Je vous propose :

Hello

I suggest :

Code:
EXPORT STOF()
BEGIN
 HVars("Mode"):={HAngle,HFormat,HSeparator,HDigits,HComplex,Entry,Base,Bits,Signed};
END;

EXPORT RCLF()
BEGIN
 LOCAL l;
 l:=HVars("Mode");
 HAngle:=l(1);HFormat:=l(2);
 HSeparator:=l(3);HDigits:=l(4);
 HComplex:=l(5);Entry:=l(6);
 Base:=l(7);Bits:=l(8);Signed:=l(9);
END;
(11-02-2015 06:39 AM)Tyann Wrote: [ -> ]Bonjour

Je vous propose :

Hello

I suggest :

Code:
EXPORT STOF()
BEGIN
 HVars("Mode"):={HAngle,HFormat,HSeparator,HDigits,HComplex,Entry,Base,Bits,Signed};
END;

EXPORT RCLF()
BEGIN
 LOCAL l;
 l:=HVars("Mode");
 HAngle:=l(1);HFormat:=l(2);
 HSeparator:=l(3);HDigits:=l(4);
 HComplex:=l(5);Entry:=l(6);
 Base:=l(7);Bits:=l(8);Signed:=l(9);
END;

Great solution! Perhaps it may even be better to specify an argument where to save the settings rather than the default "Mode".
Quote:Great solution!
Merci
Thank you
Quote:Perhaps it may even be better to specify an argument where to save the settings rather than the default "Mode".
Pourriez-vous illustrer ?
Could you illustrate ?[/quote]
Thank you Tyann your solution is also very good...
Guys this is just more than I expected.
thank you so much for your help!
(11-02-2015 09:23 PM)Tyann Wrote: [ -> ]
Quote:Great solution!
Merci
Thank you
Quote:Perhaps it may even be better to specify an argument where to save the settings rather than the default "Mode".
Pourriez-vous illustrer ?
Could you illustrate ?
[/quote]

Code:
EXPORT STOF(varname)
BEGIN
 HVars(varname):={HAngle,HFormat,HSeparator,HDigits,HComplex,Entry,Base,Bits​,Signed};
END;

EXPORT RCLF(varname)
BEGIN
 LOCAL l;
 l:=HVars(varname);
 HAngle:=l(1);HFormat:=l(2);
 HSeparator:=l(3);HDigits:=l(4);
 HComplex:=l(5);Entry:=l(6);
 Base:=l(7);Bits:=l(8);Signed:=l(9);
END;

You would ideally modify it to test the argument 'varname' and ensure it is a string, and that such a home variable exists. This slight modification allows save several instances of user settings and set them with ease. For example:

STOF("CurrentSettings");
RCLF("DiffEQSettings");
... do some differential equations stuff ...
... then switch over to RPN ...
RCLF("RPNSettings");
... now switch back to original settings ...
RCLF("CurrentSettings");

So in theory, one could have a number of different settings that can be used, and would only need to be created once.
Hello

Excellent idea .
Great.
Bonjour
Nous pouvons aussi ajouter ceci :

Hello
We can also add:
Code:

EXPORT RCLF(varname,d)
BEGIN
 LOCAL l;
 l:=HVars(varname);
 HAngle:=l(1);HFormat:=l(2);
 HSeparator:=l(3);HDigits:=l(4);
 HComplex:=l(5);Entry:=l(6);
 Base:=l(7);Bits:=l(8);Signed:=l(9);
 IF d THEN
  DelHVars(varname);
 END;
END;
Ce qui serait bien, ce serait de pouvoir mettre des paramètres facultatifs.
What would be great would be to be able to put optional parameters.
Reference URL's