Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ternary operator
#6
Code: (Select All)
For a = -1 To 1
    x = Val(Iff$(a <> 0, _Trim$(Str$(20 / a)), "0"))
    Print x
Next

Function Iff$ (Bool&, true$, false$)
    If Bool& <> 0 Then Iff$ = true$ Else Iff$ = false$
End Function
b = b + ...
Reply


Messages In This Thread
Ternary operator - by Kernelpanic - 10-30-2023, 09:57 PM
RE: Ternary operator - by DSMan195276 - 10-30-2023, 10:45 PM
RE: Ternary operator - by bplus - 10-30-2023, 11:08 PM
RE: Ternary operator - by Kernelpanic - 10-30-2023, 11:50 PM
RE: Ternary operator - by DSMan195276 - 10-31-2023, 01:13 AM
RE: Ternary operator - by Kernelpanic - 10-31-2023, 03:36 PM
RE: Ternary operator - by bplus - 10-31-2023, 01:37 AM
RE: Ternary operator - by DSMan195276 - 10-31-2023, 01:49 AM
RE: Ternary operator - by bplus - 10-31-2023, 02:02 AM



Users browsing this thread: 1 Guest(s)