From c63584c388ea6acb7ad2f244376ae005536b6838 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 24 Oct 2026 18:09:43 +0000 Subject: docs(overload): document return-type selection across keyword pages Co-Authored-By: Claude Opus 5.5 --- doc/cpsc.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/cpsc.1.md') diff --git a/doc/cpsc.1.md b/doc/cpsc.1.md index c0dd4f0..caa829c 100644 --- a/doc/cpsc.1.md +++ b/doc/cpsc.1.md @@ -16,7 +16,7 @@ Compile one or more pseudocode source files to a native executable, or to textua Without **-o**, save beside the entry source file, replacing its extension with `.exe` on Windows or `.out` elsewhere for an executable, or `.ll` for IR. With **-r** alone, run without saving a file. -Each input is a compilation unit. Use top-level `INCLUDE "lib.cps"` to import another input's exported definitions, including its transitive imports. Paths are relative to the including source; every included file must also appear on the command line. Repeated includes and include cycles are harmless. Giving the same input twice, including symbolic or hard links, is an error. Duplicate definitions across files are errors even if the files do not include each other; distinct parameter signatures may share a name when every definition specifies OVERLOAD. +Each input is a compilation unit. Use top-level `INCLUDE "lib.cps"` to import another input's exported definitions, including its transitive imports. Paths are relative to the including source; every included file must also appear on the command line. Repeated includes and include cycles are harmless. Giving the same input twice, including symbolic or hard links, is an error. Duplicate definitions across files are errors even if the files do not include each other; distinct signatures, differing in parameters or return type, may share a name when every definition specifies OVERLOAD. Exactly one file may contain top-level executable statements (including top-level DECLARE). Alternatively, define a parameterless `FUNCTION MAIN RETURNS INTEGER` in one file and have no top-level executable statements anywhere. Builds containing only definitions and no MAIN fail with `error: no main program`. GLOBAL blocks declare shared primitive variables. INCLUDE, GLOBAL and MAIN entry points are compiler extensions beyond the Cambridge guide. -- cgit v1.3.1-4-g156e