i have a question regarding the library and the code for the nokia 3310.
for the following code:
Code:
ARRAYWRITE speed [dec var1,dec2 var2,0]
LCDSTR x,y, buff
VAR1 is a byte and VAR2 is a byte as well. Those two numbers are presenting the Speed in format VAR1,VAR2 (where VAR1 can be any number from 0 to infinity, and VAR2 can be any number from 0 to 99)
In case that the VAR1 gets the variable from 0 to =<255 the it can be used as a byte.
My problem is that i need this floating number for ex. speed = 50,86 to get it as an integer speed = 5086. May i have your help please?
If i set speed (VAR1 VAR2) as word then the following command
does not accept word.
Could you please help me to get the speed as an integer and read it as it is.
For my program i'm testing:
Code:
if speed is > 5086 then limit ; 50,86
thanks once again.
Bookmarks