Hi all,

I have a problem with the goto statement when used in a function that uses parameters.
It looks like the goto leaves the function instead of branching to the label.
Please examine the simple script below.
Thanks, Seppe

;----------
Break On ; avoid system restart
$a=0 ;
:A $a=$a+1 if $a<5 goto A EndIF ; loop 5 times
$b=Fun1(1) ; get it
Messagebox("a = $a, b = $b","Test") Exit ; show a and b
Function Fun1($a) ;
:B $a=$a+1 if $a<6 goto B EndIf ; loop 6 times
$F1=$a EndFunction ; return a value
;-------------