<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Redim with function name"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=85371#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Redim with function name"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=85371">bug 85371</a>
from <span class="vcard"><a class="email" href="mailto:ge.huber@gmx.net" title="ge.huber@gmx.net">ge.huber@gmx.net</a>
</span></b>
<pre>(In reply to ge.huber from <a href="show_bug.cgi?id=85371#c2">comment #2</a>)
<span class="quote">> There seem to be more problems with using the function name as a variable
> inside the function. It can not be used as the loop variable in a For ...
> Next loop. </span >
Hopefully correct version, that is the one, which shows the bug clearly.
Sub Main
Print "foob is " & foob() 'works
Print "fooc is " & fooc() 'fails
End Sub
'This surrogate works
Function foob() As long
foob = 1
LoopLable:
Print "foob is now " & foob
foob = foob + 1
If foob < 4 Then Goto LoopLable
End Function
'While the For ... Next doesn't
Function fooc() As long
For fooc = 1 To 3 'error occurs here
Print "fooc is now " & fooc
Next fooc
End Function</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>