02-24-2017, 04:26 AM
So I'm trying to only show four decimal digits in both matrices in CAS or in the stack in HOME. I can't seem to get any of the settings to do this. Sorry if this has been asked before, but search gave nothing.
C
C
(02-24-2017 05:09 AM)Tim Wessman Wrote: [ -> ]You'll want the display setting "Rounded 4"
(02-24-2017 05:09 AM)Tim Wessman Wrote: [ -> ]You'll want the display setting "Rounded 4"How can I set that from an HPPL program? I know I can use the STRING function for individual numbers but I'd like to be able to save the current display mode, set the mode to a new value and restore the original mode when the program ends.
Quote:I'd like to be able to save the current display mode, set the mode to a new value and restore the original mode when the program ends.
(02-24-2017 04:05 PM)toml_12953 Wrote: [ -> ](02-24-2017 02:27 PM)DrD Wrote: [ -> ]Use the HDigits home variable:Thanks but no matter what I set HDigits to I get the number of decimal places I saved in the Settings screen.
HFormat:=1;
HDigits:=4;
F:=HFormat; // save the current display mode
HFormat:=1; // set the mode to a new value
H:=HDigits;
HDigits:=4;
HFormat:=F; //restore the original mode when the program ends
Changing HDigits doesn't change the decimal places for me.
Tom L
(02-24-2017 04:05 PM)toml_12953 Wrote: [ -> ]Thanks but no matter what I set HDigits to I get the number of decimal places I saved in the Settings screen.
Changing HDigits doesn't change the number of decimal places for me.
Tom L
(02-24-2017 05:09 AM)Tim Wessman Wrote: [ -> ]You'll want the display setting "Rounded 4"
(02-24-2017 04:17 PM)DrD Wrote: [ -> ](02-24-2017 04:05 PM)toml_12953 Wrote: [ -> ]Thanks but no matter what I set HDigits to I get the number of decimal places I saved in the Settings screen.
Changing HDigits doesn't change the number of decimal places for me.
Tom L
Take some time to review the parameters associated with HFormat and HDigits. (User Guide, and Help docs on the Home Variables). It will do the things you desire, but your settings need to be appropriate. I have quite a few programs that take advantage of these settings. I also am quite sure they will work for you too.