Bug in Function
Brought to you by:
kerravon86,
tcamp
REM Bug in Function :-}
PRINT "Bug in Function :-}"
x = 2
y = 5
PRINT
power = PowerFunc(x, y)
PRINT
PRINT x; "^"; y; " ="; power
PRINT ":-{ ???"
END
FUNCTION PowerFunc(bVar, eVar)
PRINT " Arg1 ="; bVar; " Arg2 ="; eVar
resp = 1
FOR i = 1 TO eVar
LET resp = resp * bVar
PRINT " Arg1 ="; bVar; " Arg2 ="; eVar
NEXT i
PRINT " Arg1 ="; bVar; " Arg2 ="; eVar
TestFunc = resp
END FUNCTION
Exactly as you say: there is a bug in your function -- but no bug in bwbasic...