![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_MUL opcode (numeric multiplication) 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_MUL |
| Value | a = pop_value(vm) |
| else | |
| break | |
Implements the OP_MUL opcode (numeric multiplication) in the VM.
Handles the OP_MUL instruction, multiplying two numeric operands and pushing the result. If either operand is a float, multiplication is performed in double precision; otherwise it is 64-bit integer multiplication.
Behavior:
Error Handling:
Example: // Bytecode: OP_MUL // Stack before: [3, 4] // Stack after: [12] // Stack before: [2.5, 4] // Stack after: [10.0]
Definition in file mul.c.
| exit | ( | 1 | ) |
| else |