[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help Me!! Getting CATALOG into an Array Variable



<delfs@NOSPAMappple2.com> wrote:

> I think Mr Empson's approach is better by far except for the question of the
> array.  Of course with his method, you could easily create a random access
> text file and use it as your array.

In most cases you don't actually need to store the entire catalog.  If
you want to search it for a particular file (or class of files) then you
can process it on a line by line basis with a single string variable
instead of an array.

> Another useful thing might be to acutally use ProDOS calls to read the
> catalog itself.

You would have to go a lot of work to generate the text representations
of the dates, not to mention looking up the file types.  The only
situation I can think of where this would be useful is if you wanted
more information than BASIC.SYSTEM provides in its catalog (e.g.
auxiliary types it doesn't display).

It would need some machine code to call the ProDOS MLI, memory
allocation for an open file buffer (1K, page aligned; you might be able
to borrow one from BASIC.SYSTEM), and communication back to the BASIC
program.

It makes more sense to do this in DOS 3.3, since there aren't many
practical alternatives.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P O Box 27-103, Wellington, New Zealand