From c1711418f36b710e388d4d942b1defa37e951625 Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Sun, 11 Oct 2026 09:02:19 +0000 Subject: [PATCH] The report, for review: return passes several results on return f(x); returns the several results of f when they are the procedure's own, the same types in the same order. Report version 2026-10.3, for review before any code. --- diff --git a/doc/raz.md b/doc/raz.md index 99cac23..2ccad18 100644 --- a/doc/raz.md +++ b/doc/raz.md @@ -596,7 +596,9 @@ ### 7.3 Return `return e;` ends the procedure with the result `e`; `return a, b;` with -several results; `return;` from a procedure without results. A +several results; `return f(x);` with the several results of `f`, if +they are the procedure's own (section 8); `return;` from a procedure +without results. A procedure with results that runs off its end returns zeros, each result as a variable of its type starts (section 4). @@ -706,7 +708,9 @@ **Results.** A procedure returns nothing, one value, or several. A call that returns several values can only stand on the right of a multiple -assignment, or alone as a statement. +assignment, alone as a statement, or alone after `return` in a +procedure whose results are of the same types, in the same order, +which then returns them as they are: `return divmod(n, 2);`. ``` module Divide; @@ -972,3 +976,5 @@ and signals say where (sections 6.5 and 10). - **2026-10.2.** `Sys` gains files and directories, the terminal, and the environment (section 11). +- **2026-10.3.** `return f(x);` passes on the several results of `f` + (sections 7.3 and 8).