QBasic 1.1: LEFT$ Function

Syntax

LEFT$(stringexpression$,n%)
RIGHT$(stringexpression$,n%)

Description / Parameter(s)

stringexpression$ Any string expression.
n% The number of characters to return, beginning with the leftmost or rightmost string character.

Example

a$ = "Microsoft QBasic" PRINT LEFT$(a$, 5) 'Output is: Micro PRINT RIGHT$(a$, 5) 'Output is: Basic