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

Go to the source code of this file.
Functions | |
| if (a.type !=VAL_ARRAY||b.type !=VAL_ARRAY) | |
| free_value (a) | |
| free_value (b) | |
| push_value (vm, out) | |
Variables | |
| case | OP_ZIP |
| Value | a = pop_value(vm) |
| Value | out = bi_zip(&a, &b) |
| break | |
Implements the OP_ZIP opcode for array zipping in the VM.
This file handles the OP_ZIP instruction, which combines two arrays into an array of pairs (subarrays with two elements).
Behavior:
Error Handling:
Example: // Bytecode: OP_ZIP // Stack before: [[1,2], ['a','b']] // Stack after: [[[1,'a'], [2,'b']]]
Definition in file zip.c.
| free_value | ( | a | ) |
| free_value | ( | b | ) |
| push_value | ( | vm | , |
| out | ) |