November 2010
Intermediate to advanced
504 pages
12h 45m
English
In addition to using streams to write to and read from the REPL, we can also use streams to write to and read from files.
You can create a file stream in Common Lisp in several ways. The best way is to use the with-open-file command. As you’ll see shortly, this command contains special bug-prevention features that make it safer to use than other available file commands. The following example uses with-open-file to write the string "my data" to a file named data.txt:
>(with-open-file (my-stream "data.txt" :direction :output)(print ...
Read now
Unlock full access