Sign in Join

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

Mailing lists / lazarus / 2012-10

Include files extension

4 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Marco Aurelio Ramirez Carrillo

I ignore if this topic ha been mentioned before on the mailing lists.

I work with several tools,
including Lazarus, Delphi, and some C/C++ compilers.

I use indude files, frecuently, in several enviroments, ( "*.inc"). But, got mixed up with both,
Pascal-related & C-related include files.

Altought FPC, allows you to include a text file with any extension, I would like to propose that the Lazarus I.D.E.
explicitly allows an additional file extension,
maybe "*.incpas", "*.ipas" or "*.incp".

I may to post the same question in a FPC forum.

Cheers.

atte Marco Aurelio Ramirez Carrillo

Reply by email

Mark Morgan Lloyd
to Marco Aurelio Ramirez Carrillo
Marco Aurelio Ramirez Carrillo wrote 13 lines
I ignore if this topic ha been mentioned before on the mailing lists. I work with several tools, including Lazarus, Delphi, and some C/C++ compilers. I use indude files, frecuently, in several enviroments, ( "*.inc"). But, got mixed up with both, Pascal-related & C-related include files. Altought FPC, allows you to include a text file with any extension, I would like to propose that the Lazarus I.D.E. explicitly allows an additional file extension, maybe "*.incpas", "*.ipas" or "*.incp".

Two points here. First, I don't think I've seen C/C++ include files named other than .h/.hpp, except where they're machine-generated code from a specialist processor. Second, the implications of any change would have to be considered on all platforms: having an assumed extension might be OK on Windows where a file almost always has an extension, but not on Unix where the executable normally doesn't.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Marco Aurelio Ramirez Carrillo: I ignore if this topic ha been mentioned before on the mailing lists. including Lazarus,…

Marco Aurelio Ramirez Carrillo hat am 10. Oktober 2012 um 23:03 geschrieben:

Show quoted text 13 lines
I ignore if this topic ha been mentioned before on the mailing lists. I work with several tools, including Lazarus, Delphi, and some C/C++ compilers. I use indude files, frecuently, in several enviroments, ( "*.inc"). But, got mixed up with both, Pascal-related & C-related include files. Altought FPC, allows you to include a text file with any extension, I would like to propose that the Lazarus I.D.E. explicitly allows an additional file extension, maybe "*.incpas", "*.ipas" or "*.incp".

The IDE happily parses include files with any extension and you can define for each highlighter the extensions.
Tools / Options / Editor / Display / Colors

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121011/0bf0d0c3/attachment.html>

Reply by email

Bernd
to Marco Aurelio Ramirez Carrillo: I ignore if this topic ha been mentioned before on the mailing lists. including Lazarus,…

2012/10/10 Marco Aurelio Ramirez Carrillo :

Altought FPC, allows you to include a text file with any extension, I would like to propose that the Lazarus I.D.E. explicitly allows an additional file extension, maybe "*.incpas", "*.ipas" or "*.incp".

I'm not a fan of too many different file extensions for the same purpose. Ideally there should only be one and personally I even find the existence of *.pp vs. *.pas already a bit annoying.

My own practical problem with file extensions is that services like for example github don't know all possible file extensions when it comes to syntax highlighting or collecting info about used programming languages (I want to contribute pascal usage to the statistics) and my personal solution to circumvent this is to use only .pas for my own code and even my include files now all have the extension .pas (currently I am using inc_something.pas or unitname_inc_something.pas so that all my include files appear next to each other in a directory listing, previously I have tried to use .inc.pas but Lazarus did complain about dotted names so I don't do this anymore)

Reply by email