1. Functions without return params
- Posted by ChrisB (moderator) Jul 05, 2009
- 999 views
Hi
Here's an interesting one
object VOID for i = 1 to 10 do sprintf("Foo", {}) --no return param for the function printf(1, "%d,", {i}) end for puts(1, "\n\n") for i = 1 to 10 do VOID = sprintf("Foo", {}) printf(1, "%d,", {i}) end for puts(1, "\n\n") ?1/0
Somehow, not having a return for the function (valid syntax nowadays I believe) causes immediate exiting from the for loop.
Chris
2. Re: Functions without return params
- Posted by mattlewis (admin) Jul 05, 2009
- 1058 views
Hi
Here's an interesting one
[snip]
Somehow, not having a return for the function (valid syntax nowadays I believe) causes immediate exiting from the for loop.
What version are you running? I believe this was bug 2799243, which was fixed in r2135. It works as expected for me, at least, using r2204.
Matt
3. Re: Functions without return params
- Posted by jimcbrown (admin) Jul 05, 2009
- 1043 views
Hi
Here's an interesting one
[snip]
Somehow, not having a return for the function (valid syntax nowadays I believe) causes immediate exiting from the for loop.
What version are you running? I believe this was bug 2799243, which was fixed in r2135. It works as expected for me, at least, using r2204.
Matt
For linux, eubins has up to r2180, which should work. The latest Windows eubin is r2176.
4. Re: Functions without return params
- Posted by ChrisB (moderator) Jul 05, 2009
- 1012 views
Yes, I was using 2176, but the batch file that renamed them had a bug. Ta. Working fine now.
Chris