comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Using ARRAYS for grade reporting?
Date: 1998/04/19
Date: 1998-04-19T00:00:00+00:00	[thread overview]
Message-ID: <dewar.892991902@merv> (raw)
In-Reply-To: 1998041903445200.XAA06273@ladder01.news.aol.com


GOTHIC SIN said

<<Why don't  you use a RECORD?

Type Grade_report_record is RECORD
    Names : string;
    grades : character; -- or you can use the numeric grade natural
                                      -- or float.
end record;

goth
>>


In order to avoid the "blind-leading-the-blind" phenomenon which can be
very confusing, I strongly suggest that unless you are a real expert in
Ada (and perhaps even then -- I always do) *compile* your code before
posting it to make sure that it does not have obvious errors.

The above code is of course wrong, you cannot use the type String here. There
are many possible corrections (constrain the string, use Unbounded_String,
use a discriminant ...) depending on the exact need.






  reply	other threads:[~1998-04-19  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-18  0:00 Using ARRAYS for grade reporting? Sam
1998-04-19  0:00 ` GOTHIC SIN
1998-04-19  0:00   ` Robert Dewar [this message]
1998-04-19  0:00     ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1998-04-19  0:00 tmoran
1998-04-19  0:00 ` Robert Dewar
1998-04-21  0:00   ` Tom Moran
     [not found] <01bd6b1c$38b6c3c0$0e2915c0@p5120>
1998-04-19  0:00 ` GOTHIC SIN
replies disabled

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