Page 1 of 1

Multiple variables in a "IF" statement

Posted: Thu Feb 18, 2021 7:12 pm
by Zim

Code: [Local Link Removed for Guests]

D1 = 5
D2 = 4
D3 = 0
D4 = 2
txt2$ = "hello"
nums = 2
cnte = 2

' three conditions and four outcomes eq. below

if (D1 = 9) and (D2 = 4) and (txt2$ = "hello") then
  nums = 7                   
  txt2$ = "goodbye"
  cnte = 5
  D4 = 22
endif


I am a beginner too, so if you see an error, please feel free to comment or correct me!

The AND , OR keywords can be used between the expressions as long as they are in parenthesis.

:)