Email or username:

Password:

Forgot your password?
Top-level
Potassium

@neauoire I'm learning uxntal on the weekends, and the new notes are helpful. Thanks!

I still don't quite understand the use-case of leaving unexecuted opcodes on the stack though. In your example you use use quoting to apply an operation recursively to an array, but I imagine that a method could be written which gives identical results but does not use quoting. If that's the case then what's the advantage of writing unexecuted opcodes to the stack? There must be a reason. What am I missing?

1 comment
Devil Lu Linvega

@potassium You won't be needing this in the tutorials, although you might need to be familiar with the context of quoting/unquoting of subroutines.

This is just to illustrate the concept. In a calculator program for example, you might en up having to juggle the opcode literals on the stack.

Sometimes if I need to either do one of two things with a boolean, I might do:

( b -- res ) LIT2 ADD MUL ROT JMP SWP POP #00 STR $1

Go Up