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

Re: Basic stuff

> Date: Mon, 19 Dec 94 16:31:46 +0100
> From: Pbhogar@vt.edu
> gives me the usual prompt. What should I do to quit it? If I say 'exit' or
> 'quit' it gives me an error message and gets to the 'break>' prompt. How

Assuming you have started it with the initial memory image,
lispinit.mem then to quit go:

or just <Control-Z> enough times should also do it.

The file opening/closing stuff can be done in a variety of ways and
you should really have a LISP book, e.g. Common Lispcraft by
R. Wilensky or the official LISP book called Common Lisp, the Language
by Guy L. Steele (but that costs an arm and a leg so I reccommend some
other way of learning!).

Here's a simple one that should get you going:

(with-open-file (infile "test" :direction :output)
 (princ "Hello, this is a test" infile)
 (terpri infile)
 (princ "Bye now" infile)
 (terpri infile)

The analogue for reading from a file can hopefully be guessed from
this one.  Note that the file is both opened and closed byu this
example which is tidy.

Hope that helps,

Richard Shepherd (rls@therat.math.waikato.ac.nz)