Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
call [2019/06/30 22:11]
neils
call [2019/12/10 08:56] (current)
neils
Line 4: Line 4:
  
 Syntax: Syntax:
-  call <proc_name> [(<argument1>, <argument2>, ...)]+  [call<proc_name> [(<argument1>, <argument2>, ...)]
  
 The ''CALL'' command calls a procedure.    The ''CALL'' command calls a procedure.   
Line 11: Line 11:
  
 See [[proc|PROC ... ENDPROC]] for more information and examples. See [[proc|PROC ... ENDPROC]] for more information and examples.
 +
 +Since version 2.2, the ''CALL'' keyword as well as the parentheses can be omitted and thus procedures can be called as if they were commands. For example:
 +
 +  const LT_BLUE = 14
 +  
 +  rem ** Clears the screen and sets color **
 +  proc cls(color!)
 +    memset $0400, 1000, 32
 +    memset $d800, 1000, color!
 +  endproc
 +  
 +  rem ** Call the routine **
 +  cls LT_BLUE
 +  print "screen cleared"
 +