TYL PROGRAMMING LANGUAGE
▶ TEXT ANALYSIS
Tyl has system variables and a string module that can be used to work with texts.

This is a demonstration of analysing information that is in a settings file 'app.settings':
path 'C:\temp\app.settings'
content io.read path
lines string.lines content
smap { name '' age 0 height 0 isstudent }
not lines ?
print 'settings file is empty!'
lines line ~
  ind string.index line '='
  key string.section line 0 ind
  value getvalue string.section line ( ind + 1 )
  smap key value
  print key + ': ' + value
getvalue value »
result number.of value
not null result ? result
result bool.of value
not null result ? result
value
name: Tony
age: 22
height: 171.5
isstudent: true
To test this program, create a file 'app.settings', with this content:
name=Tony
age=22
height=171.50
isstudent=true


All string functionality can be found in String Module Reference.