On Mon, 23 Jan 2017, Peter wrote:
On 20/01/17 16:14, Paul Isaacs wrote:
... The first identifier of the enumeration will always be undefined. Any subrange identifier must have been defined previously. ...
Only for correct programs!
Actually not true at all. The constraint on an identifier in an enumeration (as on any other identifier being defined) is that it not (or rather that no other identifier with the same spelling) have been defined _in the same block_. For example, the fragment
program p; const a=42; procedure q; var x:(a,b,c); {...}
is correct, despite "a" being defined when it occurs in the enumeration.
According to my old Turbo Pascal (version 6.0) reference manual that variant of the language did not allow for the first expression in a subrange specification to start with "(".
...
Best regards,
Thorsten
--- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus