#COMPILE EXE "s12_left_right_mid.exe"
' Sample: LEFT$, RIGHT$, MID$ functions
FUNCTION PBMAIN() AS LONG
    DIM s AS STRING
    s = "PowerBASIC"
    ? "String: "+ s
    ? "LEFT$(s,5) = "+ LEFT$(s, 5)
    ? "RIGHT$(s,5) = "+ RIGHT$(s, 5)
    ? "MID$(s,6,5) = "+ MID$(s, 6, 5)
    ? "MID$(s,6) = "+ MID$(s, 6)
    FUNCTION = 0
END FUNCTION