Liste des Groupes | Revenir à cl forth |
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:dxf <dxforth@gmail.com> writes:On 1/02/2025 11:14 pm, albert@spenarnc.xs4all.nl wrote:>{ } is used for comment in Pascal.>
That's interesting. When did that come in, and why, given the issues?
Good question. My memory is only of (* *), but indeed Section 6.1.8
of https://www.standardpascal.org/iso7185.pdf makes it clear that (*
and { can be used interchangeably, as well as *) and }.
'{' and '}' are original Pascal comments. I do not think they have
any issue beyond normal ones, that is inability to put '}' as
part of a comment. Since comments were intended to be text and
'}' is not used as normal part of text presumably inability to
put '}' inside a comment was deemed as non-issue.
Pascal was bases on ASCII, but IBM mainframes used EBCDIC which
missed several useful ASCII characters, notably '{', '}',
'[', '[', so Pascal implementations on IBM mainframes used
alternate sequences. The alternative seqences were standarized
together with originals.
More generally, Wirth had rather rigid view how "good" program
should look like and this view was enforced by Pascal compilers.
Practical Pascals and later Extended Pascal were much more
flexible.
Les messages affichés proviennent d'usenet.