Hi!
Marc van Woerkom wrote:
[...] if Queue.empty then writeln('Queue is empty!'); [...] I expected to be able to use a "Queue." qualifier in front of the empty call in the test routine. But the compiler complains about an undeclared symbol Queue.
Is this a bug or a feature?
This is a bug, or, a missing feature (qualified identifiers).
If the latter, how am I supposed to differentiate between the empty function of an Queue and a Stack, if not by using Queue.empty / Stack.empty?
You can declare objects `Queue' and `Stack' with a method `empty'. (Both can have a common abstract parent that exports a dummy virtual method `empty' that always returns `true', etc.:)
Hope this helps :-]
Peter