record

Syntax record (value)

Params value is the object whose datatype you wish to convert to recordType.

Action Converts value to a record representation. Only a few specialized data formats can be converted to records.

Returns The resulting record if coercion is successful, an error condition otherwise.

Examples record ({\}) // an empty list can be coerced to an empty record

   » {\}

with objectModel {record (word [1].character [3])}

   » {'want':character, 'from':word [1], 'form':indexKey, 'seld':3}

In this example, an object specifier is converted to a record

record ("error")

   »

This example produces the error "Can't coerce a string value to a record."

Notes Most scalar values cannot be coerced to a record value.

See Also list

coerceValue

Discuss