Recursion question?

new topic     » topic index » view thread      » older message » newer message

G'day all

When a recusive function is used in Euphoria, are all the internal
variables (including anything passed into the function) put in a stack of
some kind? Ferinstance:

<NONSENSE CODE>
function myfunc(sequence bigseq)
   define another_bigseq
   define other variables
   do stuff to bigseq and another_bigseq
   if somecondition
      return(myfunc(another_bigseq))
   else
      return(another_bigseq)
   end if
end function
</NONSENSE CODE>

Do all the intermediate "values" of each iteration of the function
(including the big sequences) get pushed onto a stack? Or do I have that
wrong?

TIA

Regards
Tony

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu