all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kai Grossjohann <kai@emptydomain.de>
Subject: Re: How to create random characters?
Date: Thu, 18 Dec 2003 18:31:14 +0000	[thread overview]
Message-ID: <873cbiq8p9.fsf@emptyhost.emptydomain.de> (raw)
In-Reply-To: mailman.280.1071771962.868.help-gnu-emacs@gnu.org

Brad Collins <brad@studiojungle.net> writes:

>  When I evaluated (random t)
>
>    I got 80264346
>
>  But I need to get a single digit between 0-9 so I used (random 9)

I think you have a file which contains a function which invokes
random, right?

(defun brad-foo-func ()
  ...code which invokes (random 9)...)

My suggestion was to call (random t) *once*:

(random t)
(defun brad-foo-func ()
  ...code which invokes (random 9) ...)

I apologize if this was already clear, and if you tried it, and it
failed.  But I'm getting the impression you were trying something
else.

Kai

      parent reply	other threads:[~2003-12-18 18:31 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
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 [this message]

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

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

  git send-email \
    --in-reply-to=873cbiq8p9.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.