#COMPILE EXE "s41_optional_param.exe"
' Sample: OPTIONAL parameters
FUNCTION Greet(BYVAL name AS STRING, OPTIONAL BYVAL title AS STRING) AS STRING
    IF LEN(title) > 0 THEN
        FUNCTION = title + " " + name
    ELSE
        FUNCTION = name
    END IF
END FUNCTION
FUNCTION PBMAIN() AS LONG
    PRINT Greet("Alice")
    PRINT Greet("Bob", "Dr.")
    FUNCTION = 0
END FUNCTION
