Russell Whitaker wrote:
On Mon, 21 Feb 2005, Frank Heckenbach wrote:
Adriaan van Os wrote:
Waldek Hebisch wrote:
The second way requires gpc-20050217 (qualified indentifiers).
Do we have a way to qualify built-in routines, e.g. "program.round"
No, we don't (except by explicit wrappers, as others have described).
(as "system.round" refers to a "system" unit) ?
Yes, it refers to a `System' unit. But built-in identifiers are not declared in a `System' unit (which would violate EP where `System' is not a special name), but at "level 0" as Chuck calls it (I don't know if the standard has a term for it, I think it just talks of "required procedures and functions" and that they have a "definingÂpoint not contained by the programÂblock").
One could consider whether to add such a facility, but especially for built-in routines with special syntax (such as `WriteLn') this will probably not be easy, so I don't really like the idea.
Would it be easier to have the linker ignore the built-in round() if there was a library module containing round() on the command line?
Most built-ins are not plain functions at the linker level. `Round' is done with inline code, `WriteLn' expands to several calls, etc.
But that's not the point, actually -- overriding built-ins is already no problem. It's accessing them when they're shadowed which is not possible (in accordance with the standards).
Since Adriaan and Peter have already renamed their `Round', this particular problem is solved anyway.
Frank