On 08.01.2014 19:16, Jürgen Hestermann wrote:
Today I found this type definition in some FreePascal sources: TypeReal =type Double; I wondered what the second “type” keyword means here (I have never seen this before). So I looked at http://www.freepascal.org/docs-html/ref/refch3.html#refse17.html where it says: _________________________________________________________________________________________________________ Type declaration -- - - - -|-------------- --------------- type declaration identifier = type |- --|; hint directives ___________________________________________________________________ Although type declarations are very fundamental and I am using them since 30 years I can’t find out what this diagram is trying to tell me. For example, I am missing the keyword “TYPE” in this syntax diagramm.
You are right. That seems to be missing.
I don’t know whether the first “type” is the standard type definition entry keyword but if so it should be typed in bold font.
No, it's not the keyword, it's a "reference" to the syntax diagram named "type" directly below it (though I have to admit that this is not necessarily clear...).
It can also be part of a text “type declaration” (which is obviously not a keyword). But then why does “type declaration” appear twice (in the heading **and** the syntax diagramm)? Following the line should generate a valid path to a (syntactical) correct type declaration. But why is then "type declaration" part of a type declaration? Makes no sense to me. It would generate an endless recursive loop. Another problem is “hint directives”. What is it? There is no link nor text that explains it. So I started another google search for “hint directives” but I only found this: http://www.freepascal.org/docs-html/ref/refse5.html <http://www.freepascal.org/docs-html/ref/refse5.html> where it says that hint directives are for variable declarations but not for type declarations
Yes, this is indeed the correct documentation and maybe this should be linked better...
(and again "hint directives" are part of hint directives which is not correct IMO).
The "hint directives" is again the "name" of the syntax diagram.
Can someone clarify this documentation please? Where can I find the documentation for my original question about the double TYPE keyword?
This link explains it a bit: http://docwiki.embarcadero.com/RADStudio/XE5/en/Type_Compatibility_and_Identity
Regards, Sven _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal