Latest OxygenBasic.zip at GitHub (Click on the Wizard)
0 Members and 1 Guest are viewing this topic.
uses consoleword MyWord = 65535print "Brian: Oxygen... what is MyWord?" chr(13, 10)print "Oxygen: " + str(MyWord) chr(13, 10)print "Brian: And what is -1?" chr(13, 10)print "Oxygen: " + str(-1) chr(13, 10)print "This must mean MyWord <> -1..." chr(13, 10)if MyWord <> -1 then print "Oxygen: Yes." chr(13, 10) print "Brian: Ok." chr(13, 10)else print "Oxygen: No." chr(13, 10) print "Brian: Do you mean 65535 = -1?" chr(13, 10) if 65535 = -1 then print "Oxygen: Yes." chr(13, 10) print "Brian: Huh?..." chr(13, 10) else print "No." chr(13, 10) print "Brian: But MyWord, which a WORD... and contains 65535 = -1?" chr(13, 10) if MyWord = -1 then print "Oxygen: Yes." chr(13, 10) print "Brian: Well... yes, bitwise it is, but a WORD cannot compare equal to a negative number..." chr(13, 10) if MyWord = -1 then print "Oxygen: Yes it can." chr(13, 10) print "Brian: Im gonna snitch on you! I will tell Charles about your behavior!" chr(13, 10) else print "Oxygen: You are right..." chr(13, 10) end if else print "Oxygen: My bad... it isn't." chr(13, 10) print "Brian: Ok." chr(13, 10) end if end ifend if