aboutsummaryrefslogtreecommitdiff
path: root/doc/language/keyword/cpsc-keyword-function.7.md
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-28 13:41:26 +0000
committer_ov4 <ov4@ov4.org>2026-10-28 13:41:26 +0000
commit63109537383fa58c6a1db95f275d6b5de63b0015 (patch)
tree318441dd53b9f7208e65867fd57dd2587fa8f147 /doc/language/keyword/cpsc-keyword-function.7.md
parent5370a0d74d90799ca010d308d54330283116ca5e (diff)
docs(overload): document default return selection
Co-Authored-By: Claude Opus 5.5 <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, 1 insertions, 1 deletions
diff --git a/doc/language/keyword/cpsc-keyword-function.7.md b/doc/language/keyword/cpsc-keyword-function.7.md
index 8a5e37b..fbeb15b 100644
--- a/doc/language/keyword/cpsc-keyword-function.7.md
+++ b/doc/language/keyword/cpsc-keyword-function.7.md
@@ -25,7 +25,7 @@ A FUNCTION inside CLASS defines a member function, called as `Object.Method(argu
As a compiler extension, a top-level `FUNCTION MAIN RETURNS INTEGER` with no parameters supplies the program entry point. MAIN is case insensitive and cannot coexist with top-level executable statements in any input file. Its INTEGER result, truncated to 32 bits, is returned as the process exit status. An uncaught exception prints the generic termination message and returns 1. A PROCEDURE MAIN or a MAIN with parameters or a non-INTEGER result is an error. The usual default INTEGER result type also applies when RETURNS is omitted.
-Prefix a definition with OVERLOAD to share its name with other explicitly marked definitions having different parameters or return types. Calls then require exact argument types and, where the surrounding context requires a result type, an exact return type; see [cpsc-keyword-overload(7)](cpsc-keyword-overload.7.md).
+Prefix a definition with OVERLOAD to share its name with other explicitly marked definitions having different parameters or return types. Calls then require exact argument types and, where the surrounding context requires a result type, an exact return type; see [cpsc-keyword-overload(7)](cpsc-keyword-overload.7.md). `RETURNS DEFAULT type` marks the result to select when context cannot choose among return-only overloads; see [cpsc-keyword-default(7)](cpsc-keyword-default.7.md).
# EXAMPLE