Post Reply 
How do I save all the User settings, on the Prime? (SOLVED!)
10-31-2015, 02:16 AM (This post was last modified: 11-03-2015 03:15 PM by Spybot.)
Post: #1
How do I save all the User settings, on the Prime? (SOLVED!)
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!

Spybot.
Find all posts by this user
Quote this message in a reply
11-01-2015, 01:39 AM
Post: #2
RE: How do I save all the User settings, on the Prime?
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.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
11-01-2015, 06:17 AM
Post: #3
RE: How do I save all the User settings, on the Prime?
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.

Spybot.
Find all posts by this user
Quote this message in a reply
11-01-2015, 01:09 PM (This post was last modified: 11-01-2015 01:11 PM by Han.)
Post: #4
RE: How do I save all the User settings, on the Prime?
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.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
11-01-2015, 07:03 PM (This post was last modified: 11-03-2015 03:14 PM by Spybot.)
Post: #5
RE: How do I save all the User settings, on the Prime?
Thank Han you for the feedback!
It is a very valuable information for me (and maybe for others).

Spybot.
Find all posts by this user
Quote this message in a reply
11-02-2015, 06:39 AM
Post: #6
RE: How do I save all the User settings, on the Prime?
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;

Sorry for my english
Find all posts by this user
Quote this message in a reply
11-02-2015, 06:59 PM (This post was last modified: 11-02-2015 07:00 PM by Han.)
Post: #7
RE: How do I save all the User settings, on the Prime?
(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".

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
11-02-2015, 09:23 PM
Post: #8
RE: How do I save all the User settings, on the Prime?
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]

Sorry for my english
Find all posts by this user
Quote this message in a reply
11-03-2015, 12:14 AM
Post: #9
RE: How do I save all the User settings, on the Prime?
Thank you Tyann your solution is also very good...

Spybot.
Find all posts by this user
Quote this message in a reply
11-03-2015, 12:17 AM (This post was last modified: 11-03-2015 12:17 AM by Spybot.)
Post: #10
RE: How do I save all the User settings, on the Prime?
Guys this is just more than I expected.
thank you so much for your help!

Spybot.
Find all posts by this user
Quote this message in a reply
11-03-2015, 05:31 PM
Post: #11
RE: How do I save all the User settings, on the Prime? (SOLVED!)
(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.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
11-03-2015, 06:04 PM
Post: #12
RE: How do I save all the User settings, on the Prime? (SOLVED!)
Hello

Excellent idea .
Great.

Sorry for my english
Find all posts by this user
Quote this message in a reply
11-03-2015, 10:05 PM (This post was last modified: 11-03-2015 10:08 PM by Tyann.)
Post: #13
RE: How do I save all the User settings, on the Prime? (SOLVED!)
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.

Sorry for my english
Find all posts by this user
Quote this message in a reply
Post Reply 




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