Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

252 LEFT$ left string Purpose To copy part of a string starting at the left of the source string. For example if A$="CATASTROPHE" then PRINT LEFT$(A$,3) would give CAT , namely the left three characters of . Examples 3000 U$=LEFT$(H4$,value) 100 INDEX$=LEFT$(WHOLEname$,4) A string function which returns the left n characters from a string. If the source string is too short then the function returns with as many characters as there are in the source string. There must be no space between LEFT$ and the first parenthesis. Description Syntax = LEFT$ ( , ) Associated keywords RIGHT$ , MID$ , LEN , INSTR Demonstration program This prints out letters in a pattern.

10 PRINT "What is your full name"; 20 INPUT name$ 30 FOR X = 1 TO LEN(name$) 40 PRINT LEFT$(name$,X) 50 NEXT X >RUN