1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-11 23:53:12 +00:00
PDP-10.its/doc/teach/ulisp.notes
2018-11-13 09:38:40 +01:00

105 lines
3.8 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

DIFFERENCES BETWEEN TWENEX ULISP AND UNIX LISP 2 April 1980
########################### Terminal Input ###########################
Control characters do different things. The following control characters
have special meaning:
Control-B = Halt Evaluation. Return control to toplevel lisp. No Backtrace.
Control-C = Halt Evaluation. Return to exec, suspending the Lisp job.
Control-K = Retype any pending characters that have been typed but do not
yet form a full s-expression.
Control-L = Clear your screen. UNFORTUNATELY, because of the way Twenex
handles screen clearing, you will have to type Control-Q
before anything will happen. If it stops echoing your input,
maybe you typed ^L and haven't typed Control-Q. Unlike on Unix,
Control-Q on Twenex is quite harmless so it can't hurt to try
it if you feel like that might be the trouble. It will be
ignored by the Lisp reader if you happen to not need it.
Note also that Lisp will evaluate your form as soon as you finish typing
it. It will not wait for you to type a carriage return. Atoms may be
terminated with either a carriage return or a space.
########################### Filenames ###########################
Filenames are different on Twenex. Every filename has several parts:
device, directory, filename, extension, and version. These are normally
displayed as--
device:<directory>filename.extension.version
device and version are something you should never have to specify as they
should always default to the right thing, so just pretend they don't exist
while you are in lisp.
The following syntaxes for getting files into Lisp will work:
(load '((directory) filename extension))
or
(fileread (directory) filename extension)
So if your filename is <FOO>BAR.LSP, you can load this in with
(load '((FOO) BAR LSP))
or if you don't like typing, you can do the following because LSP
is the default extension:
(load '((FOO) BAR))
or, if FOO is your home directory, then just saying
(load '(BAR))
will work just fine. By similar reasoning, fileread can be done with
(fr (FOO) BAR LSP)
(fr (FOO) BAR)
or just (fr BAR)
########################### Datatypes ###########################
Floating Point Numbers
Floating point numbers, due to the nature of the machine, have a
different precision.
IMPORTANT: Numbers with trailing dots do not read as floating
point numbers -- they are fixed point numbers in base 10
(regardless of the value returned by inradix). Hence,
53 - is read as 53 in the current inradix (default 10)
53. - is read as 53 decimal, regardless of inradix
53.0 - is 53.0, a floating point number
########################### Functions ###########################
The operator "prog" in ULisp allows go's to tags outside of the scope
of the innermost prog. "gprog" is not implemented, since the power of
the "prog" available in this lisp makes it pretty much unnecessary. eg,
(prog () top (prog () (print 'hi-there) (go top)))
is a legal form and will sit in an infinite loop printing "hi-there".
The operator "backtrace" allows a numeric arg in ULisp.
(backtrace) turns off saving/displaying of backtrace debugging info.
(backtrace t) turns on backtrace debugging info.
(backtrace n) where n is a fixed point number tells ulisp
to show you only the most recent n stack frames
when an error occurs.
The following functions are not implemented:
getobl, cset, csetq, open, openi, openo, close, instream, outstream,
rename, create, link, unlink, seek, ttyread, ttywrite, fileread, filewrite
########################### Errors ###########################
Some error messages may be different. If an error message starts with a
";", it is probably a MacLISP error message rather than a ULisp error.
This is probably not a ULisp bug -- It is likely that the error is still
your fault. Check your code; if you think it's not your bug, ask a TA.