User Tools

Site Tools


crpl:docs:call

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
crpl:docs:call [2021/02/05 11:43] – Rmoved discussion tag Karsten75crpl:docs:call [2022/06/25 13:17] (current) – Better example Karsten75
Line 4: Line 4:
 =====  @FUNC_NAME  ===== =====  @FUNC_NAME  =====
  
-^Arguments^Result^Notation^ +===== Syntax =====
-| | |''(user defined) ''|+
  
 +@FUNCTIONNAME
  
-=== Description === +===== Description ===== 
-Invokes a function.  + 
-Execution passes to the function that is named and returns to the statement  +Invokes a function named **FUNCTIONNAME**. Execution passes to said function and returns to the statement  
-after the call when the function is complete.  +after the call when the function is complete. Arguments can be passed to and received from functions via the stack.
-Arguments can be passed to and received from functions via the stack.+
 === Examples === === Examples ===
-Example for [[crpl:docs:func|:FUNC_Name]] + 
-<code> +<code 4rpl
-invoke the function defined as an example at :FUNC_NAME  +3 4 @MyMathFunction Trace  will print 9 to the stack (3 * 4 - 3) 
-with the value "35" to get a 35% chance of making  + 
-rapid (speed 100) move.  +:MyMathFunction 
-35 @chance if  +   ->b ->        read 2 items from the stack 
- 100 @relocate #Move quickly  +   <-<-b * <-a - multiply both and subtract the first
- endif+
 </code>  </code> 
  
crpl/docs/call.1612543437.txt.gz · Last modified: 2021/02/05 11:43 by Karsten75