Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
call [2019/06/30 21:11] neilscall [2019/12/10 07: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"
 +