Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
List of QB64 Constants?
#5
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)


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
Reply


Messages In This Thread
List of QB64 Constants? - by dcromley - 05-05-2022, 04:49 PM
RE: List of QB64 Constants? - by Pete - 05-05-2022, 05:31 PM
RE: List of QB64 Constants? - by bplus - 05-05-2022, 05:40 PM
RE: List of QB64 Constants? - by Pete - 05-05-2022, 05:46 PM
RE: List of QB64 Constants? - by dcromley - 05-05-2022, 08:31 PM
RE: List of QB64 Constants? - by SMcNeill - 05-06-2022, 07:53 AM



Users browsing this thread: 7 Guest(s)