comp.lang.ada
 help / color / mirror / Atom feed
From: Preben Randhol <randhol@pvv.org>
Subject: Re: Help ... CONSTRAINT_ERROR
Date: 1999/11/30
Date: 1999-11-30T10:18:45+00:00	[thread overview]
Message-ID: <m37lj0l1t7.fsf@kiuk0156.chembio.ntnu.no> (raw)
In-Reply-To: 81vfu6$sem$1@tobruk.sydney.gecm.com

"jxredi" <jxredi@gecms.com.au> writes:

| Hi,
| I was wondering if you could help me out with this problem (using ADA83) :
| 
| package R_IO is new TEXT_IO.FLOAT_IO(Float);
| NUM : STRING :=   "hi there";
| FNUM : Float := 0.75;
| R_IO.PUT(NUM,FNUM);   -- this is where the problem is ... but what's wrong
| ??

R_IO takes float but not a string.

I would have done this: (I only know Ada95 though)

Text_IO.Put(Num);
R_IO.Put(FNUM);

Or I would have done:

Text_IO.Put(Num & Float'Image(FNUM))

NB: Note that I only know some Ada95, so if this doesn't work with
Ada83 it is me that is wrong not the compiler :-)
-- 
Preben Randhol -- [randhol@pvv.org] -- [http://www.pvv.org/~randhol/]     
         "Det eneste trygge stedet i verden er inne i en fortelling." 
                                                      -- Athol Fugard




  reply	other threads:[~1999-11-30  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-30  0:00 Help ... CONSTRAINT_ERROR jxredi
1999-11-30  0:00 ` Preben Randhol [this message]
1999-11-30  0:00 ` reason67
1999-11-30  0:00   ` Preben Randhol
1999-11-30  0:00     ` David C. Hoos, Sr.
1999-11-30  0:00     ` Robert A Duff
1999-11-30  0:00       ` Ted Dennison
1999-11-30  0:00     ` reason67
1999-12-02  0:00 ` Stephen Leake
1999-12-06  0:00 ` skamn
replies disabled

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