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 />

SAVE Command<br />

Purpose:<br />

To save a program file on diskette.<br />

Syntax:<br />

SAVE filename,[,a]<br />

SAVE filename,[,p]<br />

Comments:<br />

filename is a quoted string that follows the normal MS-DOS naming conventions. If<br />

filename already exists, the file will be written over. If the extension is omitted, .bas will be<br />

used.<br />

The a option saves the file in ASCII format. Otherwise, GW-BASIC saves the file in a<br />

compressed binary format. ASCII format takes more space on the diskette, but some diskette<br />

access commands (for example, the MERGE command and some MS-DOS commands, such as<br />

TYPE) may require an ASCII format file.<br />

The p option protects the file by saving it in an encoded binary format. When a protected file is<br />

later run or loaded, any attempt to list or edit it fails. When the p option is used, make an<br />

additional copy under another name or diskette to facilitate future program maintenance.<br />

Examples:<br />

The following command saves the file com2.bas in the ASCII format:<br />

SAVE "COM2", A<br />

The following command saves the file prog.bas in binary format, and protects access:<br />

SAVE "PROG", P<br />

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

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

Saved successfully!

Ooh no, something went wrong!