(Solved) PRINT: Unexpected HMS formatting/Unexpected DMS formatting
|
10-07-2016, 05:45 PM
(This post was last modified: 10-08-2016 08:29 AM by StephenG1CMZ.)
Post: #1
|
|||
|
|||
(Solved) PRINT: Unexpected HMS formatting/Unexpected DMS formatting
I assumed that if I asked for
PRINT(LATITUDE+" " +HMS(LATITUDE)) I would see the latitude in both decimal and HMS/DMS format. This does not happen. Instead, the first variable is printed as it was provided (either HMS or decimal). Is this intended? Code:
What is the recommended way to see both formats, without caring how it was entered? (Android version) Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
10-07-2016, 07:30 PM
(This post was last modified: 10-07-2016 07:33 PM by toml_12953.)
Post: #2
|
|||
|
|||
RE: PRINT: Unexpected HMS formatting/Unexpected DMS formatting
(10-07-2016 05:45 PM)StephenG1CMZ Wrote: I assumed that if I asked for The Prime keeps track of the format of the variable. If you entered it in decimal degrees, then it will stay that way. Likewise if you enter it in HMS format, then it will print that way. To always print in decimal degrees no matter what was entered, you could do this: Code: PRINT(HMS->(->HMS(LATITUDE))+" "+LATITUDE) Tom L Tom L Cui bono? |
|||
10-07-2016, 08:19 PM
Post: #3
|
|||
|
|||
RE: PRINT: Unexpected HMS formatting/Unexpected DMS formatting
It is actually a flag embedded in the number object itself.
Whichever format was entered, use the ->HMS or HMS-> to set that flag. There is not any calculation that happens - it is purely setting the flag. Here's the code for those commands if you are curious: Code: static THPObj *CallHMS2(THPVarFuncDef const *f, THPObj const **Params, Int NbParams) TW Although I work for HP, the views and opinions I post here are my own. |
|||
10-07-2016, 10:24 PM
Post: #4
|
|||
|
|||
RE: PRINT: Unexpected HMS formatting/Unexpected DMS formatting
Maybe is not the correct Arguement lol
My website: ried.cl |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)