I am using KiX version 4.20 Beta 1.

I wrote the following Exp() function some time ago which I find very helpful for use with binary bit manipulation.

code:
Function Exp($Base, $Power)
;Returns a base value raised to the specified power
If $Power = 0
$Exp = 1
Else
$Exp = Exp($Base, $Power - 1) * $Base
EndIf
EndFunction

Anyway, since the release of 4.20 albeit Beta, I thought I could re-write it using the new iif() function.

However, the following code produces a "Stack overflow exception" error...

code:
Function Exp2($Base, $Power)
;Returns a base value raised to the specified power
$Exp2 = iif($Power = 0, 1, Exp2($Base, $Power - 1) * $Base)
EndFunction

Admittedly the function names are different (so I could test them in the same script file), but aren't these two functions programatically identical?

Should I be receiving "Stack Overflow" errors?

Lee