17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

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.

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

WRITE Statement<br />

Purpose:<br />

To output data to the screen.<br />

Syntax:<br />

WRITE[list of expressions]<br />

Comments:<br />

If list of expressions is omitted, a blank line is output. If list of expressions is included,<br />

the values of the expressions are output at the terminal. The expressions in the list may be<br />

numeric and/or string expressions, and must be separated by commas or semicolons.<br />

When printed items are output, each item will be separated from the last by a comma. Printed<br />

strings are delimited by double quotation marks. After the last item in the list is printed, GW-<br />

BASIC inserts a carriage return/line feed.<br />

The difference between WRITE and PRINT is that WRITE inserts commas between displayed<br />

items and delimits strings with double quotation marks. Positive numbers are not preceded by<br />

blank spaces.<br />

WRITE outputs numeric values using the same format as the PRINT statement.<br />

Examples:<br />

10 A=80: B=90: C$="THAT'S ALL"<br />

20 WRITE A, B, C$<br />

RUN<br />

80, 90, "THAT'S ALL"<br />

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

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

Saved successfully!

Ooh no, something went wrong!