comp.lang.ada
 help / color / mirror / Atom feed
From: gautier_niouzes@hotmail.com
Subject: Re: generic with function procedure
Date: Fri, 5 Jun 2020 07:52:10 -0700 (PDT)
Date: 2020-06-05T07:52:10-07:00	[thread overview]
Message-ID: <12b67609-2acc-4a80-88c0-5567a89667f9o@googlegroups.com> (raw)
In-Reply-To: <d10989b4-ed2f-47c8-8f95-4d2f0d9cdafdo@googlegroups.com>

It depends on how you have defined g1 and h1...
You may also want to pass Real as a generic parameter to make your "denm" package work for any precision. Perhaps doing so will solve your problem by the way.
Here is a package from Mathpaqs, as an inspiration.

with Ada.Numerics.Generic_Real_Arrays;

generic
  type Real is digits <>;
  with package Real_Arrays is new Ada.Numerics.Generic_Real_Arrays (Real);
  type Integer_Vector is array (Integer range <>) of Integer;

package Generic_Real_Linear_Equations is

  use Real_Arrays;

  function Linear_Equations ( A : Real_Matrix ;
                              Y : Real_Vector ) return Real_Vector ;
...

  reply	other threads:[~2020-06-05 14:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-05 14:35 generic with function procedure Gilbert Gosseyn
2020-06-05 14:52 ` gautier_niouzes [this message]
2020-06-05 15:45   ` Gilbert Gosseyn
2020-06-05 15:59     ` Dmitry A. Kazakov
2020-06-05 16:09       ` Anh Vo
2020-06-05 20:28     ` Jeffrey R. Carter
2020-06-09 16:44 ` Shark8
2020-06-10  8:21   ` Gilbert Gosseyn
2020-06-10  8:45     ` AdaMagica
2020-06-12 14:29     ` Shark8
2020-06-12 16:45     ` Simon Wright
2020-06-12 18:49       ` Simon Wright
replies disabled

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