#COMPILE EXE "s42_overloaded.exe"
' Sample: Multiple utility functions
FUNCTION IsEven(BYVAL n AS LONG) AS LONG
    IF n MOD 2 = 0 THEN FUNCTION = 1 ELSE FUNCTION = 0
END FUNCTION
FUNCTION IsPositive(BYVAL n AS LONG) AS LONG
    IF n > 0 THEN FUNCTION = 1 ELSE FUNCTION = 0
END FUNCTION
FUNCTION PBMAIN() AS LONG
    DIM v AS LONG
    v = 42
    PRINT "Is"; v; "even?";
    IF IsEven(v) THEN PRINT " Yes" ELSE PRINT " No"
    PRINT "Is"; v; "positive?";
    IF IsPositive(v) THEN PRINT " Yes" ELSE PRINT " No"
    FUNCTION = 0
END FUNCTION
