Simple Virtual Machine - Official plugin type(7)

SYNOPSIS
svm_plugin_type - Simple Virtual Machine official plugin for type management.

DESCRIPTION
This plugin enhances the value type handling, by allowing dynamic type creation and memory allocation.

INVOKATION
This plugin can be added to the Simple Virtual Machine using the directive:
PLUGIN "svmtype.so"

CONTENT

  TYPE type.type
This type contains a value type.

This type can be copied, created by a constant and compared with a weak total order.

  INSTRUCTION type.new ( [ 'AUTO' 'INT' 'STR' 'BLN' 'PTR' 'LIB' 'SYM' 'PEP' 'IRQ' ] | PEP ) -> type.type
This instruction creates a type type: An internal type type when a keyword is given, an external type type when a PEP is given.

This instruction raises a MEMORY interruption when the given PEP is not a defined type.

  INSTRUCTION type.cmp type.type [ = <> < > <= => ] type.type -> BLN
This instruction compares two types.

The relation is a weak total order.

  INSTRUCTION type.extract PTR -> PTR
This instruction gets the types in the memory indicated by the pointer, and returns a pointer on an array of type.type with the types.

  INSTRUCTION type.memory 'GLOBAL' ? ( ( type.type INT ? ) + | PTR ) -> PTR
This instruction allocates a memory zone with either a list of type types with an optional repetition, or from a pointer. When a pointer is specified, the instruction reads the memory at the pointer location for type.type values, and allocates the memory accordingly.

When the GLOBAL keyword is given, the memory is set as global.

  FUNCTION type.new VARIABLE -> type.type
This function creates a type type from an SVM_Type variable.

  FUNCTION type.get type.type -> VARIABLE
This function extracts the SVM_Type variable from a type type.

  FUNCTION type.cmp type.type [ = <> < > <= => ] type.type -> BLN
This function compares two types.

The relation is a weak total order.

SEE ALSO
svm(1) for help on the Simple Virtual Machine.

AUTHOR
The Simple Virtual Machine is designed, implemented and maintained by Julien Bruguier <===EMAILCONTACT===>.