![]() |
Fun 0.41.5
The programming language that makes you have fun!
|
Implements the OP_STORE_GLOBAL opcode for storing global variables in the VM. More...
Go to the source code of this file.
Functions | |
| if (idx< 0||idx >=MAX_GLOBALS) | |
| fprintf (stderr, "DEBUG STORE_GLOBAL[%d]: new.type=%d\n", idx, v.type) | |
| free_value (vm->globals[idx]) | |
Variables | |
| case | OP_STORE_GLOBAL |
| Value | v = pop_value(vm) |
| vm | globals [idx] = v |
| break | |
Implements the OP_STORE_GLOBAL opcode for storing global variables in the VM.
This file handles the OP_STORE_GLOBAL instruction, which stores a value into a global variable using its index.
Behavior:
Error Handling:
Example:
Definition in file store_global.c.
| fprintf | ( | stderr | ) |
| free_value | ( | vm-> | globals[idx] | ) |
| if | ( | idx< 0||idx > | = MAX_GLOBALS | ) |
Definition at line 32 of file store_global.c.
| break |
Definition at line 42 of file store_global.c.
Definition at line 41 of file store_global.c.
| case OP_STORE_GLOBAL |
Definition at line 30 of file store_global.c.
Definition at line 36 of file store_global.c.