Having had my fingers burned with recent entries to BitBucket, I’m just putting this item up for comment (and possible destruction).
I have a custom statement, AngleDecToDMS which converts angles expressed as degrees and decimals to the sexagesimal format. The decimal angle is provided as a text string and the core of the conversion is this code, where Alpha1 is the decimal angle:
Alpha1 = "59.82379" Angle = val(Alpha1) Deg = int(Angle) Temp = 60 * (Angle-Deg) Min = int(Temp) Sec = round(60 * (Temp-Min),val("1e-"+str(2))) Result = str(Deg) + "°" + " " + pattern(Min,"##") + chr(39) + " " + pattern(Sec,"##." + rep("#",NumDec)) + chr(34)
Alpha1 is calculated in another custom statement and the AngleDecToDMS statement is invoked by
AngleDECtoDMS str(Alpha1),RevAz,"2" where RevAz is the angle in sexagesimal format and the value 2 indicates two decimal places in the seconds component.
The output from the AngleDecToDMS statement is 59° 49’ 25.68’’ which is exactly what you’d get if you set Alpha1 equal to 59.8238, which just happens to be its six-digit default display.
If I invoke the conversion with
AngleDECtoDMS pattern(Alpha2,"#.######"),RevAz,"2", I get a result of 59° 49’ 25.64’ which is what you’d get if you did the conversion manually.
So it appears that, at least in this circumstance, when passing a parameter from one procedure to another, it is necessary to use the pattern( function to override the default display protocol if you want your parameter to register as having more than six significant figures. I don’t think this is a good thing.