' String Vars — STRING, STRING*N, WSTRING demonstration
#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN() AS LONG
    LOCAL s AS STRING
    LOCAL fixed AS STRING
    LOCAL ws AS WSTRING

    s = "Variable-length string"
    PRINT "STRING:     " + s
    PRINT "LEN(STRING) = " + STR$(LEN(s))

    fixed = "Fixed length"
    PRINT "STRING*16: " + fixed
    PRINT "LEN(STRING*16) = " + STR$(LEN(fixed))

    ws = "Wide string" & CHR$(0) & "with null"
    PRINT "WSTRING:    " + ws
    PRINT "LEN(WSTRING) = " + STR$(LEN(ws))

    FUNCTION = 0
END FUNCTION
