Post Reply 
Check and Home Settings
06-16-2015, 03:28 AM
Post: #1
Check and Home Settings
Hello everybody.
I see a strange behavior of "Check" key when I set some value to Digit Grouping in home settings...
For example, if Digit grouping is 123456,789, Check give syntax error with this test program :
(Cursor position just after the 'a' line 4)

If I set Digit grouping to 123456.789 no error... ?

EXPORT test()
BEGIN
local a;
input({{a,[0],{15,30,0}}});
END;
Find all posts by this user
Quote this message in a reply
06-16-2015, 05:11 AM
Post: #2
RE: Check and Home Settings
To make your program compatible with the different digit grouping options you need to insert a pragma statement at the beginning:
  • set the digit grouping to 123456.789
  • position the cursor before EXPORT and press Menu > Insert pragma

Code:
#pragma mode( separator(.,;) integer(h32) )
EXPORT test()
BEGIN
local a;
input({{a,[0],{15,30,0}}});
END;
Find all posts by this user
Quote this message in a reply
06-16-2015, 05:45 AM (This post was last modified: 06-16-2015 05:46 AM by Pierre F8APV.)
Post: #3
RE: Check and Home Settings
Hello Didier and thanks !
I didn't know this "#pragma" but, after reading your post, I found some informations and details on it...

http://www.hpmuseum.org/forum/thread-1427.html

Thanks you.
Find all posts by this user
Quote this message in a reply
06-16-2015, 07:22 AM
Post: #4
RE: Check and Home Settings
Yes, it’s not well documented but it is a good practice to start any program with a #pragma statement. It avoids troubles if you change your decimal separator later on or if you share your program with someone using different settings.
Find all posts by this user
Quote this message in a reply
Post Reply 




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