-
×InformationFix Windows 10 Update Issues
Resolve Windows 10 related issues for your HP computers or printers by HP Windows 10 Support Center
-
-
×InformationFix Windows 10 Update Issues
Resolve Windows 10 related issues for your HP computers or printers by HP Windows 10 Support Center
-
- HP Community
- >
- Other Products
- >
- Calculators
- >
- Can I change input format for INPUT command in HP 50g graphi...
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Create an account on the HP Community to personalize your profile and ask a question

Solved!
Can I change input format for INPUT command in HP 50g graphing calculator ?
03-28-2019 10:53 AM

Hello dear HP Support Community ,
I want to know if is possible to change an entering form without changing object type or input format if I'm using INFORM command in HP 50g graphing calculator . I have a task to convert date in input format of day.month.year. into "decimal" years .
So as example if date was about 01.07.2030. ( random number ) my decimal years will be approximately 2030.50 , If you use similar method you can change a time or angle in hours°minutes'seconds" format to decimal format od those quantity !!
But real deal happens when I tred to type that what I mean beyond this text , so If you follow me I want to type date 28. Of March 2019. in format which i described before ( day.month.year.) when I call INFORM command to take a place , but you know I'm getting an error in the end ...
I will show you basic three steps what I want to do when I mean "changing input format"Next ... step is when I press enter I get this notification ... It suggest me thath is something wrong
First step ... input form , I'm using current date in Croatia ... 28.03.2019.
Please look at these pictures from below to the top !!
I think I had a problem when I want to post pictures ,
So Can enyone suggest me a solution for this , If you did not understand I will recap all of this ,
1. I want to enter numbers in specific format just like you see before and without changing object type , you probably know that you can type 28.03.2019. by putting this double quotes " " on beggining and at the end of my expression but I want to type numbers in format like you probably see in the pictures 28.03.2019. without "28.03.2019." and converting from string to number or whatever else . Just few numbers I want to enter in a specific format and that's all !!
2. Basicly all that I need i explain in first part , second part is all about how to succesfull convert from that format ( day.month.year. ) to decimal years
3. Part is most simpliest and I want to know how to save decimal years.
I hope that you understand me , keep this three guidlines in mind and If is possible please reply to my question .
Thank you very much !!
Best regards ,
Josip Kova
Solved! Go to Solution.
03-28-2019 04:58 PM

Yeah , I did not really noticed that so far ,
Thanks for your attention Joe ,
I thought about INFORM command , not INPUT but i think that I make a mistake and instead of INFORM a wrote INPUT .
Maybe I made such mistake because I was thinking on INPUT more than INFORM .
If you know how to do that with INFORM it will be very nice , because INFORM command is my priority number one not Input , but if someone know how to make same thing with the INPUT command , freely write and post your solution .
But this time I'm only refering to INFORM command .
Sorry for misunderstanding , It's my fault this time
If you know how to use both method , that will be definitely much better and if you have time and will describe how to solve this challenge with both INFORM and INPUT , that will be cool
03-29-2019 07:02 AM

Unless I'm mistaken, getting a string input from INFORM will require the user to press the " " key. The second argument of INFORM can specify that the input be a string object, but that doesn't change the input into a string, it merely verifies that the input was indeed a string, and if not, it generates an error. So I'm sorry, your goal of not pressing the " " key doesn't seem to be possible if you want a string output in the form of "08.19.1955." from INFORM.
However, the INPUT command does allow string inputs without requiring the user to press the " " key. Furthermore, INPUT is probably more appropriate for your intended purpose anyway, since it is intended for single inputs, whereas INFORM is optimized for multiple simultaneous inputs.
Example in RPN mode: "DY.MO.YEAR" "" INPUT --> returns whatever the user types, in string form.
For further info about the INPUT and INFORM commands, please refer to the Advanced User's Reference Manual, which not only gives their complete syntax with all their options, but even has a whole section in the Programming chapter about them, beginning on page 1-37.
03-29-2019 07:16 AM

Dear Joe ,
Thank you for your reply to my question about this !! So , basicly that means that I really can't do what I intend to do in my case with INFORM , but anyway I can do same thing with INPUT !!
That is my personal conclusion about that
Thank you for your solution although I think that I can somehow change my input format by using a INFORM , but it is quite obviously that I can't ,
I will accept your solution Joe ,
Thanks !!
Best regards ,
Josip Kova
03-29-2019 10:40 AM

Just a thought: One way to use INFORM to accomplish what you want is to specify that the input be in ISO format, namely, the number YYYYMMDD with no periods or dashes. So 19 August 1955 would be input as 19550819. One very real benefit of doing it this way is that the program can easily extract the three parts in an RPL program by simply doing 100 IDIV2 SWAP 100 IDIV2 SWAP. This leaves the year, month, and day, on stack levels 1, 2, and 3, respectively.
03-30-2019 05:26 AM

Dear Joe ,
Great I'm glad that you find some solution to this problem ( or challenge ) !!
But can you also tell me what exactly I need to do in order to proceed that task in INFORM command or maybe if you had example because I tried to use your function and I get several question like "num. mode off ?" and so on .
I can't quite remember all questions , and at the end I get some type of global variable I don't remember a name I think that is 'IDIV' but I'm not quite sure .
I'm so glad that you had some solution although I mark your previous post with "accept solution" , too early , I know
Thank you for your interests for this post
Best regards ,
Josip Kova
03-30-2019 07:27 AM

If you are getting 'IDIV' on the stack, you didn't type what I wrote above. IDIV2 is a single command; there is no space between IDIV and 2.
Here's a bare-bones simple example of using INFORM to input a date. Type this program exactly as shown (ignoring carriage returns, of course), save it into a variable (use any name you wish), and run it. Then try modifying it to use the other options of the INFORM command.
« "Enter Date"
{{"YYYYMMDD" "" 0}}
{ } { } { } INFORM
GET 100 IDIV2 SWAP 100 IDIV2 SWAP »
Output: Year, month, day, on stack levels 1, 2, 3, respectively.
Didn't find what you were looking for? Ask the community