Next: , Previous: , Up: Procedural Language Interpreter   [Index]

6.11 Non Scalar Function Returns

Allowing functions to return non scalar data requires copying or referencing returned data and making arrangements for later collection.

If functions are to be allowed to return non scalar data an abridged temporaries allocator must be provided for the parser. The later collection arrangement for the returned non scalar data will be made against the provided allocator. Also, the X1f4_A1_LEADCAST bit must be present in the program parsing flags.

See Temporaries Allocator Construct.

See struct x1f4_a1_type.

See Procedural Language Interpreter Generation Flags.

The program parser will allow (upon X1f4_A1_LEADCAST) intrinsic string data returns and referable or copyable data returns. The latter are identified as belonging to data types that allow multiple data references or that can copy data, specifically, data types that set the lead and slip methods in their struct x1f4_datatype_type descriptions.

See struct x1f4_datatype_type.

See Referable Objects.

The object type, though does not fall in any of the enumerated categories, is also allowed for function returns when its type definition is included with the non declarable data type definitions array.

See The Object Type.

Only the intrinsic types and the types described by the datatype_set and sidetype_set arrays in the struct x1f4_a1_type parsing context are considered for allowed return types.