Amos Professional Manual  Contents  Index

Disc Access


Disc space

DFREE
function: report free space on disc
f=Dfree

This simple function returns the amount of free space remaining on the current disc, measured in bytes.

DISC INFO$
function: report free space of a named device
information$=Disc Info$("Name")

This function is used to return the amount of free space in the specified device. The string that is returned contains the name of the disc, followed by the amount of free space. Here is an example which splits the string:

E> A$=Disc Info$("Df0:")
   C=Instr(A$,":")
   N$=Left$(A$,C)
   A$=A$-N$
   D=Val(A$)
   Print "Name of the disc=";N$
   Print "Free space=";D

KILL
instruction: erase a file from current disc
Kill filename$

Be extremely careful with this command. It obliterates the named file from the current disc, once and for all. The file that is erased with this command cannot be retrieved. Kill "Permanently"

Disc files
Files are simply packages of information stored together at a particular location on disc. Each file is assigned its own name, which may contain anything from 1 to 255 characters.

Before a file can be used, it must be initialised using the OPEN IN, OPEN OUT or APPEND commands, which are explained below. When a file is opened, it must be assigned a channel number, ranging from 1 to 10. This number will be used in all subsequent disc operations to identify the file you are currently working with.

Your Amiga uses two types of disc files: "sequential" files and "random access" files. Here is how AMOS Professional exploits them fully.

Back    Next
10.02.10