' ASSERT Demo — Debug assertions
#COMPILE EXE
#DIM ALL
#DEBUG ERROR ON

FUNCTION PBMAIN() AS LONG
    LOCAL x AS LONG
    LOCAL y AS LONG

    x = 10
    y = 20

    ASSERT 1 = 1
    PRINT "Basic assertion passed"

    ASSERT x < y
    PRINT "Value assertion passed"

    x = x + y
    ASSERT x = 30
    PRINT "Computed assertion passed"

    PRINT "All assertions OK"
    FUNCTION = 0
END FUNCTION
