' String/number conversion: STR$, VAL, VALI, VALD, HEX$, OCT$, BIN$
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL s AS STRING
    LOCAL d AS DOUBLE

    s = STR$(12345)
    PRINT "STR$(12345):"; s

    d = VAL("3.14159")
    PRINT "VAL(3.14159):"; d

    PRINT "VALI(42):"; VALI("42")
    PRINT "VALD(3.14e5):"; VALD("3.14e5")

    PRINT "HEX$(255):"; HEX$(255)
    PRINT "OCT$(255):"; OCT$(255)
    PRINT "BIN$(255):"; BIN$(255)

    PRINT "HEX$(&HABCD):"; HEX$(&HABCD)
    PRINT "OCT$(&O777):"; OCT$(&O777)

    PRINT "STRING conversion operations complete."

    FUNCTION = 0
END FUNCTION
