From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: generic provokes segmentation fault
Date: Sun, 17 May 2020 13:51:20 -0400
Date: 2020-05-17T13:51:20-04:00 [thread overview]
Message-ID: <q0u2cf925qavtms54rr082g12b125088j0@4ax.com> (raw)
In-Reply-To: hicvepF6b7sU1@mid.individual.net
On Sun, 17 May 2020 16:19:05 +0200, hreba <f_hreba@yahoo.com.br> declaimed
the following:
>
>generic
> dim: Positive;
> type Float is digits<>;
>package odeiv2 is
>...
>
>and substitute in the main program
>
> package Ode renames odeiv2;
>
>with
>
> type Real is digits 6;
> package Ode is new odeiv2 (2, Real);
>
>and change nothing else, I get a
>
I'm not positive -- haven't really done enough Ada programming even
though I've liked the language since SIGPlan published the
reference/rationale based upon GREEN.
However, if I interpret Barnes - Ada 2012, the parameters are setting
dim <= 2
and defining
type Float is digits Real
... and I'd be leery of that second statement...
What happens if you instantiate using
package Ode is new odev2 (2, 6)
OR change the template to
type Float is private
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
next prev parent reply other threads:[~2020-05-17 17:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-17 14:19 generic provokes segmentation fault hreba
2020-05-17 17:51 ` Dennis Lee Bieber [this message]
2020-05-17 18:34 ` Dmitry A. Kazakov
2020-05-18 11:29 ` hreba
2020-05-18 12:36 ` Dmitry A. Kazakov
2020-05-18 20:16 ` hreba
2020-05-18 21:30 ` Dmitry A. Kazakov
2020-05-17 21:02 ` Jeffrey R. Carter
2020-05-18 20:21 ` hreba
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox