comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: overriding "*", was Re: What's the ICFP Programming contest?
Date: Tue, 01 Jul 2003 05:58:42 GMT
Date: 2003-07-01T05:58:42+00:00	[thread overview]
Message-ID: <mq9Ma.675$C36.1204@rwcrnsc51.ops.asp.att.net> (raw)
In-Reply-To: xSJLa.57913$3d.28280@sccrnsc02

For the contest I needed to override normal fixed point multiply and
divide, so I declared
  type Root_Numbers is delta ...
  type Numbers is new Root_Numbers;
  function "*"(Left, Right : Numbers) return Numbers;
  A, B, C : Numbers;
and tried to use it in formulas like
  C := Numbers(A * B);
But a compiler said the "*" was ambiguous between my function and Standard.
It seems to me I overrode, and thus hid, Standard."*", no?
  p.s. I did manage to write a program that successfully drove the first 5
out of 9 race tracks.  It gets really lost though in the maze-like ones.
The "programming" contest really becomes an "algorithm" contest there.



  reply	other threads:[~2003-07-01  5:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-26  1:30 What's the ICFP Programming contest? tmoran
2003-06-26  8:24 ` Preben Randhol
2003-06-27 20:37   ` Michael Erdmann
2003-06-28  0:21     ` tmoran
2003-06-28  7:33       ` Michael Erdmann
2003-06-29  6:47         ` Hyman Rosen
2003-06-29 22:37           ` tmoran
2003-07-01  5:58             ` tmoran [this message]
2003-07-01 20:52               ` overriding "*", was " Randy Brukardt
2003-07-02 17:10                 ` tmoran
2003-07-02 18:13                   ` Randy Brukardt
2003-07-03  7:55               ` Robert I. Eachus
2003-07-04  7:01                 ` Robert I. Eachus
replies disabled

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