Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
43 views1 page

WRITE Statement: Purpose

The WRITE statement in GW-BASIC is used to output data to the screen. It allows for a list of expressions to be written with values separated by commas and strings delimited by quotation marks. WRITE is similar to PRINT but inserts commas between items and delimits strings, without blank spaces before positive numbers. Examples show how WRITE outputs the values of variables and a string in the correct formatted manner.

Uploaded by

Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views1 page

WRITE Statement: Purpose

The WRITE statement in GW-BASIC is used to output data to the screen. It allows for a list of expressions to be written with values separated by commas and strings delimited by quotation marks. WRITE is similar to PRINT but inserts commas between items and delimits strings, without blank spaces before positive numbers. Examples show how WRITE outputs the values of variables and a string in the correct formatted manner.

Uploaded by

Raj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

GW-BASIC User's Guide

WRITE Statement
Purpose:
To output data to the screen.

Syntax:
WRITE[list of expressions]

Comments:
If list of expressions is omitted, a blank line is output. If list of expressions is included,
the values of the expressions are output at the terminal. The expressions in the list may be
numeric and/or string expressions, and must be separated by commas or semicolons.
When printed items are output, each item will be separated from the last by a comma. Printed
strings are delimited by double quotation marks. After the last item in the list is printed, GW-
BASIC inserts a carriage return/line feed.
The difference between WRITE and PRINT is that WRITE inserts commas between displayed
items and delimits strings with double quotation marks. Positive numbers are not preceded by
blank spaces.
WRITE outputs numeric values using the same format as the PRINT statement.

Examples:
10 A=80: B=90: C$="THAT'S ALL"
20 WRITE A, B, C$
RUN
80, 90, "THAT'S ALL"

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

You might also like