S
STEPHEN BECKER I V
aaaaa
C:/Documents and Settings/IV/Desktop/crazy.rb:5:in `nextl': stack
level too deep (SystemStackError)
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `nextl'
from C:/Documents and Settings/IV/Desktop/crazy.rb:5:in `nextl'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `nextl'
from C:/Documents and Settings/IV/Desktop/crazy.rb:5:in `nextl'
... 2083 levels...
from C:/Documents and Settings/IV/Desktop/crazy.rb:11
from C:/Documents and Settings/IV/Desktop/crazy.rb:10:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:10:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:10
Press any key to continue . . .
Is there away to increase the allowed space for the stack info?
I want to print out ever permutation of the alphabet. I know it
sounds crazy, but i want to.
def nextl (a,d)
if d==0 then print a # max depth
print "\n" end
for i in 'a'..'z' # add the next letter in the alphabet
nextl(a<<i.to_s,d-1) #concat and call
print "\n"
end
end
for i in 'a'..'z'
nextl(i.to_s,4)
print "\n"
end
is my code, it should print out all aaaaa,aaaab,aaaac....
becker
C:/Documents and Settings/IV/Desktop/crazy.rb:5:in `nextl': stack
level too deep (SystemStackError)
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `nextl'
from C:/Documents and Settings/IV/Desktop/crazy.rb:5:in `nextl'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:4:in `nextl'
from C:/Documents and Settings/IV/Desktop/crazy.rb:5:in `nextl'
... 2083 levels...
from C:/Documents and Settings/IV/Desktop/crazy.rb:11
from C:/Documents and Settings/IV/Desktop/crazy.rb:10:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:10:in `each'
from C:/Documents and Settings/IV/Desktop/crazy.rb:10
Press any key to continue . . .
Is there away to increase the allowed space for the stack info?
I want to print out ever permutation of the alphabet. I know it
sounds crazy, but i want to.
def nextl (a,d)
if d==0 then print a # max depth
print "\n" end
for i in 'a'..'z' # add the next letter in the alphabet
nextl(a<<i.to_s,d-1) #concat and call
print "\n"
end
end
for i in 'a'..'z'
nextl(i.to_s,4)
print "\n"
end
is my code, it should print out all aaaaa,aaaab,aaaac....
becker