[lazarus] Saving and loading units and project doubts

Michael Van Canneyt michael.vancanneyt at wisa.be
Wed Feb 28 03:23:39 EST 2001




On Tue, 27 Feb 2001, Curtis White wrote:

> SVAA wrote:
> > 
> > Hello:
> > 
> > I'm working on saving and loading units and projects, and I've got some
> > doubts:
> > a) Files should always be saved in lowercase to avoid Unices troubles ¿isn't
> > it?
> 
> I don't think that lowercase is a requirement for the Unices. Unix/Linux
> can handle most any filename that Windows can. Since a lot of work is
> done from the command line in the Unices, it is typically frowned on to
> use spaces and uppercase letters because they are hard to type.  To use
> spaces in filenames, you have to enclose the name in quotes. I don't
> think it would be a good idea to restrict the users strictly to
> lowercase filenames or filenames without spaces. These things should be
> allowed and then leave it up to the developer to determine if he wants
> to make all Unix users mad or not :-)

The problem is actually deeper than that: The compiler ONLY looks for lowercase 
units, so you better force lowercase.

With Kylix coming up, Peter Vreman is going to change this behaviour. I believe
the behaviour will be the following:
- Look for lowercase unit source, as it is now.
- Look for unit with casing as in uses clause.
(- on dos: look for uppercase units)
The order in which this will be done is not yet clear: Look in all directories
for the lowercase version and then in all directories for the original casing,
or look in all directories for the lowercase or 'original case' unit.

It is actually an interesting problem, since Pascal syntax is case insensitive.
So the unit clause should also be case insensitive, but Borland (Kylix) decided 
that the units are saved with upper/lowercase preserved, which is strictly speaking 
a violation of the case-insensitiveness...

Michael.






More information about the Lazarus mailing list