From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: I'm facing an issue with: call to abstract procedure must be dispatching
Date: Sun, 13 Dec 2015 19:20:36 -0700
Date: 2015-12-13T19:20:36-07:00 [thread overview]
Message-ID: <n4l8sv$jk0$1@dont-email.me> (raw)
In-Reply-To: <2b70cc02-600e-4f4e-b6fe-86d7e01648ef@googlegroups.com>
On 12/13/2015 02:37 PM, Shark8 wrote:
>
> Package Counter is
> Procedure Inc;
> Procedure Dec;
> Function Value Return Natural;
> Private
> Data : Natural := 0;
> End Counter;
I wouldn't put the state in the private part.
> Package Body Counter is
Instead, I'd put it in the body
Data : Natural := 0;
> Procedure Inc is
> begin
> Data:= Natural'Succ( Data );
> end Inc;
>
> Procedure Dec is
> begin
> Data:= Natural'Pred( Data );
> end Dec;
I'd also use "+ 1" or "- 1", since those are clearer.
> Function Value return Natural is
> ( Data );
> End Counter;
--
Jeff Carter
"I don't know why I ever come in here. The
flies get the best of everything."
Never Give a Sucker an Even Break
102
next prev parent reply other threads:[~2015-12-14 2:20 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 16:45 I'm facing an issue with: call to abstract procedure must be dispatching Serge Robyns
2015-12-08 16:59 ` G.B.
2015-12-08 17:04 ` Dmitry A. Kazakov
2015-12-08 17:24 ` Serge Robyns
2015-12-08 17:42 ` Dmitry A. Kazakov
2015-12-08 18:00 ` Serge Robyns
2015-12-08 18:22 ` Dmitry A. Kazakov
2015-12-08 20:21 ` Serge Robyns
2015-12-08 21:08 ` Dmitry A. Kazakov
2015-12-08 21:55 ` Serge Robyns
2015-12-08 22:43 ` Serge Robyns
2015-12-08 22:55 ` Jeffrey R. Carter
2015-12-09 23:03 ` Randy Brukardt
2015-12-10 8:38 ` Serge Robyns
2015-12-10 23:43 ` Randy Brukardt
2015-12-09 8:48 ` Dmitry A. Kazakov
2015-12-09 10:53 ` G.B.
2015-12-09 12:03 ` Dmitry A. Kazakov
2015-12-09 13:42 ` G.B.
2015-12-09 14:23 ` Dmitry A. Kazakov
2015-12-08 22:55 ` Jeffrey R. Carter
2015-12-08 23:04 ` Serge Robyns
2015-12-08 23:42 ` Jeffrey R. Carter
2015-12-09 13:40 ` Jere
2015-12-09 13:48 ` G.B.
2015-12-09 15:33 ` Jere
2015-12-13 21:37 ` Shark8
2015-12-14 2:20 ` Jeffrey R. Carter [this message]
2015-12-15 7:26 ` Shark8
2015-12-08 17:30 ` Jeffrey R. Carter
2015-12-08 17:48 ` Serge Robyns
2015-12-08 18:46 ` Jeffrey R. Carter
2015-12-08 20:28 ` Serge Robyns
2015-12-08 22:20 ` 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