Is there one hiding somewhere? I searched this Forum and the Home site w/o any luck.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuContent-type' contains invalid characters, aborting requestQuote
#!C:binnewlispnewlisp.exe
(print "Content-type: text/htmlnn")
(print "<html>")
(print "<h4>CGI by newLISP v" (sys-info -2)" on " ostype "</h4>")
(dolist (e (env)) (println (e 0) " : " (e 1) "</br>"))
(println "</html>")
(exit)
#!c:binnewlispnewlisp.exe
(println (main-args 2)) ;; works OK
(dolist (x (main-args))
(println $idx ":" x))
(exit)
(dolist (x (main-args 2))
(set 'vowels '("a", "e", "i", "o", "u"))
;; define a function called pig-latin
(define (in-pig-latin this-word)
(set 'first-letter (first this-word))
(if (find first-letter vowels)
(append this-word "ay") ; concatenate word and "ay"
(append (slice this-word 1) first-letter "ay"))) ; concatenate
;; test the function
(println (in-pig-latin "red"))
(println (in-pig-latin "orange"))
(exit 0)
;; output is
;;edray
;;orangeay
;;Notes: the setf and setq function BROKE the code when I tried to use them
;; Why was that? When is setf and setq used in NL?
(set 'name "some_name")
(if (= name "dukester") (emailPerson))
(letrec
((IB "Enter initial balance: ")
( AT "Enter transaction (- for withdrawal): ")
(FB "Your final balance is: ")
.
.
(dolist (s (var1 var2 var3 var4 var5))
(replace "<" s "<"))
sub some_function {
declare a local_var
if (some_test) { do something
return local_var}
if (some_other_test) { return something}
else {return 0}
}
(define (my_func)
(local (my_var)
(if (= "blah" my_var) (do this))
return_something
)
(if (= "blaah" some_var) (return_something_else))
(if none of the above are true (return nil))
)
(define (load_mod x)
(if (file? (append (env "NEWLISPDIR") "/modules/" x)) (print "Loading module: " x)
(throw-error "module does not exist")
)
)