#COMPILE EXE "s94_fibonacci.exe"
' Sample: Fibonacci sequence generator
FUNCTION Fib(BYVAL n AS LONG) AS LONG
    IF n <= 1 THEN FUNCTION = n
    FUNCTION = Fib(n-1) + Fib(n-2)
END FUNCTION
FUNCTION PBMAIN() AS LONG
    DIM i AS LONG
    PRINT "Fibonacci sequence:"
    FOR i = 0 TO 12
        PRINT Fib(i);
        IF i < 12 THEN PRINT ", ";
    NEXT i: PRINT
    FUNCTION = 0
END FUNCTION
