User Tools

Site Tools


4rpl:commands:call

Differences

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

Link to this comparison view

4rpl:commands:call [2021/01/13 18:19] – created virgilw4rpl:commands:call [2021/01/15 08:34] (current) – added H1 and H2 headers, fixed and clarified faulty example Sanian
Line 2: Line 2:
 <=[[4rpl:start| Index]] <=[[4rpl:start| Index]]
  
-=== Syntax === +====== Function Call ======
-@FUNCTIONCALL+
  
-=== Description === +===== Syntax =====
-Invokes a function named FUNCTIONCALL  +
-Execution passes to the function that is named 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 === +@FUNCTIONNAME 
-<code 4rpl>trace(@MyMathFunction(3 4))+ 
 +===== 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 - 3)
  
 :MyMathFunction :MyMathFunction
-   <-b <-a *+   ->->        # read 2 items from the stack 
 +   <-a <-b <-a - # multiply both and subtract the first
 </code>  </code> 
  
4rpl/commands/call.txt · Last modified: 2021/01/15 08:34 by Sanian