RUNRESULT

Synopsis
RUNRESULT instructionlist
Description

Runs the instructions in instructionlist. RUNRESULT outputs the empty list if those instructions produce no output. Otherwise, it outputs a list whose only member is the output from running the input instructionlist. This is useful for inventing command-or-operation control structures:

LOCAL "result
MAKE "result RUNRESULT [something]
IF EMPTYP :result [STOP]
OUTPUT FIRST :result

Example
MAKE "thingstodo [FIRST [1 2 3]]
MAKE "answer RUNRESULT :thingstodo
SHOW :answer
[1]

SourceForge.net Logo