Prequel
primitive recursive driven programming
(This example requires web workers.)
Enter an integer number between 0 and 12.
! = ...
←0
←0
←0
← calls
← instructions
← memory (max use: 0)
n := FACTORIAL.INPUT  result := 1 REPEAT n result *= n+1 ENDREP FACTORIAL.RETURN(result)
FACTORIAL.INPUTThe integer written in the editable text input.-> e.g. 5MODULE.CALL.ARGSHolds the list of arguments passed with MODULE.CALL.-> [arg1, ..., argN]
FACTORIAL.RETURN(result)End computation and show the calculated value.-> result: calculated integer valueMODULE.CALL(&retvar1, ..., &retvarM, @modname, arg1, ..., argN)Start executing module modname, copying N arguments and expecting M return values.-> retvar: name of variable to hold the corresponding return value retval-> modname: name of module to start executing-> arg: value to be copied to the list MODULE.CALL.ARGSAlternative syntax: retvar1, ..., retvarM := MODULE.CALL(@modname, arg1, ..., argN)Note that recursive module calls are not allowed.MODULE.RETURN(retval1, ..., retvalM)Return M values from the current module.Resume execution at the next instruction of the corresponding MODULE.CALL.-> retval: value to be copied to the corresponding variable retvar