DeltaEx
16.10.2005, 21:16
Wieso kriege ich denn Fehler?
BYVAL should be used in declaration [[112]]
Declare Sub Leftdir(ddir As Bit)
Declare Sub Rightdir(ddir As Bit)
If Command = 17 Then
Call Leftdir(1)
End If
If Command = 16 Then
Call Rightdir(1)
End If
Sub Leftdir(ddir As Bit)
If Ddir = 0 Then
Portb.0 = 1
Portb.1 = 0
Portb.2 = 0
Portb.3 = 0
Else
Portb.0 = 0
Portb.1 = 1
Portb.2 = 0
Portb.3 = 0
End If
End Sub
Sub Rightdir(ddir As Bit)
If Ddir = 0 Then
Portb.0 = 0
Portb.1 = 0
Portb.2 = 0
Portb.3 = 1
Else
Portb.0 = 0
Portb.1 = 0
Portb.2 = 1
Portb.3 = 0
End If
End Sub
BYVAL should be used in declaration [[112]]
Declare Sub Leftdir(ddir As Bit)
Declare Sub Rightdir(ddir As Bit)
If Command = 17 Then
Call Leftdir(1)
End If
If Command = 16 Then
Call Rightdir(1)
End If
Sub Leftdir(ddir As Bit)
If Ddir = 0 Then
Portb.0 = 1
Portb.1 = 0
Portb.2 = 0
Portb.3 = 0
Else
Portb.0 = 0
Portb.1 = 1
Portb.2 = 0
Portb.3 = 0
End If
End Sub
Sub Rightdir(ddir As Bit)
If Ddir = 0 Then
Portb.0 = 0
Portb.1 = 0
Portb.2 = 0
Portb.3 = 1
Else
Portb.0 = 0
Portb.1 = 0
Portb.2 = 1
Portb.3 = 0
End If
End Sub