newLISP Fan Club

Forum => newLISP in the real world => Topic started by: Maurizio on April 30, 2004, 08:10:36 AM

Title: unexpected echo
Post by: Maurizio on April 30, 2004, 08:10:36 AM
I'm trying a simple lisp program activated via httpd

this is the source :

(define (bold text)
  (print (string "<b>" text "</b>")))

(define (italic text)
  (print (string "<i>" text "</i>")))

(print "Content-type: text/htmlnn")
(print "<html>")
(print "<body>")

(print (string "<p> this is " (bold "bold") " and this " (italic "italic") " then normal </p>" ))

(print "</body>")
(print "</html>")

(exit)


instead of seeing :

this is bold and this is italic then normal



i see

bold italic

this is bold and this is italic then normal



there are two extra words:  bold and italic

before the desired output.



I'm using newlisp 8.01.

Any suggestion ?

Regards

Maurizio
Title:
Post by: Maurizio on April 30, 2004, 08:18:13 AM
sorry, i see.



I must remove print in the function definitions



Regards

Maurizio