up previous next
fields

list the fields of a record

Syntax
fields(R: RECORD): LIST

Description
This function returns a list of all of the fields of the record R . It is particularly useful when you want to know if a record field has been defined

Example
/**/  rec := record[name := "David", number := 3728852, data := ["X","Y"] ];
/**/  fields(rec);
["data", "name", "number"]

/**/  rec.data;
["X", "Y"]

/**/  "surname" IsIn fields(rec);
false

See Also