newLISP Fan Club

Forum => newLISP Graphics & Sound => Topic started by: didi on June 30, 2007, 09:03:22 AM

Title: newlisp-edit
Post by: didi on June 30, 2007, 09:03:22 AM
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
Title:
Post by: Lutz on July 01, 2007, 06:31:51 AM
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
Title:
Post by: didi on July 01, 2007, 10:28:15 AM
OK - i understand, this is not gui-server-specific . On the other side it's sometimes a bit confusing .
Title:
Post by: Jeff on July 01, 2007, 01:34:52 PM
That's how the repl works in just about every lisp I've used.