From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,13bec1d6e8f0eeee X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad.newshosting.com!newshosting.com!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: gnatcheck Date: Tue, 23 Dec 2008 14:49:30 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1230061770 14884 192.74.137.71 (23 Dec 2008 19:49:30 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 23 Dec 2008 19:49:30 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:CokzAfWyjPmY3DBU7+I+9bj1qok= Xref: g2news1.google.com comp.lang.ada:3081 Date: 2008-12-23T14:49:30-05:00 List-Id: Stefan Soos 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