![]() |
Fun 0.41.5
The programming language that makes you have fun!
|
Implements the OP_GT opcode for greater-than comparison in the VM. More...
Go to the source code of this file.
Functions | |
| if (a.type !=VAL_INT||b.type !=VAL_INT) | |
| push_value (vm, make_int(a.i > b.i ? 1 :0)) | |
| free_value (a) | |
| free_value (b) | |
Variables | |
| case | OP_GT |
| Value | a = pop_value(vm) |
| break | |
Implements the OP_GT opcode for greater-than comparison in the VM.
This file handles the OP_GT instruction, which checks if the first value is greater than the second. The values are popped from the stack, and the result (1 or 0) is pushed back.
Behavior:
Error Handling:
Example:
Definition in file gt.c.
| free_value | ( | a | ) |
| free_value | ( | b | ) |
| push_value | ( | vm | , |
| make_int(a.i > b.i ? 1 :0) | ) |