![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_SUB opcode (numeric subtraction) in the VM. More...

Go to the source code of this file.
Functions | |
| if ((a.type==VAL_INT||a.type==VAL_FLOAT) &&(b.type==VAL_INT||b.type==VAL_FLOAT)) | |
| exit (1) | |
Variables | |
| case | OP_SUB |
| Value | a = pop_value(vm) |
| else | |
| break | |
Implements the OP_SUB opcode (numeric subtraction) in the VM.
Handles the OP_SUB instruction, subtracting two numeric operands and pushing the result. If either operand is a float, subtraction is performed in double precision; otherwise it is 64-bit integer subtraction.
Behavior:
Error Handling:
Example: // Bytecode: OP_SUB // Stack before: [10, 4] // Stack after: [6] // Stack before: [10.0, 3] // Stack after: [7.0]
Definition in file sub.c.
| exit | ( | 1 | ) |
| else |