User Tools

Site Tools


crpl:docs:call

Differences

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

Link to this comparison view

Next revision
Previous revision
crpl:docs:call [2013/01/14 13:40] – created virgilwcrpl:docs:call [2022/06/25 13:17] (current) – Better example Karsten75
Line 1: Line 1:
-TODO+ 
 +<- [[crpl:crplreference| CRPL reference]] <- [[crpl:crplreference#vars_and_functions|Vars and Functions]] 
 + 
 +=====  @FUNC_NAME  ===== 
 + 
 +===== Syntax ===== 
 + 
 +@FUNCTIONNAME 
 + 
 +===== Description ===== 
 + 
 +Invokes a function named **FUNCTIONNAME**. Execution passes to said function and returns to the statement  
 +after the call when the function is complete. Arguments can be passed to and received from functions via the stack. 
 +=== Examples === 
 + 
 +<code 4rpl> 
 +3 4 @MyMathFunction Trace  # will print 9 to the stack (3 * 4 - 3) 
 + 
 +:MyMathFunction 
 +   ->b ->        # read 2 items from the stack 
 +   <-a <-b * <-a - # multiply both and subtract the first 
 +</code>  
crpl/docs/call.1358188845.txt.gz · Last modified: 2014/10/01 15:02 (external edit)