update internals 8
Documentation Version for Comments and Changes
You are invited to make any changes...add any comments.
Changes will `eventually` be merged into the offical documentation.
Leave any commnents here...
...
... back to index page OE documentation
some may serve as pointers to arbitrary EUPHORIA objects. As a developer of EUPHORIA itself, rather than a developer that uses EUPHORIA, it is important to know exactly what these opcodes do and what they are for. In this section we will document what they are for, and how they manipulate the instruction pointer, and stack.
IF instruction:
The IF instruction is used for making runtime branch statements. The IF instruction takes the top of the stack as the condition value, if the condition is 0, it passes control to the address stored just below the top of the stack. If the condition is non-zero and an atom the instruction pointer just past the failure address.
[ IF instruction ] [ test value ] [ failure address ]
INTEGER_CHECK instruction:
The INTEGER_CHECK is used to ensure that something has a value considered to be 'integer' to the EUPHORIA language definition. The instruction takes the next argument as a pointer to a value and determines whether this value is in the legal integer range, regardless of how that number is represented. If not in legal range, then the program ends execution in a type-check failure error message.
[ INTEGER_CHECK instruction ] [ test pointer ]
ATOM_CHECK instruction:
The ATOM_CHECK is used to determine whether something has a numeric value rather than a sequence. The instruction takes an argument as a pointer to a value and determines whether the value is an atom. If it is not an atom, then the program ends execution in a type-check failure error message.
[ ATOM_CHECK instruction ] [ test pointer ]
IS_AN_INTEGER instruction:
The IS_AN_INTEGER instruction is used to determine whether something has a value considered to be 'integer' to the EUPHORIA language definition. The instruction takes the argument as a pointer to a value and determines whether this value is in the legal integer range, regardless of how that number is represented. If it is in the 'integer' range then the value pointed by the second argument will be 1 otherwise it will be 0.
[ IS_AN_INTEGER instruction ] [ test pointer ][ return value pointer ]
Not Categorized, Please Help
|