17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GW-BASIC <strong>User's</strong> Guide<br />

STRING$ Function<br />

Purpose:<br />

To return<br />

Syntax:<br />

● a string of length n whose characters all have ASCII code j, or<br />

● the first character of x$<br />

STRING$(n,j)<br />

STRING$(n,x$)<br />

Comments:<br />

STRING$ is also useful for printing top and bottom borders on the screen or the printer.<br />

n and j are integer expressions in the range 0 to 255.<br />

Examples:<br />

10 X$ = STRING$(10, 45)<br />

20 PRINT X$ "MONTHLY REPORT" X$<br />

RUN<br />

----------MONTHLY REPORT----------<br />

45 is the decimal equivalent of the ASCII symbol for the minus (-) sign.<br />

Appendix C in the GW-BASIC <strong>User's</strong> Guide lists ASCII character codes.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/STRINGS.html28/03/2004 21.29.31

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

Saved successfully!

Ooh no, something went wrong!