Code: (Select All)
Option _Explicit
_Title "Naht a problem" ' B+ 2022-11-16
DefLng A-Z
Dim a, b, c
a = 10
b = -20
c = 0
Print
Print "1: naht(a), naht(b), naht(c)"
Print naht(a), naht(b), naht(c)
Print
Print "2: Anned&(a, b), Anned&(a, c), Anned&(b, c)"
Print Anned&(a, b), Anned&(a, c), Anned&(b, c)
Print
Print "3: Anned&(naht(a), b), Anned&(naht(a), c), Anned&(naht(b), c) "
Print Anned&(naht(a), b), Anned&(naht(a), c), Anned&(naht(b), c)
Print
Print "4: Anned&(naht(a), naht(b)), Anned&(naht(a), naht(c)), Anned&(naht(b), naht(c)) "
Print Anned&(naht(a), naht(b)), Anned&(naht(a), naht(c)), Anned&(naht(b), naht(c))
Print
Print "5: naht(Anned&(naht(a), naht(b))), naht(Anned&(naht(a), naht(c))), naht(Anned&(naht(b), naht(c))) "
Print naht(Anned&(naht(a), naht(b))), naht(Anned&(naht(a), naht(c))), naht(Anned&(naht(b), naht(c)))
Print: Print "Guten Nacht"
End
Function naht& (x&)
If x& = 0 Then naht& = -1
End Function
Function Anned& (a&, b&)
If (a& <> 0) Then
If b& <> 0 Then
Anned& = -1
End If
End If
End Function
EDIT: naht& bAnd&, Anned&
b = b + ...