Post Reply 
Number format Input instruction
06-27-2015, 12:42 PM (This post was last modified: 06-28-2015 01:23 AM by Dirk.nl.)
Post: #1
Number format Input instruction
I have a question about the value presentation (number format) of the input command. It's for me difficult to explain in English, but I will try it.
In home settings I select number format to "engineering".
When I run a program with an input command all values are presented in "standard", not in the selected "engineering" format!!
After inputting a value this value is presented in "engineering".
After running this program for the second time all already inputted values are again presented in "standard"!!
(Local vars declared on the first program row, before BEGIN).
What do I wrong? Or is it a "bug"?

Maybe a question for Tim Wessman?

BTW(1), I use the input instruction as a kind of a little "Scada" system of presentation of both inputted and calculated variables, within a do while. After OK the program's runs again (input returns a "1") after Cancel the program stops (input returns a "0")
The advantage is that you have a direct overview of the inputted and calculated results.

BTW(2), I love my Prime, very fine calculator!

— Dirk Hartland
Find all posts by this user
Quote this message in a reply
06-29-2015, 03:35 PM
Post: #2
RE: Number format Input instruction
See my previous question.
Till now a have no answer.
Was my English so bat? Was it not understandably? Or not interesting enough?

Tim Wessman,
I think there is something wrong with the re-reading of the values of the input command.
Re-reading of the values are in "standard" not in the chosen format at Home.
Please Tim (or others) can you give me an answer?
It is not meant negative, positive only, for the improvement of the calculator's software.
Please check this with a simple "input" program.

— Dirk Hartland
Find all posts by this user
Quote this message in a reply
06-29-2015, 04:17 PM
Post: #3
RE: Number format Input instruction
Hello Dirk,

Maybe you can give a program example showing the issue you're reporting.
I've done some tests with a very simple program:
Code:
EXPORT inputformat()
BEGIN
REPEAT UNTIL INPUT(A,"A") == 0;
END;
And I confirm that the number in the INPUT field is displayed in Standard format even if I select the Engineering format in the Home Settings. However there is one thing I can't replicate:
Quote:After inputting a value this value is presented in "engineering".
Find all posts by this user
Quote this message in a reply
06-29-2015, 05:02 PM (This post was last modified: 06-29-2015 05:29 PM by Tim Wessman.)
Post: #4
RE: Number format Input instruction
(06-29-2015 03:35 PM)Dirk.nl Wrote:  I think there is something wrong with the re-reading of the values of the input command.

The internals of the dialog box were originally designed to only support "real" numbers. In order to support input of things like complexes, matrices, etc we had to do a not so great workaround that resulted in this side effect. Right now, there is no way to change that behavior. It will work as you want in some future update when we can remove the underlying limitation. I cannot provide details as to when that will be though.

Thanks for the report though! I've filed an internal issue to make sure that we don't overlook checking this to make sure it is resolved.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
06-29-2015, 05:55 PM
Post: #5
RE: Number format Input instruction
Didier and Tim, THANKS for your replays.
Tim, I think you know my problem. I hope you (HP software engineers!) will update this in the next update(s).
Didier, what I meant, if you select at Home settings "engineering" mode the value will be presented as engineering after inputting the value. So entering a value, for instance 1 <enter> it will be presented as 1.000E1. That is of course correct. But running the second time it will be presented as 1 (not as 1.000e1)
I shall try to include a simple program tomorrow (Dutch time!) I don't know how to that yet.
It's for me some times difficult to explain in English, sorry fore that!
I hope you both understand it.

— Dirk Hartland
Find all posts by this user
Quote this message in a reply
06-30-2015, 07:19 AM
Post: #6
RE: Number format Input instruction
Hi Tim and Didier,
Quote:Maybe you can give a program example showing the issue you're reporting.
See my next very simple prgram.
For this prgram "engineering" format is not necessary, just used as an example.

Code:

LOCAL Old, New, Chg,
      Total, Part, Proc;

EXPORT Percent
BEGIN
LOCAL C1,C2,C3,C4,C5,C6;
LOCAL T1,T2;
LOCAL IN:=1;
T1:=HFormat; T2:=HDigits;
HFormat:=3;  HDigits:=4;

WHILE IN=1 DO

IN:=INPUT(
{{Old,[0],{30,40,0}},
 {New,[0],{30,40,1}},
 {Chg,[0],{30,40,2}},
 {C1,3,{80,1,0}},
 {C2,3,{80,1,1}},
 {C3,3,{80,1,2}},
 {Total,[0],{30,40,4}},
 {Part,[0],{30,40,5}},
 {Proc,[0],{30,40,6}},
 {C4,3,{80,1,4}},
 {C5,3,{80,1,5}},
 {C6,3,{80,1,6}}},
 "Percent",
 {"Old: ","New: ","%Diff: ",
  "","","",
  "Total: ","Part: ","%Total: ",
  "","",""});

IF IN=0 THEN
   HFormat:=T1; HDigits:=T2;
   KILL;
END;

IF C1>0 THEN
   Old:=100*New/(Chg+100);
   C1:=0;
END;

IF C2>0 THEN
   New:=(Chg*Old+100*Old)/100;
   C2:=0;
END;

IF C3>0 AND Old≠0 THEN
   Chg:=100*(New-Old)/Old;
   C3:=0;
END;

IF C4>0 AND Proc≠0 THEN
   Total:=100*Part/Proc;
   C4:=0;
END;

IF C5>0 THEN
   Part:=Proc*Total/100;
   C5:=0;
END;

IF C6>0 AND Total≠0 THEN
   Proc:=100*Part/Total;
   C6:=0;
END;

END; //WHILE
END; //BEGIN

Run this program.
All values are zero -> "standard" format presentation, not correct.
Enter the first value, for instance 1 <OK> -> display = 1.0000E0, correct.
Enter the second value, for instance 2 <OK> -> display = 2.0000E0, correct.
Check the checkbox after the third value.
Select <OK> to calculate.
After that all values are again presentated in "standard" format, that's not correct.
Must be "engineering" format.
Close the program with <Cancel>.

— Dirk Hartland
Find all posts by this user
Quote this message in a reply
Post Reply 




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