Explanation
LEFT$, RIGHT$ Functions
Return a specified number of leftmost or rightmost characters in a string.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
LEFT$(stringexpression$,n%) |
RIGHT$(stringexpression$,n%) |
stringexpression$ | Any string expression. |
n% | The number of characters to return, beginning with the leftmost or rightmost string character. |
a$ = "Microsoft QBasic"
PRINT LEFT$(a$, 5) 'Output is: Micro
PRINT RIGHT$(a$, 5) 'Output is: Basic
See also: | MID$ |