When statement
Jump to navigation
Jump to search
A When statement executes all of the code inside of it the moment the statement is true. This statement acts as a subroutine meaning that whenever it gets finished executing it goes back to the line of code the program was running before it was true.
To implement this you could check every When statement before every line of code is ran.
Psuedocode example:
Int A = 0 While (true){ A++ } When (A == 5){ Print(“A is 5”) }