' Type casting: CBYT, CINT, CLNG, CWRD, CDWD, CQUD, CSNG, CDBL, LO, HI, MAKINT, MAKLNG, MAKDWD
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL val AS LONG
    LOCAL dw AS DWORD
    LOCAL w AS WORD

    val = 42
    PRINT "CBYT(300):"; CBYT(300)
    PRINT "CINT(70000):"; CINT(70000)
    PRINT "CLNG(3.14):"; CLNG(3.14)
    PRINT "CSNG(3.1415926535):"; CSNG(3.1415926535)
    PRINT "CDBL(3.14):"; CDBL(3.14)

    w = &H1234
    PRINT "LO(&H1234):"; LO(w)
    PRINT "HI(&H1234):"; HI(w)

    PRINT "MAKINT(10, 20):"; MAKINT(10, 20)
    PRINT "MAKLNG(10, 20):"; MAKLNG(10, 20)
    PRINT "MAKDWD(&H1234, &H5678):"; FORMAT$(MAKDWD(&H1234, &H5678), "&H")

    PRINT "Type casting operations complete."

    FUNCTION = 0
END FUNCTION
