Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Books Or Documents On Variable Naming Conventions

1 view
Skip to first unread message

dge...@lansoft.com

unread,
Aug 30, 1997, 3:00:00 AM8/30/97
to dge...@lansoft.com

Hello Everybody:

Does anyone know of any books, documents or other resources which
discuss variable naming conventions in Delphi, Pascal or Programming
Languages in General?

I briefly looked at Code Complete by Steve McConnell (?), but it
didn't seem to have much of what I wanted. Maybe I needed to look
closer. Is Code Complete a good book for this or are their others?

What types of naming conventions does the Delphi, Pascal or
Programming community at large use?

Thanks,
Dan Geiser <dge...@lansoft.com>

-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet

Lawrence Lichtmann

unread,
Aug 31, 1997, 3:00:00 AM8/31/97
to

The Orange County Delphi Users Group Web site has a Delphi standards
document which includes a section on naming conventions which you might
want to look at. (http://www.ocdelphi.org)

Anil M S

unread,
Sep 4, 1997, 3:00:00 AM9/4/97
to

Hi Dan

You can refer toMicrosoft's coding conventions normally used in Visual
Basic. You can also refer to various Delphi books and see the coding
convention followed. You will observe that the books use a convention where
the object type is added to the name and Microsoft does it the other way.

For exmaple, if you have a button called OK, then the way it is used by
Microsoft is
BtnOK.

Delphi books usually refer to it as OKButton.

If the place you are working for does a lot of coding using Microsoft and
other Windows based tools, the best way to name variables would be something
similar to the Microsoft way. A lot of companies code in this way. The OK
button would be named as:
ButtonOK

The Button would already be a part of the name with a number following it.
We delete the number and add an identifer to that.


dge...@lansoft.com wrote in article <8728717...@dejanews.com>...

Stephen Posey

unread,
Sep 6, 1997, 3:00:00 AM9/6/97
to

On Thu, 4 Sep 1997 13:37:13 +0900, "Anil M S"
<ani...@justsystem.co.jp> wrote:

>You can refer toMicrosoft's coding conventions normally used in Visual
>Basic. You can also refer to various Delphi books and see the coding
>convention followed. You will observe that the books use a convention where
>the object type is added to the name and Microsoft does it the other way.
>
>For exmaple, if you have a button called OK, then the way it is used by
>Microsoft is
>BtnOK.
>
>Delphi books usually refer to it as OKButton.
>
>If the place you are working for does a lot of coding using Microsoft and
>other Windows based tools, the best way to name variables would be something
>similar to the Microsoft way. A lot of companies code in this way. The OK
>button would be named as:
>ButtonOK
>
>The Button would already be a part of the name with a number following it.
>We delete the number and add an identifer to that.

One additional "advantage" to having the class type at the beginning
of the indentifier is that doing so groups all of the like components
together in the Object Inspector list box.

I've considered adding an underscore to "one off" components on the
form (i.e. the form itself, Notebook components, or other rarities) so
that these sort at the top of the list; I just don't much like the
LOOK of identifiers starting with underscores; anybody got any other
ideas?

Regards,

Stephen Posey
slp...@concentric.net


0 new messages