From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!peer03.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 17 May 2020 12:51:20 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: generic provokes segmentation fault Date: Sun, 17 May 2020 13:51:20 -0400 Organization: IISS Elusive Unicorn Message-ID: References: User-Agent: ForteAgent/8.00.32.1272 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-DbNt5bVhsxA225azSkbwf0v8lzsNrPh6BZuGJKeGYkUYxjPttrjfMnqBBDCB8VZut703lnvW7jxpqgv!Mr4YL6nZspMS259qP/zXnWUo9jCCCmEjpCMxy8FLfykQ0DtKckkIazA68Aa9yVR0JsmpoNbe X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2111 X-Received-Bytes: 2354 X-Received-Body-CRC: 2110827618 Xref: reader01.eternal-september.org comp.lang.ada:58714 Date: 2020-05-17T13:51:20-04:00 List-Id: On Sun, 17 May 2020 16:19:05 +0200, hreba 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/