Sets a instruction to value.
Since it is rather bothersome to keep certain values (like handles or strings) around by manipulating the stack, it'd be nice to be able to refer to them directly.
SET allows to define a value of a instruction for the scope of the script's
SET will put the second topmost item off the stack (
v) into the
instruction referenced by top item (
PumpkinDB> "key" 'key SET [`key "value" ASSOC COMMIT] WRITE [key RETR] READ "value"
Allocates on the heap for the binary form definition.
EmptyStack error if there are less than two items on the stack
It will error if the format of the instruction is incorrect
It may error if this instruction is a built-in instruction that was previously defined.
works : 1 'val SET 1 val EQUAL?. empty_stack : [SET] TRY UNWRAP 0x04 EQUAL?. empty_stack_1 : ['a SET] TRY UNWRAP 0x04 EQUAL?.