#Change to "If" statement and an "If Else" statement

5 messages · Page 1 of 1 (latest)

urban onyx
#

Howdy, soo this suggestion is a little hard to explain, but my idea is a possible change to the "If" Statement or an entirely different code.

This new "If" statement would, instead of being "If (variable) =/= 0" it would be "if (Variable) = (Variable)" This would allow for WAY easier coding in some ways.

Don't worry however, if you still want a "(variable) =/= (variable)" that would be what "If Else" would be for. The "If Else" Code would check if said variable is NOT the chosen variable. Basically just what the "If" statement is now but with any number.

Why would this make coding better though? This would allow for much easier detection. The best example i could think of currently is a Timer. You would add 1 to a variable and when it detects "60" it would reset it back to 0 (Shown in image). Overall, this keeps the functionality with "If Else" and adds function, I personally see no reason to not add this. Any thoughts, critiques, or additions would be nice :]

Anyway, thanks for reading, - Dizzy

spare badger
#

Just do
EQUAL R0 R1 === constant(...)
IF R0

Its exactly as you are implying and is only 2 code blocks.

#

Instead of 1

urban onyx
regal flower
#

for your example you can also just start at 60 and count down and use the if to goto loop