#pragma mode inquiry revisited
|
06-04-2021, 07:53 PM
(This post was last modified: 06-05-2021 07:16 PM by Liamtoh Resu.)
Post: #1
|
|||
|
|||
#pragma mode inquiry revisited
Can anybody share a list of the complete pararmeters for #pragma mode?
I have seen very brief descriptions on its purpose and some sample code. One sample line: "#pragma mode( separator(.,;) integer(h32) )" Thanks. I searched the hp prime threads and came up with the following links: === https://www.hpmuseum.org/forum/thread-14...ragma+mode === https://www.hpmuseum.org/forum/thread-12...ragma+mode === https://carlos-icg.blogspot.com/2017/09/...Prime.html === https://www.hpmuseum.org/forum/thread-50...ragma+mode === https://www.hpmuseum.org/forum/thread-14...ragma+mode === There seems to: ) different values that I can have at the end, eg. h8,h32,h64,... The spanish language graphic seems to indicate other values are possible. Has anybody translated the spanish language into english? non-sequitors: ) with the comma-coma puns I am glad I am not the only one who pun-nish their friends. ) is this an example of a recursive thread post? Thanks |
|||
06-06-2021, 02:41 AM
Post: #2
|
|||
|
|||
RE: #pragma mode inquiry revisited
Is the use of the #pragma mode line going to be depreciated or be restricted
to a certain set of programmers? I have done more research on the #pragma mode and the information is obscure at best. There have been formatting, precision, country codes available for cobol, fortran, basic, c,... etc available for some time. === The following is the most recent research. === https://www.hpcalc.org/details/7714 https://www.hpcalc.org/prime/docs/commandtree.zip Insert pragma: tap this option to paste a #pragma mode definition into your program. The #pragma mode definition is of the following form: #pragma mode( separator(), integer()) Use the #pragma mode definition to define the set of separators used for digit grouping and the integer type. The #pragma mode definition will force the program to compile using these settings. This capability is useful for adapting a program written for a culture that uses different grouping symbols (. vs. ,) than your own. === https://www.hpcalc.org/details/7445 https://www.hpcalc.org/prime/docs/hpprimeug.zip https://www.hpcalc.org/historical/hpprimeug2nd.zip https://www.hpcalc.org/historical/hpprimeug.zip === hpprimeug second edition third edition Insert pragma—Tap this option to paste a #pragma mode definition into your program. The #pragma mode definition is in the following form: #pragma mode( separator(), integer()) Use the #pragma mode definition to define the set of separators used for digit grouping and the integer type. The #pragma mode definition forces the program to compile using these settings. This capability is useful for adapting a program written for a culture that uses different grouping symbols (. vs. ,) than your own. === Thanks. |
|||
06-06-2021, 05:09 PM
Post: #3
|
|||
|
|||
RE: #pragma mode inquiry revisited
No, nothing will be added there.
The new program/project structure is much more capable and handles it. TW Although I work for HP, the views and opinions I post here are my own. |
|||
06-06-2021, 11:07 PM
Post: #4
|
|||
|
|||
RE: #pragma mode inquiry revisited
(06-04-2021 07:53 PM)Liamtoh Resu Wrote: Can anybody share a list of the complete pararmeters for #pragma mode? There really is nothing to be gained from figuring out the parameters for #pragma. It was put into place as a means of allowing on-calculator programmers to create their programs using their specific settings and have the code run on other users' calculators without forcing the users to change their settings to match those of the programmer. For example, here in the USA we use the decimal point as our fraction mark. Many other countries use the comma as their fraction mark. Thus, programs that use commas and decimal points could end up causing compatibility issues without the use of the #pragma statement. While inside the program editor, pressing the [Menu] key will allow you to quickly insert a #pragma statement that matches your calculator's current settings. When the program is "compiled" the calculator uses the #pragma statement to decide how to interpret certain special characters and translate them properly. This is how I understand it. I'm sure others will correct any misunderstandings. Graph 3D | QPI | SolveSys |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)