![]() | Fun 0.41.5 The programming language that makes You have fun |
Implements the OP_INDEX_GET opcode for array and map indexing in the VM. More...

Go to the source code of this file.
Functions | |
| if (container.type==VAL_ARRAY) | |
| exit (1) | |
Variables | |
| case | OP_INDEX_GET |
| Value | container = pop_value(vm) |
| else | |
| break | |
Implements the OP_INDEX_GET opcode for array and map indexing in the VM.
This file handles the OP_INDEX_GET instruction, which retrieves an element from an array or a value from a map using an index or key.
Behavior:
Error Handling:
Example: // Bytecode: OP_INDEX_GET // Stack before: [1, [10, 20, 30]] // Stack after: [20]
Definition in file index_get.c.
| exit | ( | 1 | ) |
| break |
Definition at line 70 of file index_get.c.
| Value container = pop_value(vm) |
Definition at line 35 of file index_get.c.
| else |
Definition at line 65 of file index_get.c.
| case OP_INDEX_GET |
Definition at line 33 of file index_get.c.