Record Values

When you have a named record, you can assign it values - either static or variable.

Two record values of type rec_t are
[ Symbol='T'; | Shares=10; Price=20.15; ]
[ Symbol='GM'; | Shares=5; Price=16.81; ]
You can assign a record variable. The following declares a record variable and assigns a record value to it:
rec_t rec := [ Symbol='T'; | Shares=10; Price=22.88; ];

To get the value of a field in a record, you use the "." operator. For instance, the expression rec.Symbol returns the string "T".

Record values can be null. An attempt to access a field in a null record returns null.

You can change the value of a field in a record without having to recreate a new one. This example changes the value of the Shares field to 80:
rec.Shares := 80;