Frage

If I run this code

(format t "~a" "hello world")

in sbcl's default REPL, the output is "hello world" as expected. However, when I try to run the same code in slime mode in emacs, it throws the following error:

eval: Wrong type argument: stringp, t

What is that i am doing wrong here ?

War es hilfreich?

Lösung

This is an Emacs error message, not an SBCL's one.

You are giving the form to Emacs and in Emacs Lisp the function format does not take a stream designator as the first argument:

format is a built-in function in `editfns.c'.

(format STRING &rest OBJECTS)

Format a string out of a format-string and arguments. The first argument is a format control string. The other arguments are substituted into it to make the result, a string.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top