Ah, thanks Jim. When I was looking at this query I saw it through the flat
view of STRING_8 so the ensure part did not appear. I'll try to remember
that for the future as I think I would have understood it use by looking at
the part you pointed out. Thanks again.
Regards
Chris Saunders
----- Original Message -----
From: Jimmy Johnson
To:
[hidden email]
Sent: Sunday, September 20, 2009 7:39 PM
Subject: [eiffel_software] Re: Question about `is_real_sequence'
Chris,
You got me curious so...
If you compare the ensure statements [just comments] of `is_real_sequence'
and `is_real' I think it will answer your question. In layman's terms I
think `is_real' is true if the string could be converted to a REAL with in
the size/precision limits of REAL; `is_real_sequence' is true if it looks
like a real number and has no length limit (not necessarily convertable to a
REAL).
so the string "+6.63e-34" would be `is_real_sequence' and also would be
`is_real'.
Jimmy J. Johnson
--- In
[hidden email], "Chris Saunders" <evas@...> wrote:
>
> I'm not sure how to interpret the purpose of `is_real_sequence' from class
> READABLE_STRING_8. The documentation says "Does `Current' represent a real
> sequence?" but I'm not sure what "real sequence" means. What I was looking
> for is something similar to `is_double' but that accepts strings of any
> length. For example I would like to know from code if
> 12345678901234567890123456789012345678901234567890.123456789012345678901234567890
> represents a real number. Is that what `is_real_sequence' provides?
>
> Regards
> Chris Saunders
>