[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stack overflow & random number problems



Hi,
  I'm running clisp under DOS on a pentium 90 with 32mb of RAM. I have a 
program which is using a (loop for i from 1 to (end-value) while (< x y) 
do ... the problem is that anytime end-value is > 21 & x < y so that the 
while clause doesn't terminate the loop, I get a stack overflow error 
when i is > 21. Does anyone have an idea as to why I'm getting this 
error (and the abrupt termination of my program!)?
  Also, I seem to be having a problem with the random function. If the 
program is run more than 4 times, the random sequences are the same, 
which is unacceptable. What I need are random sequences which never 
repeat themselves. To clarify: I might get on the first run (2 4 6) & (3 
-2 9) & different sequences on the 2nd & 3rd runs, but on the 4th run I 
would get (2 4 6) & (3 -2 9) again. I've tried to reset *random-state* 
before each run, but that only makes the stack overflow problem worse. 
Any suggestions?
  Thanks.

   Vance Marshall
   askvance@spruce.flint.umich.edu