The last output with the print-command is repeated .
( print "sk-exp: " sk-exp ) ...
This is the output in the output-window :
sk-exp: 33
sk-div: 10001000
scale-max: 2020
...
correct would be 3 , 1000 and 20
Just like in a terminal window, the monitor area in newlisp-edit.lsp shows the evaluation result of each expression evaluated at the top level, and any additional output of print statements:
Compare these two outputs:
newLISP v.9.1.8 on OSX UTF-8, execute 'newlisp -h' for more info.
> (set 'x 123)
123
> (print x)
123123
>
and this from the monitor area of newlisp-edit.lsp
123
123123
the editor area in newlisp-edit.lsp contains:
(set 'x 123)
(print x)
the print statement has a return value of 123 and a side effect of printing 123.
Lutz
OK - i understand, this is not gui-server-specific . On the other side it's sometimes a bit confusing .
That's how the repl works in just about every lisp I've used.