TYL PROGRAMMING LANGUAGE
▶ DATA PERSISTANCE
Tyl has a storage module that can be used to store data between program runnings.

This is an example of storing list of items:
≡ check if storage list exists
hasnumskey storage.exists 'nums'
print 'nums key exists: ' + hasnumskey
≡ get and print storage nums
print 'storage nums: ' + storage.get 'nums'
≡ create nums key if not exists
nums
storage.set 'nums' nums
≡ assign nums from storage
nums storage.get 'nums'
≡ print length of nums
numslen len nums
print 'length of nums: ' + len nums
≡ add item to storage nums
nums numslen ++
storage.set 'nums' nums
≡ get and print storage nums after setting
print 'storage nums: ' + storage.get 'nums'
nums key exists: NULL
storage nums:
length of nums: 0
storage nums: [ 1 ]
In the first run, the storage item is empty, and its value is set to 1. On subsequent runnings an incremented value is added to the list.

All storage functionality can be found in Storage Module Reference.