Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!dragon.dnet!havlicsek_bl%umbc3 From: havlicsek_bl%umbc3@dragon.dnet Newsgroups: comp.sys.ti.explorer Subject: Substitute for RANDOM Message-ID: <8912011405.AA05163@umbc3.umbc.edu> Date: 1 Dec 89 13:28:35 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 26 I'm trying to port some Common Lisp code developed on the Explorer to Gold Hill Common Lisp (GCLISP version 1.1) on a IBM compatible. I have two problems: (1) the REMOVE function in GCLISP does not take the :COUNT keyword and (2) there is no RANDOM function to generate random numbers. I can easily write my own version of REMOVE to fix the first problem. This means that either I replace GCLISP's compiled REMOVE with my version (all user code runs interpreted) or I have to edit my source code each time I port it to use a new function name, like MY-REMOVE (GCLISP doesn't accept reader #-sign macros). For the second problem I can probably find a "formula" for generating random numbers from a seed number. The Common Lisp reference has some suggestions and GCLISP does have a few transcendental functions. I don't need all of the capability of RANDOM: I only need and integer in the range [0, N) where N <= 10, i.e., a base N digit. If someone out there needs something to do, I'll take your suggestions. Thanks in advance. Bruce Havlicsek Loyola College, Baltimore HAVLICSEK_BL%DRAGON.DNET%TRON.UUCP%UMBC3.UMBC.EDU