comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: Localized Variable Declaration
Date: Mon, 3 Jun 2002 09:59:16 -0400
Date: 2002-06-03T13:59:17+00:00	[thread overview]
Message-ID: <adfsnl$150$1@nh.pace.co.uk> (raw)
In-Reply-To: m37klhkk02.fsf@jupiter.solar.system

C and C++ programmers tend to write things without spaces or underscores, so
you can tell their origin when you see Ada code that looks like:

SomeProcedureName(X,Y,Z);

Ada programmers make more frequent use of spaces and underscores, so it is
much more common to see:

Some_Procedure_Name (X, Y, Z);

To a large extent, it is a matter of taste, but you can use the ARM and Ada
Quality & Style as good guidelines. In general, I suggest this: When working
on a program someone else wrote, stick to whatever style they used. When
working on a group project, get everyone to agree to some style and stick to
it - but avoid nit-picking arguments over every single comma or space. When
working strictly on your own, use any style you like - but be consistent.

There are various tools that can be used to format Ada code and their use
will bring you a certain consistency, but I've never found them to be a 100%
substitute for hand-formatting and I've not encountered one that ever
formatted things the way *I* would do it. :-) (Well, except for one I wrote
a bunch of years ago for Ada83 - and even then, my style has evolved since
then & it doesn't work for Ada95. :-)

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Michael Bode" <m.g.bode@web.de> wrote in message
news:m37klhkk02.fsf@jupiter.solar.system...
>
> Could someone please help a poor Ada beginner and tell me when to
> leave a blank between a function name and its parameter list and when
> not? I personally find the above Put_Line("write two number"); more
> readable than Float := Float (a) * Float (b) * 42.42; because I think
> of a function and its parameters as a unity, but I've seen the blanks
> in textbooks quite often. OTHO "Ada Quality and Style" favors the
> Put_Line(...)
>
> PS: No Holy War intended.





  parent reply	other threads:[~2002-06-03 13:59 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-31 13:24 Localized Variable Declaration David Rasmussen
2002-05-31 13:32 ` martin.m.dowie
2002-05-31 13:38   ` David Rasmussen
2002-05-31 13:50     ` martin.m.dowie
2002-05-31 14:48       ` David Rasmussen
2002-05-31 15:26         ` martin.m.dowie
2002-05-31 15:45           ` David Rasmussen
2002-05-31 18:30             ` Jeffrey Carter
2002-06-02  2:21             ` steve_H
2002-06-02  9:59               ` David Rasmussen
2002-06-02 15:06                 ` Robert Dewar
2002-06-02 15:27                   ` David Rasmussen
2002-06-02 23:25                     ` Hyman Rosen
2002-06-02 23:28                       ` David Rasmussen
2002-06-02 23:52                     ` martin.m.dowie
2002-06-02 23:58                       ` David Rasmussen
2002-06-03 11:22                         ` martin.m.dowie
2002-05-31 15:51           ` Mark Johnson
2002-05-31 17:47             ` martin.m.dowie
2002-05-31 21:53           ` tmoran
2002-06-02 15:10             ` Robert Dewar
2002-06-02 15:28               ` Vinzent Hoefler
2002-06-02 18:04               ` tmoran
2002-06-07  3:32               ` Richard Riehle
2002-05-31 15:59         ` Darren New
2002-06-02 15:20           ` Robert Dewar
2002-06-03  5:29             ` Michael Bode
2002-06-03  6:17               ` Preben Randhol
2002-06-04 10:26                 ` Simon Wright
2002-06-03 13:59               ` Marin David Condic [this message]
2002-06-05  8:36                 ` Dmitry A.Kazakov
2002-06-03 17:29               ` Pascal Obry
2002-06-16 23:34               ` Robert A Duff
2002-06-04 12:13             ` Georg Bauhaus
2002-05-31 19:00         ` Mike Silva
2002-06-01  0:58         ` Robert Dewar
2002-05-31 18:04       ` Larry Kilgallen
2002-05-31 15:06     ` Marin David Condic
2002-06-01 14:53       ` Stephen Leake
2002-06-02 21:18         ` Florian Weimer
2002-06-11  7:16         ` David Thompson
2002-05-31 18:30     ` Stephen Leake
2002-06-02  1:52 ` Stefan Skoglund
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox