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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8147387fe25d4e2a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Mart van de Wege Newsgroups: comp.lang.ada Subject: Re: Random number generation Date: Thu, 30 Dec 2010 13:25:20 +0100 Message-ID: <86pqsja1n3.fsf@gareth.avalon.lan> References: <864o9vbkwz.fsf@gareth.avalon.lan> <8o3920Fn0vU1@mid.individual.net> <4d1c72cf$0$6772$9b4e6d93@newsspool3.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: individual.net j9PXTT0pAhcnFxYj4rVZUwo5+f3dizSKATKn9PF11sc5tLHsaO X-Orig-Path: gareth.avalon.lan!not-for-mail Cancel-Lock: sha1:xdjLY8lz1/kYN4KAZ3Zik5V2Ozg= sha1:kJqoHoJ8BOEOENtgMTP5A9AGsZo= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Xref: g2news1.google.com comp.lang.ada:16253 Date: 2010-12-30T13:25:20+01:00 List-Id: Georg Bauhaus writes: > > OTOH, the Size parameter is fixed at 6, so subtype Die_Size and > the generator could be placed outside Roll. Anyway, another > nest will give suitable life times to the objects involved. > How does that work? Because if I move out the declaration of the Die_Size subtype out of the function, I cannot instantiate Discrete_Random with a run-time dependent range, right? And I'd need to instantiate Discrete_Random outside the function, because otherwise I can't call Generator, or can I? Mart -- "We will need a longer wall when the revolution comes." --- AJS, quoting an uncertain source.