Created
November 9, 2018 14:52
-
-
Save TLMcode/70dc42c4f6219a57905bad43ae48a2c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stop := 0 | |
While ( Stop = 0 ) ; 786, 33 1096, 70 ; << PARAMETER VALUES COMMENTED OUT!! | |
{ | |
msgbox % "While Loop #1`nStop's value: " ( ( Stop ) ? "true" : "false" ) | |
Stop = 1 | |
; ^^ this evaluates the while expression true | |
} | |
msgbox % "After loop exit`nStop's value: " ( ( Stop ) ? "true" : "false" ) | |
; ^^ seeing this proves the while loop evaluated false and broke | |
msgbox % ( Stop = 0 ) 786, 33 1096, 70 ( 'broken' command parameter, press any button ) | |
; ^^ in most command & function parameters, this will fail. | |
Stop := 0 | |
While ( Stop = 0 ) 786, 33 1096, 70 | |
{ | |
msgbox % a_index > 1 ? "0x1" : 0,, % "While Loop #2`nStop's value: " ( ( Stop ) ? "true" : "false" ) "`n`nRegardless of Stop's value, the expression is broken so the loop will never exit.`n( watch 'Stop's value' above! )" | |
IfMsgBox Cancel | |
break | |
Stop = 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment