17.01.2013 Views

AmstradCPC6128-hypertext-en-Sinewalker

AmstradCPC6128-hypertext-en-Sinewalker

AmstradCPC6128-hypertext-en-Sinewalker

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LEFT$<br />

LE FT $ ( , )<br />

10 C LS<br />

20 a$="AMSTRAD"<br />

30 FOR n=1 TO 7<br />

40 PRINT LEFT$(a$,n)<br />

50 NEXT<br />

run<br />

FUNCTION: Returns the number of characters (in the range 0 to 255) specified in the<br />

parameter, after extracting them from the LE FT of the . If the is shorter than the , the whole<br />

is returned.<br />

Associated keywords: M I D $, RIG HT $<br />

LEN<br />

LE N ( )<br />

10 LINE INPUT "Enter a phrase";a$<br />

20 PRINT "The phrase is";<br />

30 PRINT LEN(a$);"characters Long."<br />

run<br />

FUNCTION: Returns the total number of characters (i.e. the LENgth) of the .<br />

Associated keywords: none<br />

LET<br />

LET = <br />

LET x=100<br />

COMMAND: Assigns a value to a variable. A remnant from early BASICs where<br />

variable assignm<strong>en</strong>ts had to be 'se<strong>en</strong> coming'. Has no use in AMSTRAD BASIC apart<br />

from providing compatibility with the programs supplied in early BASIC training<br />

manuals. The above example need only be typed in:<br />

x=.100<br />

Associated keywords: none<br />

Complete List of Keywords Chapter 3 Page 39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!