milanlu
19.11.2008, 20:26
Hallo zusammen,
kann mir bitte jemand sagen warum das nicht funktioniert:
$regfile = "m32def.dat"
$crystal = 8000000
$baud = 19200
$hwstack = 32
$swstack = 8
$framesize = 24
Declare Function Alarm(alarmstatus As Bit) as Bit
If Portb.2 = 1 Then
Alarm(1)
Else
Alarm(0)
End If
End
Function Alarm(alarmstatus As Bit) As Bit
Alarm = 0
If Alarmstatus = 1 Then
Portb.1 = 1
Weit 10
Portb.3 = 0
Else
Portb.3 = 1
Weit 10
Portb.1 = 0
End If
End Function
Fehlermeldung:
Line 12: unknown statement [alarm(1)]
Line 14: unknown statement [alarm(0)]
kann mir bitte jemand sagen warum das nicht funktioniert:
$regfile = "m32def.dat"
$crystal = 8000000
$baud = 19200
$hwstack = 32
$swstack = 8
$framesize = 24
Declare Function Alarm(alarmstatus As Bit) as Bit
If Portb.2 = 1 Then
Alarm(1)
Else
Alarm(0)
End If
End
Function Alarm(alarmstatus As Bit) As Bit
Alarm = 0
If Alarmstatus = 1 Then
Portb.1 = 1
Weit 10
Portb.3 = 0
Else
Portb.3 = 1
Weit 10
Portb.1 = 0
End If
End Function
Fehlermeldung:
Line 12: unknown statement [alarm(1)]
Line 14: unknown statement [alarm(0)]