From help-octave-request Wed Jul 21 18:29:10 1993 Subject: Re: 0.74: recursive function calls not supported yet From: John Eaton To: kircher at neuro dot tuwien dot ac dot at Cc: help-octave Date: Wed, 21 Jul 93 18:29:05 EDT On Wed, 21 Jul 93 15:46:34 +0100, kircher at neuro dot tuwien dot ac dot at wrote: : I encountered this unexpected behaviour: : : >Octave, version 0.74. Copyright (C) 1992, 1993, John W. Eaton. : >This is free software with ABSOLUTELY NO WARRANTY. : >For details, type `warranty'. : : >octave:1> hadamard(3) : >error: recursive function calls not supported yet : : Recursion definitely worked in previous releases. I tried both, a : decstation 3100 (ultrix) and a NeXT (NS 3.0). Can anybody : confirm/disconfirm this? Actually, if it worked, you were just getting lucky. For example, one of these would work, but the other would fail: function y = fact (n) if (n > 1) y = fact (n - 1) * n; else y = 1; endif end function y = fact (n) if (n > 1) y = n * fact (n - 1); else y = 1; endif end To fix this, some work needs to be done in the symbol table code and the code that implements function calls to properly create a new context for recursive calls. jwe