1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

disk file may not be complete.

After opening, you need to speficy whether the file is to be read or
written to. 'PRINT CHR$(4)"READ filename"' and 'PRINT CHR$(4)"WRITE
filename"' do the appropriate action. It is not possible to have a
file open for both reading and writing at once. With random access
files, you can specify which record you want to move to in the READ or
WRITE statement (it is allowable to READ or WRITE an open file
multiple times) with the ',Rrecord' parameter-- the first record is
record 0. For example, to read from the 10th record, 'PRINT
CHR$(4)"READ filename,R9"'

Once your file is ready for reading or writing, you can use simple
INPUT or GET commands to read data, and PRINT to write to the file.
All input or output is redirected to the files until you either close
off the file, or issue any DOS command, including the DOS null command
of a single control-D, e.g. 'PRINT CHR$(4)'.

If you OPEN an existing file, and try to WRITE to it, you'll write to
the start of it. If you wish to WRITE to the end of an existing file,
you can 'PRINT CHR$(4)"APPEND filename"' before WRITEing to it instead
of OPENing the file. DOS 3.3 had several nasty bugs in the APPEND code
that made it not always correctly locate the end of the file; you
should write a null character (CHR$(0)) at the end of your last data
to go into the file. ProDOS finally fixed that bug.

_________________________________________________________________

Section 6: Applesoft command reference by name

ABS(expr)
The absolute value of the expression.

AND
Logical anding of two logical expressions, yielding 0 or 1. Applesoft
treats 0 as false and any other number as true on input.

ASC(expr$)
Returns the ASCII code for the first character in the string. If the
first character has ascii value of 0, a '?SYNTAX ERROR' will occur. If
the input string is a null string, a '?ILLEGAL QUANTITY ERROR' will
occur.

AT
Reserved word required in the middle of HLIN and VLIN statements,
optional in the middle of DRAW and XDRAW.

ATN(expr)
Arctangent of the expression in radians. Results range from -Pi/2 to
+Pi/2.

CALL memaddr
Calls an assembly language subroutine at 'memaddr'. [The subroutine
should end with a 'RTS' instruction; no need to preserve register
contents]

CHR$( byte)
Converts a specified ascii value (must be in the range 0..255) to a
string.

CLEAR
Dumps the contents of all variables from memory, effectively assigning
a value of 0 to all integer and real values, and a null string to all
strings. Also undimensions all arrays. Can be called from with a
program, or at the command prompt.