Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-06

Codetools and insert unit names lowercase?

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

I noticed that lately codetools inserts all unit nems (in uses clause) in lowercase only?
Is there are reason, or an option for that?

They looked reall nice and readable in mixed case...

Martin

Reply by email

Mattias Gaertner
to Martin
I noticed that lately codetools inserts all unit nems (in uses clause) in lowercase only? Is there are reason, or an option for that?

No, because they must be written mixed case.

They looked reall nice and readable in mixed case...

How can can I reproduce this?

Mattias

Reply by email

Martin Friebe
to Mattias Gaertner
Mattias Gaertner wrote 19 lines
On Thu, 04 Jun 2009 17:31:27 +0100 Martin wrote: > I noticed that lately codetools inserts all unit nems (in uses > clause) in lowercase only? > Is there are reason, or an option for that? > No, because they must be written mixed case. > They looked reall nice and readable in mixed case... > 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.

Martin

Reply by email

Mattias Gaertner
to Martin Friebe
Show quoted text 18 lines
[...] > 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

Reply by email