Libraries |
|
Struct | Source Code |
|
|
Abstract data types | |||||
type |
| ||||
type |
| ||||
type |
| ||||
type |
| ||||
type |
| ||||
type |
|
new struct
const func type: new struct (ref proc: elem_decl) end struct
-
Structure type with elements defined in elem_decl.
const type: point is new struct var integer: xPos is 0; var integer: yPos is 0; end struct;
- Parameters:
- elem_decl - Declarations of the struct elements.
new struct end struct
const func type: new struct end struct
-
Structure type with no elements.
const type: emptyStruct is new struct end struct;
new
const func type: new (in type: baseType) struct (ref proc: elem_decl) end struct
-
Derived structure type with elements defined in elem_decl. Create new structure type as subtype of baseType, which is not a structure.
const type: point is new object struct var integer: xPos is 0; var integer: yPos is 0; end struct;
- Parameters:
- baseType - Base type from which the new type is derived.
- elem_decl - Declarations of the struct elements.
new
const func type: new (in type: baseType) struct end struct
-
Derived structure type with no elements. Create new empty structure type as subtype of baseType, which is not a structure.
const type: emptyStruct new object struct end struct;
- Parameters:
- baseType - Base type from which the new type is derived.
sub
const func type: sub (in type: baseType) struct (ref proc: elem_decl) end struct
-
Structure type with inherited elements and elements defined in elem_decl. Create new structure type as subtype of baseType, which is a structure type. The new structure type inherits all elements of the structure type baseType.
const type: null_file is new struct var char: bufferChar is '\n'; end struct;
const type: external_file is sub null_file struct var clib_file: ext_file is CLIB_NULL_FILE; var string: name is ""; end struct;
- Parameters:
- baseType - Base type from which the new type is derived and inherits all elements from baseType as well.
- elem_decl - Declarations of the struct elements.
sub
const func type: sub (in type: baseType) struct end struct
-
Structure type with inherited elements and no own elements. Create new structure type as subtype of baseType, which is a structure type. The new structure type has the same elements as the structure type baseType.
const type: null_file is new struct var char: bufferChar is '\n'; end struct;
const type: special_file is sub null_file struct end struct;
- Parameters:
- baseType - Base type from which the new type is derived and inherits all elements from baseType as well.
|
|