LEFT$¶
Function¶
LEFT$ returns the first n characters from a designated string. Either string or n may be expressions.
Syntax¶
LEFT$(“STRING”,N)
where string is a string expression N is the number of left most characters.
Examples¶
10 A$ ="ABCDEFG"
20 B$ = LEFT$(A$,3)
30 PRINT B$
prints ABC.
Remarks¶
LEFT$(A$,0)
returns a Null String i.e. “”
LEFT$(A$,50)
returns ABCDEFG
N cannot be negative or a “MAG” error will result.