Need a DEC method
For Mike Green:
Mike, I am trying to write a program with an ADC for VGA display.· My VGA object is:
VGA_1280x1024_Tile_Driver_With_Cursor
The methods I have will write a string or a character but not a decimal number.· Do you have time to write a method for me that will let me display decimals?
Thanks
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
Mike, I am trying to write a program with an ADC for VGA display.· My VGA object is:
VGA_1280x1024_Tile_Driver_With_Cursor
The methods I have will write a string or a character but not a decimal number.· Do you have time to write a method for me that will let me display decimals?
Thanks
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·

Comments
You could try this:
PUB dec(value) | i '' Print a decimal number if value < 0 -value out("-") i := 1_000_000_000 repeat 10 if value => i out(value/i + "0") value //= i result~~ elseif result or i == 1 out("0") i /= 10Jim