comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Advice needed!   Ada compilers for school project.
Date: Wed, 24 Oct 2001 19:54:18 GMT
Date: 2001-10-24T19:54:18+00:00	[thread overview]
Message-ID: <K%EB7.65301$gT6.33413939@news1.rdc1.sfba.home.com> (raw)
In-Reply-To: bf8dbe70.0110240658.4369b684@posting.google.com

> what Ada compiler would be best suited for students with no experience in Ada
  Look at Janus Ada for PCs.  It has good compile time diagnostic messages,
but it also has invaluable run-time diagnostics*.  It's how I learned Ada.
I'm sure RR has a reasonable academic price.  www.rrsoftware.com

* For instance it gives:
** Unhandled CONSTRAINT_ERROR
   Index or Subtype out of bounds - Pos of Error Value =  67
On Line Number 12 In TEST.DECREMENT
Called from line number 18 In TEST.NEXT_DAY
Called from line number 25 In TEST

  when you run:
procedure test is
  type liquid is range 32 .. 212;
  type pleasant is range 68 .. 72;

  procedure decrement(x : in out liquid) is
  begin
    x := x-1;
  end decrement;

  procedure decrement(x : in out pleasant) is
  begin
    x := x-1;
  end decrement;

  procedure next_day(y : in out liquid; z : in out pleasant) is
  begin
    decrement(y);
    decrement(z);
  end next_day;

  water_temperature : liquid := 34;
  air_temperature : pleasant := 69;
begin
    next_day(water_temperature, air_temperature);
    next_day(water_temperature, air_temperature);
    next_day(water_temperature, air_temperature);
    next_day(water_temperature, air_temperature);
    next_day(water_temperature, air_temperature);

end test;



      parent reply	other threads:[~2001-10-24 19:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-24 14:58 Advice needed! Ada compilers for school project Ben
2001-10-24 15:08 ` Jerry Petrey
2001-10-24 15:13 ` Wes Groleau
2001-10-24 15:28 ` Alfred Hilscher
2001-10-24 16:14 ` Preben Randhol
2001-10-24 19:54 ` tmoran [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