differences between .pp and .pas files

classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|

differences between .pp and .pas files

Eric Kom
Good day,

Please what is a difference between .pp and .pas files extension?

--
Kind Regards

Eric Kom

System Administrator & Programmer - Metropolitan College
  _________________________________________
/ You are scrupulously honest, frank, and \
| straightforward. Therefore you have few |
\ friends.                                /
  -----------------------------------------
    \
     \
         .--.
        |o_o |
        |:_/ |
       //   \ \
      (| Kom | )
     /'\_   _/`\
     \___)=(___/

2 Hennie Van Till, White River, 1240
Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334
[hidden email] | [hidden email]
www.kom.za.net | www.kom.za.org | www.erickom.co.za

Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Ralf A. Quint
At 09:34 PM 2/24/2013, Eric Kom wrote:
>Good day,
>
>Please what is a difference between .pp and .pas files extension?

two characters... ;-)

>  _________________________________________
>/ You are scrupulously honest, frank, and \
>| straightforward. Therefore you have few |
>\ friends.                                /
>  -----------------------------------------

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Reinier Olislagers
In reply to this post by Eric Kom
On 25-2-2013 6:34, Eric Kom wrote:
> Good day,
>
> Please what is a difference between .pp and .pas files extension?

As Ralf said: 2 letters. I have the idea .pp was used in the past to
differentiate from other Pascal compilers, while .pas is used more
commonly now.

Groete,
Reinier
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

silvioprog
2013/2/25 Reinier Olislagers <[hidden email]>
On 25-2-2013 6:34, Eric Kom wrote:
> Good day,
>
> Please what is a difference between .pp and .pas files extension?

As Ralf said: 2 letters. I have the idea .pp was used in the past to
differentiate from other Pascal compilers, while .pas is used more
commonly now.

Groete,
Reinier

... and, .pas is commonly found code of units (e.g.: yeahbaby.pas -> unit yeahbaby;); .pp is commonly found code that generates the executable (e.g.: ohgod.pp -> program ohgod;).

--
Silvio Clécio
My public projects - github.com/silvioprog

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Sven Barth-2
In reply to this post by Eric Kom

Am 25.02.2013 07:14 schrieb "Eric Kom" <[hidden email]>:
>
> Good day,
>
> Please what is a difference between .pp and .pas files extension?

It's mostly a historical difference..pas are units that could (originally) be compiled with Turbo Pascal as well (which is why all units of the compiler use .pas) while .pp was designated for units that can only be compiled by FPC (which is why the old units of the RTL are called .pp). There is no technical difference between them. And for compatibility with Mac or Apple Pascal FPC also supports .p (this extension can be seen in the Photoshop 1.0 source for example).

Today .pp is used for example for FPC's test files (also for new ones) out if habit.

Program files can have any extension btw. Lazarus uses .lpr and Delphi .dpr.

Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Michael Van Canneyt


On Mon, 25 Feb 2013, Sven Barth wrote:

>
> Am 25.02.2013 07:14 schrieb "Eric Kom" <[hidden email]>:
> >
> > Good day,
> >
> > Please what is a difference between .pp and .pas files extension?
>
> It's mostly a historical difference..pas are units that could (originally) be compiled with Turbo Pascal as well (which is why all
> units of the compiler use .pas) while .pp was designated for units that can only be compiled by FPC (which is why the old units of
> the RTL are called .pp). There is no technical difference between them. And for compatibility with Mac or Apple Pascal FPC also
> supports .p (this extension can be seen in the Photoshop 1.0 source for example).
>
> Today .pp is used for example for FPC's test files (also for new ones) out if habit.

I think you are under a misapprehension. It is not 'out of habit'.
I use .pp for all my contributions, out of principle.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Sven Barth-2
On 25.02.2013 09:30, Michael Van Canneyt wrote:

>
>
> On Mon, 25 Feb 2013, Sven Barth wrote:
>
>>
>> Am 25.02.2013 07:14 schrieb "Eric Kom"
>> <[hidden email]>:
>> >
>> > Good day,
>> >
>> > Please what is a difference between .pp and .pas files extension?
>>
>> It's mostly a historical difference..pas are units that could
>> (originally) be compiled with Turbo Pascal as well (which is why all
>> units of the compiler use .pas) while .pp was designated for units
>> that can only be compiled by FPC (which is why the old units of
>> the RTL are called .pp). There is no technical difference between
>> them. And for compatibility with Mac or Apple Pascal FPC also
>> supports .p (this extension can be seen in the Photoshop 1.0 source
>> for example).
>>
>> Today .pp is used for example for FPC's test files (also for new ones)
>> out if habit.
>
> I think you are under a misapprehension. It is not 'out of habit'. I use
> .pp for all my contributions, out of principle.

Then let me rephrase my last sentence:

Today .pp is used for example for FPC's test files (also for new ones)
either out of habit or out of principle.

Better now? :)

Regards,
Sven

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Tomas Hajny-2
On Mon, February 25, 2013 11:40, Sven Barth wrote:
> On 25.02.2013 09:30, Michael Van Canneyt wrote:
>> On Mon, 25 Feb 2013, Sven Barth wrote:
 .
 .

>>> Today .pp is used for example for FPC's test files (also for new ones)
>>> out if habit.
>>
>> I think you are under a misapprehension. It is not 'out of habit'. I use
>> .pp for all my contributions, out of principle.
>
> Then let me rephrase my last sentence:
>
> Today .pp is used for example for FPC's test files (also for new ones)
> either out of habit or out of principle.
>
> Better now? :)

Well, specifically talking about the test files, it's not only matter of
habit or principles but also the Makefile only supporting this suffix as
far as I know. ;-)

I had to rename tfexpand accordingly just because of that (the test itself
is explicitly constructed in a way allowing compilation also with TP/BP
and preferably also Delphi - although I cannot check the latter myself).

Tomas


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Michael Van Canneyt
In reply to this post by Sven Barth-2


On Mon, 25 Feb 2013, Sven Barth wrote:

> On 25.02.2013 09:30, Michael Van Canneyt wrote:
>>
>>
>> On Mon, 25 Feb 2013, Sven Barth wrote:
>>
>>>
>>> Am 25.02.2013 07:14 schrieb "Eric Kom"
>>> <[hidden email]>:
>>> >
>>> > Good day,
>>> >
>>> > Please what is a difference between .pp and .pas files extension?
>>>
>>> It's mostly a historical difference..pas are units that could
>>> (originally) be compiled with Turbo Pascal as well (which is why all
>>> units of the compiler use .pas) while .pp was designated for units
>>> that can only be compiled by FPC (which is why the old units of
>>> the RTL are called .pp). There is no technical difference between
>>> them. And for compatibility with Mac or Apple Pascal FPC also
>>> supports .p (this extension can be seen in the Photoshop 1.0 source
>>> for example).
>>>
>>> Today .pp is used for example for FPC's test files (also for new ones)
>>> out if habit.
>>
>> I think you are under a misapprehension. It is not 'out of habit'. I use
>> .pp for all my contributions, out of principle.
>
> Then let me rephrase my last sentence:
>
> Today .pp is used for example for FPC's test files (also for new ones) either
> out of habit or out of principle.
>
> Better now? :)

You are taking this far too serious :-)

But as a tip:

if the code is for FPC only, use .pp.
It's more efficient, because the compiler first looks for .pp files, only then .pas.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Sven Barth-2
On 25.02.2013 11:49, Michael Van Canneyt wrote:

>
>
> On Mon, 25 Feb 2013, Sven Barth wrote:
>
>> On 25.02.2013 09:30, Michael Van Canneyt wrote:
>>>
>>>
>>> On Mon, 25 Feb 2013, Sven Barth wrote:
>>>
>>>>
>>>> Am 25.02.2013 07:14 schrieb "Eric Kom"
>>>> <[hidden email]>:
>>>> >
>>>> > Good day,
>>>> >
>>>> > Please what is a difference between .pp and .pas files extension?
>>>>
>>>> It's mostly a historical difference..pas are units that could
>>>> (originally) be compiled with Turbo Pascal as well (which is why all
>>>> units of the compiler use .pas) while .pp was designated for units
>>>> that can only be compiled by FPC (which is why the old units of
>>>> the RTL are called .pp). There is no technical difference between
>>>> them. And for compatibility with Mac or Apple Pascal FPC also
>>>> supports .p (this extension can be seen in the Photoshop 1.0 source
>>>> for example).
>>>>
>>>> Today .pp is used for example for FPC's test files (also for new ones)
>>>> out if habit.
>>>
>>> I think you are under a misapprehension. It is not 'out of habit'. I use
>>> .pp for all my contributions, out of principle.
>>
>> Then let me rephrase my last sentence:
>>
>> Today .pp is used for example for FPC's test files (also for new ones)
>> either out of habit or out of principle.
>>
>> Better now? :)
>
> You are taking this far too serious :-)

Just let me have my fun :)

>
> But as a tip:
>
> if the code is for FPC only, use .pp. It's more efficient, because the
> compiler first looks for .pp files, only then .pas.

That's indeed a valid argument pro .pp

Regards,
Sven

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Graeme Geldenhuys-3
On 2013-02-25 10:51, Sven Barth wrote:
>
> That's indeed a valid argument pro .pp

And a large argument against .pp extensions is that NO editor out there
(except for FP Text IDE and Lazarus) knows about .pp, so pascal syntax
highlighting never works. You have to always manually force the pascal
syntax highlighting, or if the editor allows, manually add the .pp
extension for the Pascal highlighting.

Out of principal, I always use .pas  ;-)


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Michael Van Canneyt


On Mon, 25 Feb 2013, Graeme Geldenhuys wrote:

> On 2013-02-25 10:51, Sven Barth wrote:
>>
>> That's indeed a valid argument pro .pp
>
> And a large argument against .pp extensions is that NO editor out there
> (except for FP Text IDE and Lazarus) knows about .pp, so pascal syntax
> highlighting never works. You have to always manually force the pascal
> syntax highlighting, or if the editor allows, manually add the .pp
> extension for the Pascal highlighting.

That is a bug in these editors, you should file a report.

FPC is older than any of these editors anyway (emacs excluded): soon 20 years.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Henry Vermaak
In reply to this post by Graeme Geldenhuys-3
On Mon, Feb 25, 2013 at 11:00:25AM +0000, Graeme Geldenhuys wrote:
> On 2013-02-25 10:51, Sven Barth wrote:
> >
> > That's indeed a valid argument pro .pp
>
> And a large argument against .pp extensions is that NO editor out there
> (except for FP Text IDE and Lazarus) knows about .pp, so pascal syntax
> highlighting never works. You have to always manually force the pascal
> syntax highlighting, or if the editor allows, manually add the .pp
> extension for the Pascal highlighting.

It's not a "large argument" if I can fix it with a couple of lines in my
vimrc:

let pascal_fpc=1
au BufNewFile,BufRead *.pp setf pascal
au BufNewFile,BufRead *.lpr setf pascal
"fix tabs, case sensitivity for pascal source
au FileType pascal set tabstop=2 shiftwidth=2 expandtab ignorecase

:)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Bart-48
In reply to this post by Graeme Geldenhuys-3
On 2/25/13, Graeme Geldenhuys <[hidden email]> wrote:

> And a large argument against .pp extensions is that NO editor out there
> (except for FP Text IDE and Lazarus) knows about .pp,

LazEdit (or EPlus)?

Bart
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Mark Morgan Lloyd-5
In reply to this post by Graeme Geldenhuys-3
Graeme Geldenhuys wrote:
> On 2013-02-25 10:51, Sven Barth wrote:
>> That's indeed a valid argument pro .pp
>
> And a large argument against .pp extensions is that NO editor out there
> (except for FP Text IDE and Lazarus) knows about .pp, so pascal syntax
> highlighting never works. You have to always manually force the pascal
> syntax highlighting, or if the editor allows, manually add the .pp
> extension for the Pascal highlighting.

That's actually a good argument for using a custom extension: FPC is
unique in its syntax (since it includes TP, Delphi, Mac and so on) so
it's reasonable to use a unique extension to ensure that a naive
highlighter doesn't get confused.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Graeme Geldenhuys-3
In reply to this post by Michael Van Canneyt
On 2013-02-25 11:09, Michael Van Canneyt wrote:
>
> That is a bug in these editors, you should file a report.

Kate, gEdit, syn, mcedit, vim, emacs, Notepad++, Geany etc... I wouldn't
even know where to start finding all their bug tracker information. And
honestly, I simply don't have the time. Using .pas is just simpler.


> FPC is older than any of these editors anyway (emacs excluded): soon 20 years.

I think Midnight Commander (and its built-in mcedit) predates FPC too.

Anyway, my point is that the .pp extension isn't known by anybody except
the very small circle of FPC friends.


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Michael Van Canneyt


On Mon, 25 Feb 2013, Graeme Geldenhuys wrote:

> On 2013-02-25 11:09, Michael Van Canneyt wrote:
>>
>> That is a bug in these editors, you should file a report.
>
> Kate, gEdit, syn, mcedit, vim, emacs, Notepad++, Geany etc... I wouldn't
> even know where to start finding all their bug tracker information. And
> honestly, I simply don't have the time. Using .pas is just simpler.

Somehow, tongue-in-cheek humour never seems to work through email...
Or I'm just no good at it.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

Graeme Geldenhuys-3
On 2013-02-25 12:39, Michael Van Canneyt wrote:
>
> Somehow, tongue-in-cheek humour never seems to work through email...

Nope.

> Or I'm just no good at it.

Neither am I. :)


Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

John Coppens
In reply to this post by Graeme Geldenhuys-3
On Mon, 25 Feb 2013 12:36:18 +0000
Graeme Geldenhuys <[hidden email]> wrote:

> Kate, gEdit, syn, mcedit, vim, emacs, Notepad++, Geany etc... I wouldn't
> even know where to start finding all their bug tracker information. And
> honestly, I simply don't have the time. Using .pas is just simpler.

It's mostly not the editors that have a bug, but nobody submitted a
syntax file for .pp. It has been a while, but I believe that both
gedit and geany, which are GtkSourceview-based, can be extended by
simply copying the pas personalization file to a pp version. Same
for 'joe'.

John
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: differences between .pp and .pas files

wkitty42
In reply to this post by Eric Kom
On 2/25/2013 00:34, Eric Kom wrote:
> Good day,
>
> Please what is a difference between .pp and .pas files extension?

IIRC, pp is objectpascal whereas pas is "general" pascal...


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
12