unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kai Grossjohann <kai@emptydomain.de>
Subject: Re: How to create random characters?
Date: Thu, 18 Dec 2003 10:32:50 +0000	[thread overview]
Message-ID: <878ylawh4d.fsf@emptyhost.emptydomain.de> (raw)
In-Reply-To: mailman.242.1071742690.868.help-gnu-emacs@gnu.org

Brad Collins <brad@studiojungle.net> writes:

> I did find if you use Emacs' "random" function, it will always use the
> same seed to generate random numbers.  You can use (random t) to use a
> different seed, and get different random sequences every time, but my
> function uses this argument as a limit.

My understanding is that you call (random t) once, eg after Emacs
starts up or when your file is loaded.  After this, you can call
(random 42) to obtain numbers in the desired range.

Does it not work that way?  I think it's intended to work that way.
If it doesn't, that might be a bug.

Kai

  parent reply	other threads:[~2003-12-18 10:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-14  9:59 How to create random characters? Brad Collins
2003-12-14 11:10 ` Eli Zaretskii
     [not found] ` <mailman.53.1071403922.868.help-gnu-emacs@gnu.org>
2003-12-15  8:07   ` Joakim Hove
2003-12-15  8:46     ` Eli Zaretskii
2003-12-18  9:22 ` Brad Collins
     [not found] ` <mailman.242.1071742690.868.help-gnu-emacs@gnu.org>
2003-12-18 10:32   ` Kai Grossjohann [this message]
2003-12-18 17:30     ` Brad Collins
     [not found]     ` <mailman.280.1071771962.868.help-gnu-emacs@gnu.org>
2003-12-18 18:30       ` Harald Maier
2003-12-18 18:31       ` Kai Grossjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878ylawh4d.fsf@emptyhost.emptydomain.de \
    --to=kai@emptydomain.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).