<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 31: Recursive funs do not work correctly</title><link href="https://sourceforge.net/p/millscript/bugs/31/" rel="alternate"/><link href="https://sourceforge.net/p/millscript/bugs/31/feed.atom" rel="self"/><id>https://sourceforge.net/p/millscript/bugs/31/</id><updated>2007-10-02T14:33:32Z</updated><subtitle>Recent changes to 31: Recursive funs do not work correctly</subtitle><entry><title>Recursive funs do not work correctly</title><link href="https://sourceforge.net/p/millscript/bugs/31/" rel="alternate"/><published>2007-10-02T14:33:32Z</published><updated>2007-10-02T14:33:32Z</updated><author><name>Kevin Rogers</name><uri>https://sourceforge.net/u/moya/</uri></author><id>https://sourceforge.net3ca6ef69368931546a1d365080397265d475c1a1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;There is an issue with recursive functions using the fun syntax, e.g.&lt;/p&gt;
&lt;p&gt;;-) fun recurse( n ) =&amp;gt; recurse( n ); endfun;&lt;br /&gt;
MISHAP : Could not find the definition for this variable&lt;br /&gt;
NAME : recurse&lt;br /&gt;
ORIGIN : origin&lt;br /&gt;
LINE NO. : 1&lt;br /&gt;
PHASE : Compile&lt;br /&gt;
Resetting input and resuming execution&lt;/p&gt;
&lt;p&gt;This occurs because no variable with the name "recurse" exists inside the body of the function.&lt;/p&gt;
&lt;p&gt;We should consider inserting an automatic local variable with the function name, bound to the function. This should be handled in a similar way to the functions arguments.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>