[lazarus] Lower case filenames

SVAA svaa at retemail.es
Wed Feb 28 19:34:45 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.

Regards
Santiago Amposta
svaa at retemail.es

















More information about the Lazarus mailing list