aboutsummaryrefslogtreecommitdiff
path: root/doc/language/keyword/cpsc-keyword-function.7.md
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 10:35:33 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 10:35:33 +0000
commitb47c302bbffd668334f307d512b674f804f8f2fc (patch)
tree4dfdecb510789114618545b4d8d3a03a5b52e511 /doc/language/keyword/cpsc-keyword-function.7.md
parente572d278a44d286c8713d0ee4af9c72a3d1ca73c (diff)
docs: document OVERLOAD
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.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/language/keyword/cpsc-keyword-function.7.md b/doc/language/keyword/cpsc-keyword-function.7.md
index d734da3..9f3839d 100644
--- a/doc/language/keyword/cpsc-keyword-function.7.md
+++ b/doc/language/keyword/cpsc-keyword-function.7.md
@@ -25,6 +25,8 @@ 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 parameter signatures. Calls then require exact argument types; see [cpsc-keyword-overload(7)](cpsc-keyword-overload.7.md).
+
# EXAMPLE
```text
@@ -36,4 +38,4 @@ OUTPUT Double(4)
# SEE ALSO
-[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-class(7)](cpsc-keyword-class.7.md), [cpsc-keyword-procedure(7)](cpsc-keyword-procedure.7.md), [cpsc-keyword-call(7)](cpsc-keyword-call.7.md).
+[cpsc-keyword-overload(7)](cpsc-keyword-overload.7.md), [cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-class(7)](cpsc-keyword-class.7.md), [cpsc-keyword-procedure(7)](cpsc-keyword-procedure.7.md), [cpsc-keyword-call(7)](cpsc-keyword-call.7.md).