Board index » delphi » Does B/T Pascal have generally accepted naming conventions?

Does B/T Pascal have generally accepted naming conventions?

I hope the subject line communicated my intent somewhat.

My question is whether Borland / Turbo Pascal has generally accepted rules
for naming variables, constants, etc..  I'm returning to Pascal after having
used VB for a few years and find it hard to get over using my familiar
variable prefix identifiers.  For example: intDogBiscuit or iDogBiscuit.

This question might be better answered via the Delphi newsgroups and
eventually I hope to add Delphi to my skills but for now I'm trying to learn
the _language_ using TP 5.5.

TIA, G.S.

PS -- "Where can I download TP7 for free and why is my program getting
divide by zero errors on my new PII 400?"...just kidding.

 

Re:Does B/T Pascal have generally accepted naming conventions?


Quote
> My question is whether Borland / Turbo Pascal has generally accepted rules
> for naming variables, constants, etc..
>PS"Where can I download TP7 for free and why is my program getting
> divide by zero errors on my new PII 400?"...just kidding.

Hi, I am using this convention:
const AHOJFILE='something'
type Tintarr = array[]of integer;
        TPintarr = ^Tintarr;
var numsarrP:TPintarr;
and so on...

to get TP7 you can look for it through altavista;  search for "+turbo
+pascal +7.0 +download"
dbz is known bug of crt unit, delay procedure.

Re:Does B/T Pascal have generally accepted naming conventions?


Hi,

on Wed, 22 Sep 1999 at 18:42:53 o'clock, Gary Singleton wrote:

Quote
> My question is whether Borland / Turbo Pascal has generally accepted rules
> for naming variables, constants, etc..

None that I know of, at least if you insist on the constraint that it be
generally accepted, maybe with an important exception: Types are marked
with an uppercase T, and Pointer types with a P:

type
   PInteger = ^Integer;
   PMyType  = ^TMyType;
   TMyType  = record
                 Bla : TBla;
              end;

I think this convention became popular with Objects.

Quote
> I'm returning to Pascal after having
> used VB for a few years and find it hard to get over using my familiar
> variable prefix identifiers.  For example: intDogBiscuit or iDogBiscuit.

These are not common in Pascal. AFAIK, Borland's coding standard requires
their programmers to *not* use this "Microsoftish" style.

Quote
> PS -- "Where can I download TP7 for free and why is my program getting
> divide by zero errors on my new PII 400?"...just kidding.

You forgot: "For a cool game, I need to calculate the Fibonacci numbers -
anyone ever done this?" :-)

 - Sebastian

--
If you read this text, your newsreader doesn't support signature frames.

Other Threads