Note that fun is not called immediately but after pressing the RETURN key.
If input_to() is called more than once in the same execution, only the first call has any effect.
The optional argument <flag> may be a binary-OR ('|') of the following option values
The optional 3rd and following args will be passed as second and subsequent args to the function fun. (This feature is was added only recently, to avoid the need for global variables)
void func() {
...
write("Please enter your name:");
input_to("enter_name");
...
}
enter_name(string str) {
write("Is '"+str+"' really your name?? *giggle*\n");
...
}
When reaching the input_to() statement the driver
continues the function func() but also asks the user for
input. If you entered whatever is asked and press RETURN the
driver will invoke the enter_name() function with the
string you entered as argument to it.