HP Forums

Full Version: Programming problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For unknown reasons I experience problem with new and old programs. When attempting run and old one or to write a new simple program an exclamation mark in an orange circle appears.
A week ago everything was OK.
Example:
----------------------
EXPORT TEST()
BEGIN
LOCAL I,P; /everything is OK, but when changed to
LOCAL I,P,R;/exclamation mark appears
END;
-----------------------
I have reported this problem to Eddie and he recommended to present it at this forum.

Thanks
Slavomir
Throwing a quick idea. Are you making a conflict with a reserved word?

Could you try
LOCAL II1,PP1,RR1; //the 1 added to really lower the chances to zero of overlaps
?
(03-28-2018 03:52 PM)Slavomir_Cerny Wrote: [ -> ]A week ago everything was OK.
Example:
----------------------
EXPORT TEST()
BEGIN
LOCAL I,P; /everything is OK, but when changed to
LOCAL I,P,R;/exclamation mark appears
END;
-----------------------
Slavomir

For one thing, remarks use a double forward slash //, not / which is a division symbol.

When I used the same example like this, it seems to work:

Code:

EXPORT TEST()
BEGIN
LOCAL I,P;   //everything is OK, but when changed to
LOCAL I,P,R; // exclamation mark appears
END;
(03-28-2018 04:27 PM)pier4r Wrote: [ -> ]Throwing a quick idea. Are you making a conflict with a reserved word?

Could you try
LOCAL II1,PP1,RR1; //the 1 added to really lower the chances to zero of overlaps
?

First, using // for comments makes no problems with both possibilities.
Second, there should be no overlaps as the variables are declared local.
Arno
(03-28-2018 03:52 PM)Slavomir_Cerny Wrote: [ -> ]For unknown reasons I experience problem with new and old programs. When attempting run and old one or to write a new simple program an exclamation mark in an orange circle appears.
A week ago everything was OK.
Example:
----------------------
EXPORT TEST()
BEGIN
LOCAL I,P; /everything is OK, but when changed to
LOCAL I,P,R;/exclamation mark appears
END;
-----------------------
I have reported this problem to Eddie and he recommended to present it at this forum.

Thanks
Slavomir

The following:

Code:
EXPORT TEST()
BEGIN
LOCAL I,P,R; //exclamation mark doesn't appear
END;

Works fine for me. It runs with a return code of 0.Strange...
Please check the digit grouping setting in home to see if you have it set to a setting with "," and "." swapped. If so, try changing it and then edit and "check" the program to see if it "checks" now. If this is the issue, you can alternatively try a pragma line at the start of the program if you like your digit grouping setting the way it was.
(03-28-2018 04:33 PM)DrD Wrote: [ -> ]
(03-28-2018 03:52 PM)Slavomir_Cerny Wrote: [ -> ]A week ago everything was OK.
Example:
----------------------
EXPORT TEST()
BEGIN
LOCAL I,P; /everything is OK, but when changed to
LOCAL I,P,R;/exclamation mark appears
END;
-----------------------
Slavomir

For one thing, remarks use a double forward slash //, not / which is a division symbol.

When I used the same example like this, it seems to work:

Code:

EXPORT TEST()
BEGIN
LOCAL I,P;   //everything is OK, but when changed to
LOCAL I,P,R; // exclamation mark appears
END;
(03-29-2018 02:21 AM)Fortin Wrote: [ -> ]Please check the digit grouping setting in home to see if you have it set to a setting with "," and "." swapped. If so, try changing it and then edit and "check" the program to see if it "checks" now. If this is the issue, you can alternatively try a pragma line at the start of the program if you like your digit grouping setting the way it was.

Digit grouping was the problem. In my country we use comma as a point. And I changed original setup not expecting it could impact programming. Unexperienced user, sorry.
And for all od you of course I know I should use double backslash for a comment, and I used simple backslash only for illustrating my problem, not in a real tested program.
Thanks all of you
Slavomir
Tout est bien qui finit bien Smile
Best,

Aries Wink
(03-29-2018 07:57 AM)Slavomir_Cerny Wrote: [ -> ]Digit grouping was the problem. In my country we use comma as a point. And I changed original setup not expecting it could impact programming.

For this reason, #pragma should be used if the program will be used by other users in different calculators. (Menu / Insert #pragma [5])
Reference URL's