largo_winch
19-07-2011, 12:05
hello. anybody can check this very little code example? the result for "less -10" I don't understand. thanks for testing.
' Empty GUI script created on 07-15-2011 11:13:22 by (ThinAIR)
Uses "console"
Function TBMain() As Long
MsgBox 0, alittle(1)
End Function
Function alittle (less As DWord) As Long
Local a As Integer
Local b As Integer less = -10 ' ?
'less = 10 ' ok
a = 2 b = 200
Function = a*b+less
End Function
' a) result for less = 10 : 410 ok
' b) result for less = -10 : 4294967686 ?
there are few people they are really programming with thinbasic at the moment. background could be summer time? ;)
bye, largo
' Empty GUI script created on 07-15-2011 11:13:22 by (ThinAIR)
Uses "console"
Function TBMain() As Long
MsgBox 0, alittle(1)
End Function
Function alittle (less As DWord) As Long
Local a As Integer
Local b As Integer less = -10 ' ?
'less = 10 ' ok
a = 2 b = 200
Function = a*b+less
End Function
' a) result for less = 10 : 410 ok
' b) result for less = -10 : 4294967686 ?
there are few people they are really programming with thinbasic at the moment. background could be summer time? ;)
bye, largo