From e782898e420c7f2abd83b97c160194d0e70598dd Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 05:27:14 +0000 Subject: feat(calls): support standalone calls and void pointer casts Co-Authored-By: Claude Fable 5.1 --- doc/language/keyword/cpsc-keyword-function.7.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/language/keyword/cpsc-keyword-function.7.md') 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 -- cgit v1.3.1-4-g156e