``

prev Menu next

Strings ☆☆
String Constants
String Constants are expressed being enclosed in double quotation marks " and ".
Example
`PRINT "BASIC"`
If a double quotation mark is included in a string constant, it must be repeated twice.
Example.

    10 PRINT "A""BC"""
    20 END

Output

    A"B"

String identifiers
String variables and string functions are named by identifiers that end with $.
Example.

    10 LET A$="ABC"
    20 PRINT A$
    30 END

String concatenation
The string concatenation operator is &.
Example.

    10 LET a$="123"
    20 LET b$="456"
    30 PRINT a$ & b$
    40 END

Output

    123456

String LET-statement
Example.

    10 LET s$="123"
    20 LET s$=s$ & "4"
    30 PRINT s$
    40 END

Output

    1234