Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site ecsvax.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!mcnc!ecsvax!dgary
From: dgary@ecsvax.UUCP (D Gary Grady)
Newsgroups: net.lang.ada
Subject: Re: Real numbers with Janus/Ada
Message-ID: <480@ecsvax.UUCP>
Date: Wed, 9-Jan-85 10:33:10 EST
Article-I.D.: ecsvax.480
Posted: Wed Jan  9 10:33:10 1985
Date-Received: Sat, 12-Jan-85 07:30:20 EST
References: <1883@burdvax.UUCP>, <245@gumby.UUCP>
Organization: Duke U Comp Ctr
Lines: 44

<>
> From g-frank@gumby.UUCP Wed Dec 31 19:00:00 1969
> According to their literature, Janus/Ada lacks "based real numbers."
> What the heck is that?  The term doesn't appear in Gehani.  I do think
> the language handles floats.  Funny waste of in line 8087 code . . .

A "based" number in Ada is a constant written in other than base 10.
The syntax is

based_number ::=
	base # based_integer [.based_integer] # [exponent]

base ::= integer

based_integer ::= extended_digit {[underscore] extended_digit}

extended_digit ::= digit | letter

where base is limited to 2 through 16 and extended digits to 0 through
F.  For example, the integer 255 can be written as any of the following:

16#FF#  16#FF#E0  2#1111_1111#  10#255#

and so on.  A based real number contains a decimal point.  4095.0 can be
written

16#F.FF#E2  2#1.1111_1111_111#E11

and so on.  Note that the exponent is in the appropriate base.  In
defense of Janus/Ada's omission of based reals, I don't think they're
likely to come up that often.  Based integers, however, are very nice.

The "official" definition of Ada is, I believe, MIL-STD-1815 and can be
ordered from the Superintendent of Documents, US Government Printing
Office, Washington, DC  20402.  I'm not sure of the current price, but I
think it's fairly cheap.

Best,

-- 
D Gary Grady
Duke U Comp Center, Durham, NC  27706
(919) 684-4146
USENET:  {seismo,decvax,ihnp4,akgua,etc.}!mcnc!ecsvax!dgary