aboutsummaryrefslogtreecommitdiff
path: root/doc/language/keyword/cpsc-keyword-function.7.md
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 05:27:14 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 05:27:14 +0000
commite782898e420c7f2abd83b97c160194d0e70598dd (patch)
treef1d95ee7b2766ac2f443df0cb6d5ba419085649e /doc/language/keyword/cpsc-keyword-function.7.md
parent42c1649264153940de143741337c38042c32e60b (diff)
feat(calls): support standalone calls and void pointer casts
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'doc/language/keyword/cpsc-keyword-function.7.md')
-rw-r--r--doc/language/keyword/cpsc-keyword-function.7.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/language/keyword/cpsc-keyword-function.7.md b/doc/language/keyword/cpsc-keyword-function.7.md
index a177afa..52efa90 100644
--- a/doc/language/keyword/cpsc-keyword-function.7.md
+++ b/doc/language/keyword/cpsc-keyword-function.7.md
@@ -17,6 +17,8 @@ ENDFUNCTION
Call a function in an expression as `name(arguments)`. A call may precede its top-level definition. RETURNS specifies the result type; omitting it defaults to INTEGER. RETURN supplies a value of that type. Whole-array results are unsupported.
+As a compiler extension, `name(arguments)` may also be a complete statement that discards the result. This differs from guide section 8.2, which requires function calls to occur within expressions. Built-in functions support the same form.
+
Parameters use `name : type`, optionally prefixed by BYVAL. BYVAL is the default; BYREF is forbidden for functions (guide section 8.3). Array parameters accept `ARRAY OF type` (one dimension) or `ARRAY[lower:upper, ...] OF type` (integer literal bounds). BYVAL arrays are copied. RETURNS, RETURN, BYVAL, and ENDFUNCTION belong here.
# EXAMPLE