Working without GOTO:
While EX<>1
EX = TextWindow.Read()
If EX = 1 Then
Program.End()
EndIf
If EX = 2 Then
TextWindow.WriteLine("heyo")
Else
TextWindow.WriteLine(EX)
EndIf
EndWhile
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
One question: even tho it's not related to loop (I think) , however, what command will I use if I want for my program to never show "Press any key to continue" in the end and always have the space to write ([TextWindow.Read()]) until I close the window or use Program.End()?
Example: EX = TextWindow.Read()
If EX = 1
Program.End()
EndIf
If EX = 2
TextWindow.WriteLine("heyo")
whenever I finish that program and type 2 it will say heyo and the "Press any key to continue..." but I want to always be possible to rewrite an answear. If my explanation was a little confusing.. I just want to write all the time '-'
Working without GOTO:
While EX<>1
EX = TextWindow.Read()
If EX = 1 Then
Program.End()
EndIf
If EX = 2 Then
TextWindow.WriteLine("heyo")
Else
TextWindow.WriteLine(EX)
EndIf
EndWhile
(translated by Google translator)
Hi Cold.
I think now you can use the following code:
MyLoop:
EX = TextWindow.Read()
If EX = 1 Then
Program.End()
Else
TextWindow.WriteLine("hello")
Goto MyLoop
EndIf
Then you will learn not to use the "Goto" command.
I wish you success. :)