[lazarus] Win32 Code Analysis
Michael.VanCanneyt at Wisa.be
Michael.VanCanneyt at Wisa.be
Sat Mar 31 03:44:24 EST 2001
On Fri, 30 Mar 2001, Cryst wrote:
> > And: The compiler does not name the files; it is the programmer that does
> > this.
>
> The compiler enforces the names in the uses clause. I believe this was the
> root of all my problems.
The compiler enforces only 1 thing: on linux, all filenames are converted to
lower case before looking for a file. Other than that, you are free to use
the .pp or .pas extension; the compiler will first look for .pp files, if it
doesn't find that, it will look for .pas files.
The latest development compiler on linux now also looks for files that are not
lowercased, since Kylix for some strange reason decided to make the uses
clause case sensitive. Which goes against pascal syntax rules.
So where filenames are concerned, we're very Delphi compatible, I hope.
>
> > It is always up to the programmer to code compiler-independent, the
> compiler
> > should not enforce anything.
>
> By the compiler definition, it will enforce code which is compiler
> dependent.
No, it will enforce code that adheres to the language syntax. In our case
Pascal, and we differentiate between 4 different syntaxes in pascal. This
is needed for TP and Delphi compatibility, by which I mean that we want to
be able to compile code written for TP or code written for Delphi.
If a programmer decides to use a certain syntax, then that is his choice.
> Using more then one compiler makes the code compiler independent,
> which to me seems a worthwhile goal.
With this I can only agree, but as I tried to show, it is up to the
programmer to code in this way. If the programmer decides to write code
that will only compile when using this-or-that compiler feature, then his
code is not portable...
Naming files with .pp is one of these things: by doing this, a programmer
is expliicitly saying that this code must be compiled with FPC. Lazarus
is such a project.
Michael.
More information about the Lazarus
mailing list