search for: shouldistop

Displaying 1 result from an estimated 1 matches for "shouldistop".

2013 Sep 15
1
Executing a code until a new user input aborts it (readlines?)
Hi, I know that with readlines you can start executing a code upon user input. What I would like to do is to have the ability to abort a code based on a new user input. E.g. when the user hits enter the code stops running. That is, I would periodically check for a user input and stop the code when the correct input was entered. Below is an example of a function which would run an endless loop