TYL PROGRAMMING LANGUAGE
▶ NULLITY
If a programmatic component does not have a value, it is said to be NULL. But in Tyl its meaning is extended to mean also not exist or does not have items.
Nullity of Tyl Components
does not have value
list is empty
record does not have any key
record key does not exist
Nullity check in Tyl is implemented by null system function:
print 'scalar:'
a
print null a
print 'assign value'
a 1
print null a
print
print 'list:'
data [ ]
print null data
print 'add item'
data <- 1
print null data
print 'clear list'
data ->->
print null data
print
print 'record:'
rec { }
print null rec
print 'add key with value'
rec 1 'a'
print null rec
print null rec 1
print 'add key without value'
rec 2
print null rec 2
scalar:
true
assign value
false

list:
true
add item
false
clear list
true

record:
true
add key with value
false
false
add key without value
true