[lazarus] Lower case filenames

Peter Vreman peter at freepascal.org
Thu Mar 1 04:52:44 EST 2001


> Hello:
> 
> I think that unit filenames should always be lowercase (or upercase). Pascal
> is case insensitive, so it must assume that filenames are case insensitive
> too. If the file system is not case insensitive, pascal has to make
> decision: all upper or all lower.
> 
> let's say this unit name "myunittest", and a search path ./dir1:./dir2
> and we have these files:
> /dir1/myunittest.PP
> /dir1/MYUNITTEST.pp
> /dir1/MyUnitTest.pp
> 
> /dir2/MYUNITTEST.PP
> /dir2/myunittest.pp
> 
> I know that who has such files deserves hell.
> but, which unit the compilier will select? the first one? will try first all
> lower?
> 
> There is not an obvious decision.
> 
> IMHO having  the unit identifier, the compiler must select a exactly
> filename that is unique for the file system, all upper, all lower, or what
> ever you want. If that file exists in the search path: good news, if it
> doesn't: raise error.
> 
> But trying to guess if the user changed the case, can be a  source of
> confusion.

Having:

uses
  MyUnitTest;

the 1.1 compiler will look in this order:

/dir1/myunittest.pp
/dir1/MyUnitTest.pp
/dir1/MYUNITTEST.PP
/dir2/myunittest.pp
/dir2/MyUnitTest.pp
/dir2/MYUNITTEST.PP








More information about the Lazarus mailing list