Subroutines

Subroutines are a way for the user to encapsulate a chunk of activity code and refer to it via a simple function call-like syntax. They may be defined via a subroutine_def statement, and thereafter, called just like any other function, with the difference that subroutines do not take any arguments.

Format:

subroutine_def [name]() { [statements] }

Examples

subroutine_def log_message_on_client {
	 ifonclient { 
	     JS< console.log(Env.message) >JS
	 } 
 }