Hack it as you like.
.. m.
Code: Select all
#!/usr/bin/newlisp
;;
;; simple template for new-lisp scripts
;;
;; -----------------( boiler-plate )-----
;;
(constant 'APPNAME (main-args 1))
(define (help-msg)
(println "usage: " APPNAME " <mand-n> [opt-x]"))
(define (argc)
(length (main-args)))
;; -----------------( app-specifics )-----
;;
(define (do-stuff n)
(println " ( " n " ) "))
;; -----------------( main-driver )-----
;;
(setq n-args (argc))
(case n-args
(3 (do-stuff (int (main-args 2))))
(true
(help-msg)))
(exit) ; important