Page 1 of 1

### Turning the decimal point OFF

Posted: Sun Feb 21, 2021 9:45 pm
I have a program that is obtaining and printing degrees, minutes, and seconds of lat/lon coordinates. I use decimal seconds to three places, but degrees and minutes are integers.

When I put these numbers into the alpha register for printing in FIX 0, the trailing decimal point remains. So the output string looks stupid: 78. 19. 10.354 NORTH

Short of doing string manipulation on each number, is there a way to turn OFF the radix marker altogether so integers look like integers?

Thanks in advance for any ideas.

### Re: Turning the decimal point OFF

Posted: Sun Feb 21, 2021 10:26 pm
CF 29 after FIX 0 will suppress the decimal point.

### Re: Turning the decimal point OFF

Posted: Mon Feb 22, 2021 6:40 am
dlachieze wrote:CF 29 after FIX 0 will suppress the decimal point.

Thanks much!

### Re: Turning the decimal point OFF

Posted: Sun Mar 07, 2021 3:11 pm
Worked perfectly! One more question: is there a quick and dirty way to add a leading zero? My test program output looks like the attached. The minutes look weird as single digits.

### Re: Turning the decimal point OFF

Posted: Sun Mar 07, 2021 5:01 pm
ScottJ wrote:One more question: is there a quick and dirty way to add a leading zero?

Assuming that the minutes are in the X register, you can insert the following instructions before the ARCL of the minutes value:

Code: Select all
`10x<=y?GTO 01CLXARCL ST XLBL 01RDN`

### Re: Turning the decimal point OFF

Posted: Wed Mar 10, 2021 1:50 am
dlachieze wrote:Assuming that the minutes are in the X register, [...]
... and assuming FIX 0 is already set and ScottJ uses an HP41CX or has at least plugged in a Time module I suggest to shorten the shown proposal to
Code: Select all
`ATIME24`

`10x>y?"~0"RDN`