On Wed, 8 Jan 2014, 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.

That is right, since it is not the diagram for the type declaration block, which appears later in the manual.

However, following your remark I have done some reworking of this part. I have referred to the diagram of the type declaration block, and I have moved the type alias description to a separate section which explains the difference between the 2 concepts:

Type
  MyInteger = Integer;

and
  MyInteger = Type Integer;

You can preview the result at

http://www.freepascal.org/~michael/ref/refch3.html

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to