diff options
Diffstat (limited to 'doc/language/keyword')
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-class.7.md | 4 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-readfile.7.md | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-while.7.md | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/doc/language/keyword/cpsc-keyword-class.7.md b/doc/language/keyword/cpsc-keyword-class.7.md index 7e8f6e3..2d14387 100644 --- a/doc/language/keyword/cpsc-keyword-class.7.md +++ b/doc/language/keyword/cpsc-keyword-class.7.md @@ -15,9 +15,9 @@ ENDCLASS # DESCRIPTION -Declare a class at top level with at least one field. Every field explicitly requires PUBLIC or PRIVATE, without DECLARE. This differs from guide section 10's default-public rule. ENDCLASS closes the declaration. +Declare a class at top level with at least one field. Fields are public by default; PUBLIC or PRIVATE may be specified explicitly, without DECLARE. ENDCLASS closes the declaration. -Classes use record value semantics: zero initialization, whole-value copying, arrays, pointers, and ordinary function/procedure parameters. Only PUBLIC fields can be accessed externally. PRIVATE fields still initialize and copy with the whole value. Methods, constructors, destructors, NEW, INHERITS, and array fields are unsupported. +Classes use record value semantics: zero initialization, whole-value copying, arrays, pointers, and ordinary function/procedure parameters. Only public fields can be accessed externally. PRIVATE fields still initialize and copy with the whole value. Methods, constructors, destructors, NEW, INHERITS, and array fields are unsupported. # EXAMPLE diff --git a/doc/language/keyword/cpsc-keyword-readfile.7.md b/doc/language/keyword/cpsc-keyword-readfile.7.md index 200fc68..cdf96c5 100644 --- a/doc/language/keyword/cpsc-keyword-readfile.7.md +++ b/doc/language/keyword/cpsc-keyword-readfile.7.md @@ -19,7 +19,7 @@ Read one line from a file opened FOR READ, removing the line ending. The target ```text DECLARE Line : STRING OPENFILE "notes.txt" FOR READ -WHILE NOT EOF("notes.txt") DO +WHILE NOT EOF("notes.txt") READFILE "notes.txt", Line OUTPUT Line ENDWHILE diff --git a/doc/language/keyword/cpsc-keyword-while.7.md b/doc/language/keyword/cpsc-keyword-while.7.md index 5e6656f..1100b38 100644 --- a/doc/language/keyword/cpsc-keyword-while.7.md +++ b/doc/language/keyword/cpsc-keyword-while.7.md @@ -7,21 +7,21 @@ cpsc-keyword-while - repeat while a condition is true # SYNOPSIS ```text -WHILE condition DO +WHILE condition statements ENDWHILE ``` # DESCRIPTION -Test before each iteration; the body may run zero times. DO and ENDWHILE belong to this syntax. +Test before each iteration; the body may run zero times. ENDWHILE closes the loop. The WHILE header has no DO keyword. # EXAMPLE ```text DECLARE Count : INTEGER Count <- 1 -WHILE Count <= 3 DO +WHILE Count <= 3 OUTPUT Count Count <- Count + 1 ENDWHILE |
