How do you name your units?
I do the following.
I always use a 'U' prefix in front of the unit name (almost like 'T' for
a classname)
If the unit is a form unit i.e. has a xfm then I call the unit
'U' + <formname>.pas e.g. UfrmMain.pas
If the unit is not a form unit then I use a project/company abr. prefix
after the 'U' prefix. as in 'U' + 'proj/company' + <unitname>.pas e.g.
UabcTypes.pas
--
A different convension I can think of is to loose the 'U' and always use
the proj/company prefix in Caps e.g. ABCDETypes.pas, ABCDEfrmMain.pas, etc.
Also, for a case sensitive OS like Linux, it is perhaps a good idea to
use only lower case letters?
Any other better suggestions? I am willing to addapt :)
siegs
Just give them sound names. Sometimes if a bunch of unit belongs together
(e.g. a subsystem) they get a common prefix.
> Also, for a case sensitive OS like Linux, it is perhaps a good idea to
> use only lower case letters?
And I always use lowercase letters. This makes copying with wildcards under
*nix a lot easier.
> Any other better suggestions? I am willing to addapt :)
Don't bother, not much to gain with such details.
??? means main purpose of unit.
Hür AKDÜLGER
"SiegfriedN" <snied...@yahoodotco.uk> wrote in message
news:427f...@newsgroups.borland.com...
To me it starts to matter when you have a variety of applications. I
guess a different directory sorts it out, but for example having 3rd
party component libs each lib unit needs to have a unique name.
Another thing, when you have a client and a app server in the system the
unit names could differenciate between the client and the server as well.
I have units with 'base' classes, utils - common to all apps which I
prefix with 'PEX' in this case.
I just wanted to know if there was a standard people use - i.e. I do not
necessarily want to enforce my way of doing things when there was not a
proper naming system before..
Siegs
Sure. But IMHO a best effort is the best solution, and resolve the few
problems by hand. Complicated systems have the disadvantage that everybody
has its own little system, and you end up with a bunch of different systems.
> I just wanted to know if there was a standard people use - i.e. I do not
> necessarily want to enforce my way of doing things when there was not a
> proper naming system before..
Nope. I think if you want this you really want namespaces for units. (I don't,
since that opens up a whole different can of worms)
An examples:
fPersonSelect.pas contain form that is able to select person from the list
of persons.
dUsers.pas contain data module which most likely manipulate with table of
users.
uFileUtils.pas useful utilites for handling of files.
cPerson.pas declares a class named TPerson.
"SiegfriedN" <snied...@yahoodotco.uk> wrote in message
news:427f...@newsgroups.borland.com...