Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 Re: kommazahlen Kategorie: Programmierung Basic (von H.J.W. - 21.12.2006 22:15)
 Als Antwort auf Re: kommazahlen von Achim - 21.12.2006 20:44
ManfredW is absolutely correct,
The If Temperatur < 0 then print”-” must be placed in front of your code otherwise temperatures from -0,1 (-1) to -0,9 (-9) will not be displayed with a “-” but be display as 0,1 to 0,9.

Example:

Temperatur = -3 ‘-0,3’
Print Temperatur/10;”,”;abs(Temperatur)mod 10

Temperatur/10 is 0
Abs(Temperatur)mod 10 is 3

So with your code the temperature of -0,3 will be displayed as 0,3.
Greetings,
H.J.W.

 Antwort schreiben

Bisherige Antworten:

WAIT……There is one more thing! (von H.J.W. - 22.12.2006 13:39)
    Re: WAIT……There is one more thing! (von Achim - 22.12.2006 23:48)
Re: kommazahlen (von Hauk - 22.12.2006 0:57)
Re: kommazahlen (von ManfredW - 21.12.2006 22:37)
Re: kommazahlen (von Achim - 21.12.2006 22:33)