[Lazarus] Codetools and insert unit names lowercase?

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jun 4 21:10:49 CEST 2009


On Thu, 04 Jun 2009 19:46:27 +0100
Martin Friebe <lazarus at mfriebe.de> wrote:

>[...]
> > How can can I reproduce this?
> >
> >   
> Ok it isnt "all"
> 
> It seems to be some from the fpc installation.
> 
> I installed fpc 224 on Windows from SVN. And that has "sysutils" all 
> lowercase => that is the the filename and the spelling in the
> actually file on top "unit sysutils"
> 
> Consequently codetools does insert this one lowerase? (in any new app
> I create / or if I remove it from a unit and re-insert it).
> 
> Thing is, if i write it by hand in mixed xcase, it still works....
> 
> So I dont know why it is lowercase in fpc now.

Unit case works like this:
1. FPC searches first mixed case then lowercase then uppercase. Ergo, if
the file name is mixed case, then this mixed case must be used by the
codetools to find the unit on case sensitive file systems (Linux). 
2. if the file is all lowercase or all uppercase then the unit can be
used any case. Then the codetools will copy the unit name
from the source (e.g. unit LCLProc; ). 

Some developers write their source names lowercase for aesthetic
reasons.

Because I prefer mixed case in uses sections, I use word completion for
those unit names.


Mattias




More information about the Lazarus mailing list