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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d1df6bc3799debed X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Not intended for use in medical, Date: 1997/05/19 Message-ID: #1/1 X-Deja-AN: 243296631 References: <3.0.32.19970423164855.00746db8@mail.4dcomm.com> <01bc63a2$e3e1a940$LocalHost@xhv46.dial.pipex.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-05-19T00:00:00+00:00 List-Id: In article , Matthew Heaney wrote: >This was my first time using a protected object, and perhaps I have misused >it somehow. Maybe a state-changing protected procedure would force a new >random number to be generated when invoked, and it was incorrect to use a >protected function. That's right. Protected functions aren't supposed to modify state like that, since multiple protected functions (on the same protected object) can execute in parallel. I don't know if that's the bug causing your trouble, but is *a* bug. As you say -- use a protected procedure. If you insist on function-call notation, then wrap *that* in (normal) function. - Bob