call( <"label"> )

Description

This branches to the specified label (much like the go() command), however it remembers the location that you 'called' from in order that you can later return() back to that location. In this way, you can implement basic subroutines.

Example / explanation

Consider:
[...file opened...]
set F to 101
call("outputpage")

set F to 102
call("outputpage")

[...file closed...]
terminate()

.outputpage
  selectframe(F)
  set B to status(frames)
  if (B = 0) appendframe(F)
  if (B ! 0) appendframes(F)

  return()

What will happen, is...

Set 'F', our frame number, to 101.
Call 'outputpage'.
Outputpage: Select the given frame, in this case 101.
Outputpage: Are there any subframes?
Outputpage: If there are NO subframes, write the frame to the file.
Outputpage: If yes, write the frames (all of them) to the file.
Outputpage: Return to caller.
Set 'F', our frame number, to 102.
Call 'outputpage'.
Outputpage: Select the given frame, in this case 102.
Outputpage: Are there any subframes?
Outputpage: If there are NO subframes, write the frame to the file.
Outputpage: If yes, write the frames (all of them) to the file.
Outputpage: Return to caller.

Specifics

Under RISC OS, you may only call() to a maximum of 16 levels deep. The Windows script interpreter has no such limitation.
Note, also, that the RISC OS script interpreter only permits up to 16 labels to be defined, which may prove more restictive.