comp.lang.ada
 help / color / mirror / Atom feed
From: mfb@mbunix.mitre.org (Michael F Brenner)
Subject: Re: problem with operation
Date: 1998/05/09
Date: 1998-05-09T00:00:00+00:00	[thread overview]
Message-ID: <6j2ksf$50n@top.mitre.org> (raw)
In-Reply-To: 01bc5cbd$c4565da0$LocalHost@default


Since the elements of the matrix are private, they do not carry
with them any + operators. One way to repair this is to give
the generic matrix package that + operator in addition to the element
type, like this:

     generic
        ...
        type elements is private;
        with function "+" (left, right: elements) return elements;
        ...
     package fixed_matrix_essence is
        type fixed_matrices is private;
        ...
        function "+" (left, right: fixed_matrices) return fixed_matrices;
        ...

The body will then be able to add elements, because you gave it
the function + for elements. 

Other possibilities include: derived or other global operations,
or a non-private element type for the matrices.






  reply	other threads:[~1998-05-09  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-09  0:00 problem with operation Bernhard Rumpler
1998-05-09  0:00 ` Michael F Brenner [this message]
1998-05-09  0:00   ` Robert Dewar
1998-05-09  0:00 ` Matthew Heaney
replies disabled

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