What's the preferred Pascal file extension?

mcandre picture mcandre · Oct 14, 2011 · Viewed 13.5k times · Source

Is it:

  • .p
  • .pl
  • .pas
  • .pascal

Or something else?

And will the various Pascal compilers (notably fpc) bork if you don't use the preferred extension?

Answer

Petr Abdulin picture Petr Abdulin · Oct 14, 2011

The most common file extension for Pascal is pas. As for FPC, it uses the pp extension to denote FPC-specific code.

I think there is not a "preferred" extension, but you can't miss by using pas.