' Byte array to numeric conversion: CVI, CVL, CVQ, CVD, CVS, CVBYT, CVDWD, CVCUR
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL s AS STRING
    LOCAL l AS LONG
    LOCAL q AS QUAD
    LOCAL d AS DWORD

    s = MKL$(12345678)
    l = CVL(s)
    PRINT "CVL from MKL$:"; l

    s = MKQ$(&H123456789)
    q = CVQ(s)
    PRINT "CVQ from MKQ$:"; q

    s = MKBYT$(255)
    PRINT "CVBYT:"; CVBYT(s)

    s = MKDWD$(&H12345678)
    d = CVDWD(s)
    PRINT "CVDWD:"; FORMAT$(d, "&H")

    s = MKI$(1000)
    PRINT "CVI from MKI$:"; CVI(s)

    PRINT "CVI family operations complete."

    FUNCTION = 0
END FUNCTION
