Error messages

This page gives a list of error messages, in alphabetical order, with an explanation of the message, and if appropriate an example that would generate the error. Where possible it also includes suggestions of how to fix the error.

Note that errors such as Error: 'x' unknown variable are listed alphabetically under the word after 'x'.

'*' arithmetic overflow

Overflow occurred in an expression using '*'. For example, on a 16-bit platform:

(* 400 100)

'+' arithmetic overflow

Overflow occurred in an expression using '+'. For example, on a 16-bit platform:

(+ 30000 10000)

'-' arithmetic overflow

Overflow occurred in an expression using '-'. For example, on a 16-bit platform:

(- 0 -32768)

'/' arithmetic overflow

Overflow occurred in an expression using '/'. For example, on a 16-bit platform:

'1+' arithmetic overflow

Overflow occurred in an expression using '1+'. For example, on a 16-bit platform:

(1+ 32767)

'1-' arithmetic overflow

Overflow occurred in an expression using '1-'. For example, on a 16-bit platform:

(1- -32768)

'abs' arithmetic overflow

Overflow occurred in an expression using abs. The only case is, on a 16-bit platform:

(abs -32768)

Already being traced

The trace command was given for a function that's already being traced.

Already tracing 3 functions

The trace command was given for a function when three functions are already being traced.

'analogread' invalid pin

The analogread function is not supported on the specified pin.

'analogwrite' invalid pin

The analogwrite function is not supported on the specified pin.

'append' argument is not a list

The arguments to append must be lists. For example:

(append "cat" "dog")

'apply' last argument is not a list

The last argument to apply must be a list. For example:

(apply + 1 2)

'assoc' second argument is not a list

The second argument to assoc must be a list. For example:

(assoc 'c "cat")

autorun not available

On this platform autorunning a function after load-image is not supported.

Can't evaluate a dotted pair

An attempt was made to evaluate a dotted pair. For example:

(print . 3)

Can't take car

The argument to car is not a list. For example:

(car "car")

Can't take cdr

The argument to cdr is not a list. For example:

(car 12)

Cannot convert to string

The string function was called with an argument that wasn't a symbol or character. For example:

(string 12)

'char' index out of range

The third index argument to char is outside the range of the characters in the string. For example:

(char "cat" 3)

'concatenate' only supports strings

In uLisp concatenate only supports strings. For example:

(concatenate 'list '(a b c) '(d e f))

'decf' arithmetic overflow

Overflow occurred in an expression using decf. For example, on a 16-bit platform :

(setq a -32768)
(decf a)

Division by zero

Attempt to divide by zero. For example:

(/ 2 0)

'dolist' argument is not a list

The second argument to dolist is not a list. For example:

Error in name

Error in print

Error: Problem autorunning from SD card

Escape!

The escape character '~' was typed.

'x' has too few arguments

A function has been called with too few arguments. For example:

(mod 15)

'x' has too few parameters

A function has been called with fewer parameters than it was defined with. For example:

(defun sq (x) (* x x))
(sq)

'x' has too many arguments

A function has been called with too many arguments. For example:

(mod 15 2 3)

'x' has too many parameters

A function has been called with more parameters than it was defined with. For example:

(defun sq (x) (* x x))
(sq 2 3)

Illegal character after #

In uLisp # can only be followed by '\', 'B', 'b', 'O', 'o', 'X', or 'x'.

Illegal place

The in-place operations setf, push, pop, incf, and decf can only take the functions car, firstcdr, rest, and nth in their second argument. For example:

(defvar a '(1 2 3 4))
(setf (second a) 7)

The solution is to rewrite the second argument in terms of these functions:

(setf (car (cdr a)) 7)

'incf' arithmetic overflow

Overflow occurred in an expression using incf. For example, on a 16-bit platform :

(setq a 32767)
(incf a)

Incomplete list

A close bracket was typed with no matching opening bracket.

'x' is an illegal function

A function was called that is not a legal function. For example:

(defvar a 12)
(a 10)

'x' is not a character

The argument to char-code is not a character. For example:

(char-code "a")

'x' is not a number

The argument to an arithmetic function is not a number. For example:

(+ 2 "3")

'x' is not a stream

The stream parameter given to an input or output function is not a valid stream. For example, if there is no I2C device with address 27:

(with-i2c (str 27) (write-byte 0 str))

'x' is not a string

The first parameter to char is not a string.

'x' is not a symbol

An attempt to change the value of something that's not a symbol. For example:

(defvar 12 6)

'x' is not valid here

The function 'x' is invalid.

It wasn't being traced

The untrace command specified a function that hadn't been traced with trace.

'length' argument is not a list or string

The argument to length should be a list or a string. For example:

(length 12345)

load-image not available

On this platform load-image is not supported.

Malformed list

The list is not a valid dotted list because more than one object follows a dot. For example:

(a . b c)

'mapc' second argument is not a list

The second argument to mapc is not a list. For example:

'mapc' third argument is not a list

The second argument to mapc is not a list. For example:

'mapcar' second argument is not a list

The second argument to mapcar is not a list. For example:

'mapcar' third argument is not a list

The third argument to mapcar is not a list. For example:

'member' second argument is not a list

The second argument to member is not a list. For example:

No room

There is no space left in the Lisp workspace. Delete some functions or variables using makunbound.

No room for long symbols

The ATmega328 version of uLisp doesn't support long symbols of more than 3 characters, or symbols containing characters other than a-z or 0-9, because there isn't enough memory.

Other versions of uLisp may give this error if you've defined a large number of symbols, and there is no space left in the symbol table. From now onwards you will be restricted to 3-character symbols.

'x' not a string

An argument to concatenate is not a string. For example:

(concatenate 'string "cat" #\s)

'note' octave out of range

The octave specified for the note function is out of range for the PWM output.

'nth' index out of range

In a call to an in-place function the second argument to nth doesn't reference an element in the list. For example:

(defvar a '(0 1 2))
(setf (nth 3 a) 7)

'nth' second argument is not a list

The second argument to nth is not a list. For example:

(nth 3 "hello")

Number out of range

A number has been entered that is out of range for the platform. For example:

(print 40000)

Problem loading from SD card

There was a problem loading an image from the SD card. For example, the file ULISP.IMG was not found.

Problem reading from SD card

There was a problem reading from the SD card. For example, the file was not found.

Problem saving to SD card

There was a problem saving an image to the SD card. For example, the SD card has been removed.

Problem writing to SD card

There was a problem writing to the SD card. For example, the SD card has been removed.

'read-from-string' argument is not a string

'restart' not i2c

The stream supplied to restart-i2c is not an I2C stream.

'reverse' argument is not a list

The argument to reverse is not a list. For example:

save-image not available

On this platform save-image is not supported.

Stack overflow

The Lisp stack has overflowed. It may be necessary to restart uLisp.

String compare argument is not a string

One of the arguments to a string compare function, string<, string=, or string>, is not a string. For example:

(string= print "print")

'subseq' first argument is not a string

The first argument to subseq is not a string. For example:

(subseq '(a b c) 1 2)

'subseq' index out of range

One of the arguments to subseq is out of range for the given string. For example:

(subseq "uLisp" 1 6)

Too many long symbols

'x' undefined

A symbol x has been evaluated that has not yet been defined.

Unknown character

The escape sequence #\ is followed by an unknown character. For example:

#\FRED

Unknown stream type

The stream type is unknown.

'x' unknown variable

A symbol x has been referenced that has not yet been defined.

(setq w 3)

Unmatched right bracket

A right bracket was typed with no matching left bracket.

with-sd-card not supported

SD card support is not available.

'with-serial' port not supported

The port specified to with-serial is not supported on this platform.

'with-spi' invalid divider

The clock divider supplied to with-spi is not a valid value.