TYL PROGRAMMING LANGUAGE
▶ INPUT DATA
Tyl Launcher has a run box, which is a text box that the user can enter text in it. Usually, Tyl programs don't need to get any data from the user, and the program's data is written or calculated in it.

If data should come from the user, use the input function along with a variable:
input num
input function causes the system to show a prompt text: '> ', in the run box. After the user enters text, it is being assigned to num variable.

Consider this program:
num 0
print 'Please enter a number:'
input num
print 'Number is: ' + num
Please enter a number:
> 10
Number is: 10
After the user enters: 10, the value of num will be: 10.

What happens when the user doesn't enter a number?

Let's modify it:
num 0
in_num
print 'Please enter a number:'

on ~
input in_num
num number.of in_num
not null num ? %
print 'Not a number!'
^

print 'Number is: ' + num
Please enter a number:
>
Not a number!
> a
Not a number!
> 3.6
Number is: 3.6
We let the user enter text until he enters a valid number, using number.of system function that checks if a variable is a number and returns it as a number.

input function can be used in a conditional statement, to ensure that text was entered:
text
print 'Please enter a text:'

on ~
input text ? %
print 'No text entered!'
^

print 'Text is: `' + text + '`'
Please enter a text:
>
No text entered!
> Tahity
Text is: 'Tahity'
Statement: input text, returns the text variable. If no text entered, than text will be an empty string variable, so the conditional statement: input text, will yield FALSE, otherwise - looping will terminate by the break statement.