Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2023-12

implementation-part

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Adriaan van Os

The Freepascal Language Reference (version 3.2.0) states in section 16.2

"As can be seen from the syntax diagram, a unit always consists of a interface and an implementation part."

and

"Both the interface part or implementation part can be empty, but the keywords Interface and implementation must be specified.

However, this was changed when implementing macpas mode (or at least for the macpas mode) in that the implementation part is no longer obligatory. This is useful for units with (only) external declarations.

Regards,

Adriaan van Os

Reply by email

Michael Van Canneyt
to Adriaan van Os
Adriaan van Os wrote 14 lines
The Freepascal Language Reference (version 3.2.0) states in section 16.2 "As can be seen from the syntax diagram, a unit always consists of a interface and an implementation part." and "Both the interface part or implementation part can be empty, but the keywords Interface and implementation must be specified. However, this was changed when implementing macpas mode (or at least for the macpas mode) in that the implementation part is no longer obligatory. This is useful for units with (only) external declarations.

Really ?

Not being a macpas user, I was not aware of this.
I will update the documentation.

Thank you for pointing it out.

Michael.

Reply by email