Re: [m-users.] Random Number Generator

Mark Brown <[email protected]>
Newsgroups gmane.comp.lang.mercury.general
Message-ID <CAM4AczAy48G363VcSLg6C7g9=-0SPmTq+5325SeVpoRGRiU8Ng@mail.gmail.com>
On Wed, Aug 2, 2023 at 2:55 AM Volker Wysk <[email protected]> wrote:
>
> Hi, Mark
>
> Am Dienstag, dem 01.08.2023 um 22:08 +1000 schrieb Mark Brown:
> > > Yes, that's what I was wondering. And if it was possible to get rid of
> > > that
> > > extra argument.
> >
> > You can use one of the submodules directly.
>
> Unless if you want to attach the RNG to the IO state.

That's correct, we don't provide a global RNG of any sort. You can use
get_globals and set_globals in the I/O module to implement this
interface in a straightforward way, but we don't recommend this as it
is a poor design. That is why those predicates are obsolete, and the
user is advised to use a mutable instead (which is what I was
suggesting above).

Mark
_______________________________________________
users mailing list
[email protected]
https://lists.mercurylang.org/listinfo/users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.