| | @@ -596,7 +596,9 @@ |
| 596 | 596 | ### 7.3 Return |
| 597 | 597 | |
| 598 | 598 | `return e;` ends the procedure with the result `e`; `return a, b;` with |
| 599 | | -several results; `return;` from a procedure without results. A |
| 599 | +several results; `return f(x);` with the several results of `f`, if |
| 600 | +they are the procedure's own (section 8); `return;` from a procedure |
| 601 | +without results. A |
| 600 | 602 | procedure with results that runs off its end returns zeros, each result |
| 601 | 603 | as a variable of its type starts (section 4). |
| 602 | 604 | |
| | @@ -706,7 +708,9 @@ |
| 706 | 708 | |
| 707 | 709 | **Results.** A procedure returns nothing, one value, or several. A call |
| 708 | 710 | that returns several values can only stand on the right of a multiple |
| 709 | | -assignment, or alone as a statement. |
| 711 | +assignment, alone as a statement, or alone after `return` in a |
| 712 | +procedure whose results are of the same types, in the same order, |
| 713 | +which then returns them as they are: `return divmod(n, 2);`. |
| 710 | 714 | |
| 711 | 715 | ``` |
| 712 | 716 | module Divide; |
| | @@ -972,3 +976,5 @@ |
| 972 | 976 | and signals say where (sections 6.5 and 10). |
| 973 | 977 | - **2026-10.2.** `Sys` gains files and directories, the terminal, and |
| 974 | 978 | the environment (section 11). |
| 979 | +- **2026-10.3.** `return f(x);` passes on the several results of `f` |
| 980 | + (sections 7.3 and 8). |