Peter N Lewis wrote:
At 8:04 +0200 14/6/05, Frank Heckenbach wrote:
Peter N Lewis wrote:
I agree with Frank. Pascal usually has exactly one way to access something, which follows from the logical construction of that something.
Umm, except for:
- Case variant records
I don't understand this one. Variant record fields and selectors are accessed with `.', like normal records.
This is getting a bit far off topic now. But case variant records can generally have overlapping fields that are referenced by different names but which refer to the same location, akin to:
record case boolean of (true: a: UInt32); (false: b: SInt32); end;
(excuse me if I've got the syntax wrong, I didn't look it up and rarely use them).
Then r.a and r.b are two ways to access the same thing.
No, they aren't. A common misunderstanding.
I seem to remember that GPC does not actually support this overlaying of memory, but it is fairly standard in traditional Pascals.
GPC does it sometimes, other times not, for good reasons. The standards state explicitly that such usage is invalid.
Rick Engebretson wrote:
It is great to join the Mac developers with the Gnu developers.
But for this layperson, adapting Gnu to proprietary pascal seems backwards.
Well, we've been doing that since at least 1995 when Peter Gerwinski started adding Borland Pascal extensions ...
Further, pointers and pointers to pointers is abstract enough. Implicit and virtual goes over the top for all but a very few.
I suppose so. In the end they'll be happy if they can use their sources from other compilers unmodified as much as possiible. However, to get there, we have to discuss the difficult areas here, as we don't want to introduce several distinct and wholly incompatible modes.
CBFalconer wrote:
- Variables referenced by pointer
No such thing in standard Pascal. Pointers are only initialized by new.
Even then there can be aliases after pointer assignments.
- Optionally qualified variables
Again, what do you mean here?
Qualified imports (Extended Pascal).
Frank