|Abbreviation:||L, E, Shift+F|
in BASIC ROM:
|List of all BASIC keywords|
Typ: String Function General Programming-Syntax: LEFT$(<string>,<integer number>)
LEFT$ is used for cutting strings into component parts beginning at the left side moving right until the indicated integer number of characters has been reached. The indicated integer number specifies the maximum number of characters to include. When the numerical value is 0, the outcome is an empty string (for example A$=""). When the indicated number is greater than the string, nothing will be cut.
The range of numerical values are 0 to 255. Outside the range - also negative or greater than 255 - the BASIC-error ?ILLEGAL QUANTITY ERROR IN line occur. By using a wrong type of variable the BASIC-error ?TYPE MISMATCH ERROR in line appears. When the string or the numerical argument is missing, the BASIC-error ?SYNTAX ERROR IN line is viewed.
Examples[edit | edit source]
10 A$="SATURDAY MORNING" 20 B$=LEFT$(A$,8): PRINT B$ (SATURDAY will be cutting and print out)