[net.lang.ada] Questions about Ada

steve@sdcrdcf.UUCP (Steven Holtsberg) (02/05/86)

Two Questions:

(1) In the reference manual, on page 8-10, it says that overloading
is defined for subprograms, enumeration literals, operators, and single entries

However, I do not know what "single entries" are, and I cannot
find a definition in the manual.

Does anyone know the definition of a "single entry"?


(2) On page 3-20 of the reference manual, the canonical form for
any floating point number other than zero is given as

sign * mantissa * (radix ** exponent)

My question:  Why is radix given as a parameter?
Isn't the radix, by definition, two?

markb@sdcrdcf.UUCP (Mark Biggar) (02/05/86)

In article <2608@sdcrdcf.UUCP> steve@sdcrdcf.UUCP (Steven Holtsberg) writes:
>(1) In the reference manual, on page 8-10, it says that overloading
>is defined for subprograms, enumeration literals, operators, and single entries
>
>However, I do not know what "single entries" are, and I cannot
>find a definition in the manual.
>
>Does anyone know the definition of a "single entry"?

I took this to mean that a tasks entires can be overloaded independently
and not as a group.

>(2) On page 3-20 of the reference manual, the canonical form for
>any floating point number other than zero is given as
>
>sign * mantissa * (radix ** exponent)
>
>My question:  Why is radix given as a parameter?
>Isn't the radix, by definition, two?

NO, the radix of a floating constant is programmer specifiably.
The default for a constant like 1.3E-3 is radix 10, but if you say

        constant                value

        16#E.0#E1               14*(16**1)=224.0
        2#1.1111_1111_111#E11   1.1111_1111_111      *(2**11) = 4095.0
                                               base 2
The radix of the internal representation for FLOAT constants
is implementation defined.

Mark Biggar
{allegra,burdvax,cbosgd,hplabs,ihnp4,akgua,sdcsvax}!sdcrdcf!markb

rgenter@BBN-LABS-B.ARPA (02/10/86)

In message <2608@sdcrdcf.UUCP>, Steven Holtsberg
<sdcsvax!sdcrdcf!steve@ucbvax.berkeley.EDU> writes:

> Two Questions:
> (1) In the reference manual, on page 8-10, it says that overloading
> is defined for subprograms, enumeration literals, operators, and single entries
> However, I do not know what "single entries" are, and I cannot
> find a definition in the manual.
> Does anyone know the definition of a "single entry"?
> (2) On page 3-20 of the reference manual, the canonical form for 
> any floating point number other than zero is given as
> sign * mantissa * (radix ** exponent)
> My question:  Why is radix given as a parameter?
> Isn't the radix, by definition, two?

No.  On IBM-370s and their lookalikes, for example, it is 16.
--------
Rick Genter 				BBN Laboratories Inc.
(617) 497-3848				10 Moulton St.  6/506
rgenter@labs-b.bbn.COM  (Internet new)	Cambridge, MA   02238
rgenter@bbn-labs-b.ARPA (Internet old)	...!{decvax,linus}!bbncca!rgenter (UUCP)

rose@Shasta.ARPA (02/10/86)

In article <2608@sdcrdcf.UUCP> steve@sdcrdcf.UUCP (Steven Holtsberg) writes:
>
>Does anyone know the definition of a "single entry"?

Task entries can be either single entries or members of an entry family.
Thus, entry family members CANNOT be overloaded.  This should answer your
question.  My favorite undefined buzzphrase in the LRM is "unconstrained
types with discriminants," which I eventually found out includes not
only discriminated record types, but also private types with a discriminant
part (whose full type declaration must thus be a record type).

-- David.