' Polynomial
#COMPILE EXE
#DIM ALL
FUNCTION Poly(BYVAL x AS DOUBLE) AS DOUBLE
    FUNCTION = 2.0 * x * x + 3.0 * x + 1.0
END FUNCTION
FUNCTION PBMAIN() AS LONG
    LOCAL i AS LONG
    FOR i = 0 TO 5
        PRINT "P(" + STR$(i) + ")=" + STR$(Poly(i))
    NEXT i
    FUNCTION = 0
END FUNCTION
