Recursion
- Posted by don cole <doncole at ?acbell.net> Jul 21, 2007
- 581 views
Hello Anyone,
constant stuff={"oranges","apples","bananas"} -- this is iteration procedure hello(object stuff) for x=1 to length(stuff) do puts(1,stuff[x]&"\n") end for end procedure hello(stuff) --this is recursion procedure hello2(integer x) if x>length(stuff) then else puts(1, stuff[x] &"\n") hello2(x+1) end if end procedure hello2(1)
Is this correct? I notice that recursion uses more code. Don Cole