TYL PROGRAMMING LANGUAGE
▶ RECORDS
Tyl Record is an ordered collection of key-value pairs, that map strings to Tyl variables.
Record Variable Declaration
Say we have a shape named: 'Circle', with area: 986.96, and perimeter: 40.

We could store that data in shape_name, shape_area, shape_perimeter variables:
shape_name 'Circle'
shape_perimeter 40
shape_area 986.96
As we see, all variables are characteristics of the shape, and it could be useful to hold these variables in a container:

      shape
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
name:       Circle
perimeter:  40
area:       986.96


And that's the record variable:
shape { }
In line: shape { }, shape is the record name, and the curly braces: { }, are an empty record key-value list. This type of declaration is called: implicit declaration, meaning that the record, along with its key-value list are declared in this declaration template.
Record declaration should be in its own line.

Attention: The curly braces are mandatory in records that are declared implicitly!


An example with key-value list:
shape { name 'Circle', perimeter 40, area 986.96 }
Comma symbols are not mandatory, and can be omitted:
shape { name 'Circle' perimeter 40 area 986.96 }
If the value is a string without space characters, apostrophe symbols can be ommited:
shape { name Circle perimeter 40 area 986.96 }
While debugging, it's useful to print the record:
shape { name Circle perimeter 40 area 986.96 }
print shape
shape: {
 name: 'Circle'
 perimeter: 40
 area: 986.96
 }
In Tyl records it is possible to have keys with space characters in them, but they should be written with apostrophes:
shape { 'shape name' Circle 'shape area' 986.96 }
PART 2