On 14 Oct 2001, at 13:10, Marco van de Voort wrote:
I think that CB's statement is only true for commandline systems.
ISO 7185, section 1.1 ("Scope") says:
This International Standard specifies the semantics and syntax of the computer programming language Pascal by specifying requirements for a processor and for a conforming program.
...and section 5.1 ("Compliance, Processors") says:
A processor complying with the requirements of this International Standard shall:
[...]
c) not require the inclusion of substitute or additional language elements in a program in order to accomplish a feature of the language that is specified in clause 6;
If I understand those sections correctly (argument welcomed :-), standards- compliant implementations are not permitted to impose additional syntactic or semantic requirements beyond those explicitly stated in the standard (except where such requirements are explicitly allowed as "implementation defined").
The syntax indicates that program-parameters (such as "output") are optional. The semantics in the standard say that "output" is required as a program-parameter only if the file-variable is omitted for the predefined procedures "write", "writeln", and "page". Therefore, a complying system cannot require the specification of "output" in every program header (although a non-complying system certainly can).
I admit that I find reading the standard(s) to be quite difficult, so arguments against my interpretation are welcomed!
To bring this back home, when given a legal program with no program parameters, "gpc --standard-pascal" and "gpc --extended-pascal" report:
warning: no program parameters specified
I shall have to research the standards more before determining whether this is a bug or a feature. ;-)
-- Dave