' CSV reader
#COMPILE EXE
#DIM ALL
FUNCTION PBMAIN() AS LONG
    LOCAL txt AS STRING
    LOCAL i AS LONG
    txt = "a,b,c"
    FOR i = 1 TO LEN(txt)
        IF MID$(txt, i, 1) = "," THEN PRINT "|" ELSE PRINT MID$(txt, i, 1)
    NEXT i
    PRINT " "
    FUNCTION = 0
END FUNCTION
