| | @@ -13,7 +13,7 @@ |
| 13 | 13 | This report defines the language. It is short on purpose. Whatever it |
| 14 | 14 | doesn't allow, raz doesn't have. |
| 15 | 15 | |
| 16 | | -This is version 2026-10.28 of the report; section 11 says where each |
| 16 | +This is version 2026-10.29 of the report; section 11 says where each |
| 17 | 17 | version's changes are told. 2026-10.11 and 2026-10.12 are a thaw the owner chose, |
| 18 | 18 | for a language anyone can build again. They break programs written |
| 19 | 19 | for 2026-10.10 and before: for 2026-10.9, say, the report of compiler |
| | @@ -30,8 +30,13 @@ |
| 30 | 30 | procedure's own frame is an error (section 7.3), which breaks only a |
| 31 | 31 | program that read memory already gone. 2026-10.28 mends another: an |
| 32 | 32 | array a call returns lives to the end of its statement, and a slice of |
| 33 | | -it kept past that is undefined (sections 8 and 10). |
| 33 | +it kept past that is undefined (sections 8 and 10). 2026-10.29 is a |
| 34 | +sixth thaw: an array constant typed `[]T` takes its length from its |
| 35 | +literal (section 4); it breaks no program. |
| 34 | 36 | |
| 37 | +The compiler follows version 2026-10.28 until it has what 2026-10.29 |
| 38 | +adds. |
| 39 | + |
| 35 | 40 | The language is frozen, softly, from this version on: it changes only |
| 36 | 41 | to mend a defect, and its library grows only by what breaks no program |
| 37 | 42 | written for it. What anyone wishes it had waits on a list, for a later |
| | @@ -384,6 +389,16 @@ |
| 384 | 389 | compared as its type allows, and passed. Its parts are constant as a |
| 385 | 390 | string's bytes are (section 5.10). A part of it isn't a constant, even |
| 386 | 391 | at a constant index. |
| 392 | + |
| 393 | +An array constant may be typed `[]T`, with no length: its length is |
| 394 | +then its literal's, as a string constant's is the string's, and it is |
| 395 | +an array constant of that length, `[n]T`, in all else. Its literal has |
| 396 | +at least one element. |
| 397 | + |
| 398 | +``` |
| 399 | +const Wide: [][2]I32 = [[1100H, 115FH], [2E80H, 303EH], [0AC00H, 0D7A3H]]; |
| 400 | + Count = LEN(Wide); (* 3, a constant *) |
| 401 | +``` |
| 387 | 402 | |
| 388 | 403 | **Variables** of a module live as long as the program; variables of a |
| 389 | 404 | procedure live as long as its call. Both start at zero: every byte of |