The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(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:

A_VIN(LAT1,LON1,LAT2,LON2)
 BEGIN
  LOCAL TM,RESULT,DISTS;
  PRINT("From LAT "+LAT1+" "+→HMS(LAT1));  
 END;

EXPORT HMSPRINT()
BEGIN
  PRINT(); 
  A_VIN(50°03′58.76″,−005°42′53.10″,58°38′38.48″,−003°04′12.34″);//Expected 50.decimal not 50 03 output twice
 
  A_VIN(50.5,45.5,35.,34.4);

END;

//Outputs:
//From LAT 50°03′58.76″ 50°03′58.76″ //Unexpected 
//From LAT 50.5 50°30′00″ //Expected


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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(Solved) PRINT: Unexpected HMS formatting/Unexpected DMS formatting - StephenG1CMZ - 10-07-2016 05:45 PM



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