Tyl Programming Language
▶ STRINGS
String is a collection of characters.
Consider this program:
main »
 name 'Eitan'
print name
Eitan
Tyl identifies a value as string, only if it is enclosed in (single) quotaion marks (').
First we assign the string value: 'Eitan', to the name string variable. As mentioned earlier, name variable gets its type upon assignment.
We can print a string directly:
main »
print 'Eitan'
Eitan
What if we wanted to print: name: 'Eitan'?

We could't write ''Eitan'', because the internal quotations will not be interpreted as quotation marks for printing.

So we use the backward quotation mark (`):
main »
print 'name: `Eitan`'
name: 'Eitan'
The backward quotation mark (`) inside a quoted string, will cause the system to print quotation mark.

Strings can be added by the '+' operator:
main »
 full_name 'Eitan' + ' ' + 'Livne'
print full_name
Eitan Livne
Other options of adding variables and string literals:
main »
 name 'Eitan'
 family_name 'Livne'
 full_name1 name + ' ' + 'Livne'
 full_name2 name + ' ' + family_name
print full_name1
print full_name2
print name + ' ' + family_name
Eitan Livne
Eitan Livne
Eitan Livne
Assigning a variable to a new variable:
main »
 my_city 'Pucon'
 your_city my_city
print my_city + ', ' + your_city
print 'Now you are leaving my city...'
 your_city 'Chillan'
print my_city + ', ' + your_city
Pucon, Pucon
Now you are leaving my city...
Pucon, Chillan
In line: 'your_city my_city', your_city variable gets the value of my_city variable, so their value is the same.
Then, your_city variable is assigned another value. Each time, the values of my_city and your_city are printed.