comp.lang.ada
 help / color / mirror / Atom feed
From: mgk25@cl.cam.ac.uk (Markus Kuhn)
Subject: Re: trunc
Date: 1999/03/19
Date: 1999-03-19T00:00:00+00:00	[thread overview]
Message-ID: <7ctn9c$qtg$1@pegasus.csx.cam.ac.uk> (raw)
In-Reply-To: 7ctjsj$b20@top.mitre.org

mfb@mbunix.mitre.org (Michael F Brenner) writes:
|>    y:=x'floor;      -- Postcondition: Y is now the whole-number of X

GNAT 3.11p says "prefix of 'floor' attribute must be a type"
and the ARM agrees.

Correct would have been:

  y := float'floor(x);

Floor is a function, therefore it should look like one. Your
syntax looks like what might have been a convenient abbreviation,
but Ada is not about abbreviations.

Markus

-- 
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org,  WWW: <http://www.cl.cam.ac.uk/~mgk25/>




  reply	other threads:[~1999-03-19  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-18  0:00 trunc phadreus
1999-03-18  0:00 ` trunc Matthew Heaney
1999-03-18  0:00   ` trunc Tucker Taft
1999-03-19  0:00     ` trunc Michael Stark
1999-03-18  0:00   ` trunc Nick Roberts
1999-03-19  0:00 ` trunc Michael F Brenner
1999-03-19  0:00   ` Markus Kuhn [this message]
1999-03-22  0:00   ` trunc Howard W. LUDWIG
replies disabled

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