05-05-2022, 08:31 PM
(This post was last modified: 05-05-2022, 08:37 PM by dcromley.
Edit Reason: added a line in code is
)
You guys crack me up!
@pete What I was interested in is constants defined by QB64 so I wouldn't have to define them.
@Sprezzo LOL!
@bplus I like the "without erroring out" approach.
@pete FWIW, run the code (I don't think it's worth too much)
@pete What I was interested in is constants defined by QB64 so I wouldn't have to define them.
@Sprezzo LOL!
@bplus I like the "without erroring out" approach.
@pete FWIW, run the code (I don't think it's worth too much)
Code: (Select All)
DefStr S
' const INFP = 1/0, INFM = -1/0 ' NG
Dim INFP, INFM
INFP = 1 / 0 ' + infinity
INFM = -1 / 0 ' - infinity
Print "Is 1 < INFP ? "; sTF(1 < INFP)
Print "Is 1 > INFP ? "; sTF(1 > INFP)
Print "Is 1 < INFM ? "; sTF(1 < INFM)
Print "Is 1 > INFM ? "; sTF(1 > INFM)
Print "Is INFM < INFP ? "; sTF(INFM < INFP)
Print "Is INFM > INFP ? "; sTF(INFM > INFP)
Print "Is 1/0 = INFP ? "; sTF(1 / 0 = INFP)
Function sTF (x)
If x Then sTF = "True" Else sTF = "False"
End Function