#COMPILE EXE "s43_callback.exe"
' Sample: CALLBACK function pattern
FUNCTION ProcessData(BYVAL value AS LONG) AS LONG
    FUNCTION = value * 3 + 1
END FUNCTION
FUNCTION PBMAIN() AS LONG
    DIM i AS LONG, result AS LONG
    PRINT "ProcessData for 1-5:"
    FOR i = 1 TO 5
        result = ProcessData(i)
        PRINT i; " ->"; result
    NEXT i
    FUNCTION = 0
END FUNCTION
