Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IMP - Not this old chestnut again
#2
This accomplishes the first code directly:
Code: (Select All)
Input "Which color do you prefer? Pink or Blue: ", C$
If C$ = "Pink" Then
    Print "You're a Girl!"
ElseIf C$ = "Blue" Then
    Print "You're a Boy!" ' Dimster had typo You"re
Else
    Print " Invalid color choice"
End If

Why mess with something simple and straight forward?

The thing about IMP as bit operator (not particularly Logical in human sense) which does need numbers to operate on is that when the premise A is false IMP will return True, does not matter what 2nd premise B is true or false.
This completes the Truth Table for doing bit operations and the sole reason why IMP exists, so you can have a special set of results for each combination TF premise A and TF premise B. If A is false it returns True regardless what B is.
b = b + ...
Reply


Messages In This Thread
IMP - Not this old chestnut again - by Dimster - 10-16-2024, 02:57 PM
RE: IMP - Not this old chestnut again - by bplus - 10-16-2024, 04:01 PM
RE: IMP - Not this old chestnut again - by Pete - 10-16-2024, 10:25 PM



Users browsing this thread: 3 Guest(s)