![]() |
Fun 0.41.5
The programming language that makes you have fun!
|
Implements the OP_INDEX_SET opcode for array and map assignment in the VM. More...
Go to the source code of this file.
Functions | |
| fprintf (stderr, "DEBUG INDEX_SET: container.type=%d idx.type=%d value.type=%d\n", container.type, idx.type, v.type) | |
| if (container.type==VAL_ARRAY) | |
| exit (1) | |
Variables | |
| case | OP_INDEX_SET |
| Value | idx = pop_value(vm) |
| Value | container = pop_value(vm) |
| else | |
| break | |
Implements the OP_INDEX_SET opcode for array and map assignment in the VM.
This file handles the OP_INDEX_SET instruction, which assigns a value to an element in an array or a key in a map.
Behavior:
Error Handling:
Example:
Definition in file index_set.c.
| exit | ( | 1 | ) |
| fprintf | ( | stderr | ) |
| if | ( | container. | type = = VAL_ARRAY | ) |
Definition at line 40 of file index_set.c.
| break |
Definition at line 66 of file index_set.c.
Definition at line 35 of file index_set.c.
| else |
Definition at line 62 of file index_set.c.
Definition at line 34 of file index_set.c.
| case OP_INDEX_SET |
Definition at line 32 of file index_set.c.