[fpc-pascal] how to define a generic subclass inheriting from another generic class?

Anthony Walter sysrpl at gmail.com
Tue Dec 10 18:10:18 CET 2013


The way FPC handles generics went against all other previous Pascal
conventions. You always had

A) type block

which then is always followed by

B) an identifier

and then a

C) type definition terminated with a semi colon

B and C can then be repeated in pairs until a different block is declared
(const, var, threadvar, resourcestring, function, procedure, begin or end)

So what you always had with regards to a type block is:

A
  B C;

  B C;

  B C;

Where A is he keyword 'type', B is and identifier, and C is the type
definition.

Then someone went and decided that rather than scan ahead for a < after the
identifier, they wanted another keyword in front of B, which breaks the
whole pattern.

A
  B C;

  generic B C;

  B C;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20131210/f101b649/attachment.html>


More information about the fpc-pascal mailing list