Meinst du so?
Code:
'---------------------------------
'Deklaration
'---------------------------------
$regfile = "m16DEF.DAT"
$crystal = 16000000
Config Porta = Output
Dim Kw As long
Dim X As Integer
Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7 , E = Portc.3 , Rs = Portc.2
Config Lcd = 20 * 4
Initlcd
Cls
Cursor Off
X = 2000
Do
Kw = 0.1499 + 0.00506
Kw = Kw * X
Kw = Kw + 0.000001889
Kw = Kw * X
Kw = Kw ^ 2
Kw = Kw - 0.00000000014249
Kw = Kw * X
Kw = Kw ^ 3
Kw = Kw - 0.00000000000020465
Kw = Kw * X
Kw = Kw ^ 4
Lcd Kw
Loop
End
Aber muss ich nicht auf Punkt- vor Strichrechnung achten?
Mfg Tryan
Lesezeichen