' Const & Equates — Numerical equates and LOCAL constants
#COMPILE EXE
#DIM ALL

%MAX_BUFFER = 4096
%ERROR_FILE_NOT_FOUND = 2

FUNCTION PBMAIN() AS LONG
    LOCAL total AS DOUBLE
    LOCAL APP_NAME AS STRING
    LOCAL GREETING AS STRING
    LOCAL PI AS DOUBLE
    LOCAL TAX_RATE AS SINGLE

    APP_NAME = "ConstEquateDemo"
    GREETING = "Hello from "
    PI = 3.141592653589793
    TAX_RATE = 0.08

    PRINT "APP_NAME = " + APP_NAME
    PRINT "GREETING = " + GREETING
    PRINT "%MAX_BUFFER = " + STR$(%MAX_BUFFER)
    PRINT "%ERROR_FILE_NOT_FOUND = " + STR$(%ERROR_FILE_NOT_FOUND)
    PRINT "PI = " + STR$(PI)
    PRINT "TAX_RATE = " + STR$(TAX_RATE)

    total = 100.0 * (1 + TAX_RATE)
    PRINT "Total with tax: " + STR$(total)

    FUNCTION = 0
END FUNCTION
