Post Reply 
HP Prime - Problem with the decimal separator
10-28-2015, 05:06 AM
Post: #1
HP Prime - Problem with the decimal separator
Hello,
      I have a problem with the decimal separator. If I use the comma necessary to use the "fracmod ()" the program that contains the function no longer runs it stops on every point of the program, for example, list of variables etc ... And if I uses the period as the separator the program works except the "fracmod ()" which does not run because it forward a number with a comma and not a point.
How to define what functions to work with a point rather than a variable?
Thank you for your help.
Find all posts by this user
Quote this message in a reply
10-28-2015, 07:14 AM
Post: #2
RE: HP Prime - Problem with the decimal separator
(10-28-2015 05:06 AM)wChris79 Wrote:  Hello,
      I have a problem with the decimal separator. If I use the comma necessary to use the "fracmod ()" the program that contains the function no longer runs it stops on every point of the program, for example, list of variables etc ... And if I uses the period as the separator the program works except the "fracmod ()" which does not run because it forward a number with a comma and not a point.
How to define what functions to work with a point rather than a variable?
Thank you for your help.
That's because the program lacks the #pragma line.
this line tells the calculator what are the separators used to built the program (the source)

It can be optained with menu key while editing the program.

What you can do :
Change your configuration to find the one that make this program to works.
Ok, then edit the source and insert pragma at first line.
example :
Code:
#pragma mode( separator(.,;) integer(h32) )
Regards

primer
Find all posts by this user
Quote this message in a reply
10-28-2015, 08:15 AM (This post was last modified: 10-28-2015 08:16 AM by wChris79.)
Post: #3
RE: HP Prime - Problem with the decimal separator
Excuse me, but where is the menu button in the edit mode of the program and the item 5 "insert pragma"
On the other hand I have a syntax error by inserting exactly your example online
#pragma mode (separator (.,;) integer (h32)) in first line of the program.
Find all posts by this user
Quote this message in a reply
10-28-2015, 08:24 AM
Post: #4
RE: HP Prime - Problem with the decimal separator
This link may help.

Jose Mesquita
RadioMuseum.org member

Find all posts by this user
Quote this message in a reply
10-28-2015, 10:14 AM
Post: #5
RE: HP Prime - Problem with the decimal separator
(10-28-2015 08:15 AM)wChris79 Wrote:  On the other hand I have a syntax error by inserting exactly your example online
#pragma mode (separator (.,Wink integer (h32)) in first line of the program.
First, you have a space after "mode", mine does not. same with separator and integer.

Second, separator in my example comes from my settings.
Until I see your program, I can't tell you if it's ok for your program... your program may require something different, that's why I told you to find the right setting and then to insert program from the "menu" key.
Regards.

primer
Find all posts by this user
Quote this message in a reply
10-28-2015, 11:31 AM
Post: #6
RE: HP Prime - Problem with the decimal separator
Don't forget to update the firmware if you have not already done so

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
10-28-2015, 01:09 PM (This post was last modified: 10-28-2015 02:19 PM by wChris79.)
Post: #7
RE: HP Prime - Problem with the decimal separator
I can not find the solution.
I tried several combinations.
In settings: the decimal separator is the point.

decimal separator is a point in the program.
parameter separator is a comma in the program.
command separator is a semi in the program.
and integers are 32 bits hexadecimal
Here is my code:

#pragma mode(separator(.,Wink integer(h32))
EXPORT TEST2()
BEGIN
LOCAL x, y;
10 -> x;
2015 -> y;
PRINT("TEST ANNEE : " + y + " MOIS : " + x);
END;
Find all posts by this user
Quote this message in a reply
10-28-2015, 03:13 PM
Post: #8
RE: HP Prime - Problem with the decimal separator
Votre programme fonctionne très bien, j'ai juste modifié "->" en "▶"

Your program does works, I only changed "->" into "▶"

Code:
#pragma mode(separator(.,;) integer(h32))
EXPORT TEST2()
BEGIN
LOCAL x, y;
10▶x;
2015▶y;
PRINT("TEST ANNEE : " + y + " MOIS : " + x);
END;

primer
Find all posts by this user
Quote this message in a reply
10-28-2015, 06:35 PM
Post: #9
RE: HP Prime - Problem with the decimal separator
OK. Thank you very much
Find all posts by this user
Quote this message in a reply
Post Reply 




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