comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: gnatcheck
Date: Tue, 23 Dec 2008 14:49:30 -0500
Date: 2008-12-23T14:49:30-05:00	[thread overview]
Message-ID: <wcc63lallit.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: gioss0$q92$1@online.de

Stefan Soos <stefan.soos@gmx.de> writes:

> Thanks but I've already checked this source, but it's no help to
> me. It describes what gnatcheck does when using the
> Discriminated_Record rule. But I don't know why its a violation. Whats
> wrong with discriminated records?

There's nothing wrong with discriminated records.  If gnatcheck
complains about something, that doesn't mean it's bad -- it just means
that somebody wanted to avoid or take careful note of that feature.
That might have been a silly idea, or it might have been a wise
decision for that particular project.  It doesn't necessarily
apply to your project.

You have to decide on your own which stylistic rules to follow.
An Ada textbook or tutorial might help, but gnatcheck itself
will not give you this information.

> Another example. Predefined_Numeric_Types. I know I shouldn't used
> them. But I know it because a long time ago I read it in the
> ARM. Theres no reference in gnatcheck to the specific chapter in the
> ARM.

It's usually/often a good idea to define your own numeric types.
Not always.  And of course the person who designed type String
in package Standard didn't take that advice.

> I'd like to improve my code and evolve a good programming habit, but
> it's really hard to google all the rules with no results.

That's not really what gnatcheck is for.

- Bob



      parent reply	other threads:[~2008-12-23 19:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-22 20:21 gnatcheck Stefan Soos
2008-12-23  4:19 ` gnatcheck John B. Matthews
2008-12-23 16:22   ` gnatcheck Stefan Soos
2008-12-23 16:30     ` gnatcheck Ludovic Brenta
2008-12-23 16:53       ` gnatcheck Stefan Soos
2008-12-23 17:06         ` gnatcheck Ed Falis
2008-12-24 20:03     ` gnatcheck Stephen Leake
2008-12-23 19:49 ` Robert A Duff [this message]
replies disabled

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