comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: Re: use of 'Base to compensate for the lack of information
Date: Wed, 27 Dec 2017 05:53:34 -0800 (PST)
Date: 2017-12-27T05:53:34-08:00	[thread overview]
Message-ID: <639ee8ec-8b01-4f05-a13e-289e86dfc820@googlegroups.com> (raw)
In-Reply-To: <p2075j$m0$1@gioia.aioe.org>

Le mercredi 27 décembre 2017 14:28:22 UTC+1, Dmitry A. Kazakov a écrit :
> On 2017-12-27 13:29, Mehdi Saada wrote:
> 
> > It seems good and practical, but at one time, I need the coefficient 
> > to be multiplied by the coefficients' array index, which is a
> > Natural.
> 
> Does not make sense, but ...

Ahahah... Now I read myself, I think the same: utter nonsense.
I mean "array of ELEMENT (which should be rational coefficients, but can be integer or modular), indexed by signed integers".

Hence, that should be ok, and the user should only need to provide ELEMENT, T_DEGRE and NULL_ELEMENT. No need for a maximum degre anymore, by the way.
generic
    type T_DEGRE is range <>;
    type Element is private;
    with function "+" (E1,E2: in ELEMENT) return ELEMENT is <>;
    with function "-" (E1,E2: in ELEMENT) return ELEMENT is <>;
    with function "-" (E1: in ELEMENT) return ELEMENT is <>;
    with function "*" (E1: in ELEMENT; E2: in T_DEGRE) return ELEMENT is <>;
    with function "/" (E1,E2: in ELEMENT) return ELEMENT is <>;
    with procedure ECRIRE(E1: in ELEMENT) is <>;
    NULL_ELEMENT: in ELEMENT;


  reply	other threads:[~2017-12-27 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-27 12:29 use of 'Base to compensate for the lack of information Mehdi Saada
2017-12-27 13:28 ` Dmitry A. Kazakov
2017-12-27 13:53   ` Mehdi Saada [this message]
2017-12-27 16:10 ` Jeffrey R. Carter
replies disabled

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