Welcome Guest. Please Login or Register. Apr 5th, 2018, 10:55pm
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
If you require a dump of the post on your message board, please come to the support board and request it.
IF (....) STATEMENTS
« Thread started on: Jan 27th, 2014, 04:29am »
Richard; thanks for your Sudoku help. I am still looking into the bitmap stuff. However the code you ended with: IF (num% AND (num%-1)) = 0 THEN just_one_bit_set = TRUE has me confused. I tried the following uses of that form and got these answers: 1. A%=0 B%=0 C%=1 D%=2
IF (D% AND C%)=0 THEN PRINT "YES" ELSE PRINT "NO" ENDIF
2. IF(4 AND 7)<5 THEN PRINT "YES" ELSE PRINT "NO" ENDIF
Then I tried PRINT (4 AND 7) and this gave the answer 4, so I thought maybe it was considering only the first-mentioned number. But 3. IF (7 AND 4)<5 THEN PRINT "YES" ELSE PRINT "NO" ENDIF also gave the answer "YES".
All the above programs gave the answer "YES". Perhaps you dealt with this in your Tutorial notes but I couldn't find it. Can you explain please? Thanks. chrispc
Logged
ScriptBasic Guest
Re: IF (....) STATEMENTS
« Reply #1 on: Jan 27th, 2014, 08:20am »
Quote:
All the above programs gave the answer "YES".
Your examples (1-3) are printing the correct results.