1. Functions without return params

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

new topic     » topic index » view message » categorize

2. Re: Functions without return params

ChrisB said...

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: Functions without return params

mattlewis said...
ChrisB said...

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.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Functions without return params

Yes, I was using 2176, but the batch file that renamed them had a bug. Ta. Working fine now.

Chris

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu