comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <sb463ba@l1-hrz.uni-duisburg.de>
Subject: Re: Read +Inf from file/string
Date: Wed, 6 Nov 2002 17:23:30 +0000 (UTC)
Date: 2002-11-06T17:23:30+00:00	[thread overview]
Message-ID: <aqbj6i$6se$1@a1-hrz.uni-duisburg.de> (raw)
In-Reply-To: aqafcu$mj2$1@newstoo.ericsson.se

"Atle R�stad" <aer@edh.ericsson.se> wrote:
: There is no problem in writing (put) an infinite number this will produce
: "+Inf****************",  but how can i read (get) it?

Afaik, you might have to check, because [an instance of float_IO].Get
"reads the longest possible sequence of characters matching
 the syntax of any of the following [numeric literals]"
 [...]
 The exception Data_Error is propagated if the sequence input
 does not have the required syntax or if the value obtained is
 not of the subtype Num.

(RM A.10.9(13,21))

You can always Get a string an then check it for Inf and then
possibly Get a numeric literal from the string using the Get
for strings.

-- georg



  reply	other threads:[~2002-11-06 17:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-06  7:21 Read +Inf from file/string Atle R�stad
2002-11-06 17:23 ` Georg Bauhaus [this message]
2002-11-06 17:38 ` Stephen Leake
replies disabled

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