newlisp-edit

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

newlisp-edit

Post by didi »

The last output with the print-command is repeated .

Code: Select all

( 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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

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:

Code: Select all

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

Code: Select all

123
123123
the editor area in newlisp-edit.lsp contains:

Code: Select all

(set 'x 123)
(print x)
the print statement has a return value of 123 and a side effect of printing 123.

Lutz

didi
Posts: 166
Joined: Fri May 04, 2007 8:24 pm
Location: Germany

Post by didi »

OK - i understand, this is not gui-server-specific . On the other side it's sometimes a bit confusing .

Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Post by Jeff »

That's how the repl works in just about every lisp I've used.
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

Locked