- newlispEvalStr - "\n"

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

- newlispEvalStr - "\n"

Post by newdep »

Hello Lutz,

Seems "newlispEvalStr" always adds an extra "\n" to its output.

It dont see any reason why this should happen when caling the newlisp library
from other languages, actualy its quiet annoying this extra "\n".
All those "\n" first must be removed from the evaled string befor it can be
intepreded by the lagunage that imports the newlisp library..

Even using the newlisp library from within newlisp its of no use a get-string
or eval-string dont even look for the "\n"..

Whats the use of this extra "\n" and can it be removed by default?

PS:
Perhpas newlisp should have a global config variable like Tcl does with
"fconfigure" and include pipes/sockets/stdio/events and library calls for
configuration behaviours...Saved space in functions and would make interworking between WIN Linux and OSX also flexible.

Norman.
-- (define? (Cornflakes))

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

Post by Lutz »

The /n was introduced with 'net-eval' to separate the return values of multiple evluated expressions.

Evaluation via 'newlispEvalStr', 'net-eval' and command-line are now handled consistently the same way, which is a good thing.

The main reason for this was to accomodate 'net-eval', which helps to write newlisp programs in a distributed fashion.

Lutz

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Isn't it nicer to return multiple evaluated values in multiple nested lists and
not using the "\n" for net-eval?


Norman.
-- (define? (Cornflakes))

Locked