TYL PROGRAMMING LANGUAGE
▶ RECORDS ACCESS & EDIT
Editing Records
Editing a record is done by appending the value statement to the record access key/variable:
product.name 'Fluorescent Light Bulb'
product name will be set to: 'Fluorescent Light Bulb'.

Other options to edit a record:
product name 'Fluorescent Light Bulb'

key 'name'
value 'Fluorescent Light Bulb'
product key value

values 'LED Light Bulb', 'Fluorescent Light Bulb'
product key values 1
In all record edit statements, product name will be set to: 'Fluorescent Light Bulb'. In line: product key values 1, the section: values 1, is the value statement, so the second item of values list will be the new value of product name.

Adding a key to a record is done by setting a value to a non-existent key:
product.price 10.0
price key is added to product.

Removing a key is done by appending the remove code: '->', to the key:
product.price ->
price key is removed from product.

Consider this program:
product { cat 'Electrical' name 'LED Light Bulb' }
print product
product.price 10.0
print product
removed_price product.price ->
print product
print
print 'removed price: ' + removed_price
product: {
 cat: 'Electrical'
 name: 'LED Light Bulb'
 }
product: {
 cat: 'Electrical'
 name: 'LED Light Bulb'
 price: 10
 }
product: {
 cat: 'Electrical'
 name: 'LED Light Bulb'
 }

removed price: 10
In line: 'removed_price product.price ->', removed_price gets the value of the item that is removed from product.
PART 2
PART 4