Call a function: Difference between revisions

m
Update Lang example: Fix spelling of Lang
m (Update Lang example: Fix spelling of Lang)
Line 3,551:
 
 
# In langLang there are text and array varags parameters
fp.varArgsText = ($text...) -> \!
fp.varArgsText(1) # Var args text will be called with "1"
Line 3,589:
$ret = fp.inc2(40) # $ret is 42
 
# Built-in (They are called predefined functions in langLang) start with the "func." or "fn." prefix wheras user-defined functions start with "fp."
# Linker functions start with "linker." or "ln."
# Predefined and linker functions can be stored in a user-defined function
Line 3,595:
fp.userDefinedFunc(Called println)
 
# In langLang there are no subroutines
 
# In langLang functions can have call-by-pointer values
# $ptr is a pointer to the called value
fp.callByPtr = ($[ptr]) -> \!
168

edits