PDA

View Full Version : Function_CParams



DirectuX
21-11-2018, 21:11
Hi,
I am rewriting some code considering what was said here (https://www.thinbasic.com/community/showthread.php?12902-Variable-scope-suggestion&p=94628#post94628)

but,
can someone confirm that code ?:
I think the third call return an erroneous value.



function test(optional param1 as string)

msgbox 0,"There is " & Function_CParams & " parameter passed." & $crlf & "Param = " & param1

end Function

call test()
call test("foo")
call test()


This code's tbasic file : 9909

Petr Schreiber
06-12-2018, 20:34
Hi DirectuX,

I can confirm, this seems like optimization side effect.


Petr

DirectuX
07-12-2018, 14:52
Hi DirectuX,

I can confirm, this seems like optimization side effect.


Petr

Thanks you Petr for answering.

Consequently I opened another issue here (https://www.thinbasic.com/community/project.php?issueid=553).

Please Petr, note that for all issues I opened, I can't specify the correct version, the drop-down selection doesn't propose latest versions.