run shell:
Could not start C:Program FIles(x86)newlisp/newlisp.exe -C -w "C:UsersJeremy"
I've tried uninstalling newLISP and loading again but no luck. Any suggestions anyone?
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 Menu
;Redefine all of NewLisp's boolean functions
(define (array?? x A B)(bool-if array? x A B))
(define (atom?? x A B)(bool-if atom? x A B))
(define (context?? x A B)(bool-if context? x A B))
(define (directory?? x A B)(bool-if directory? x A B))
(define (empty?? x A B)(bool-if empty? x A B))
(define (file?? x A B)(bool-if file? x A B))
(define (float?? x A B)(bool-if float? x A B))
(define (global?? x A B)(bool-if global? x A B))
(define (inf?? x A B)(bool-if inf? x A B))
(define (integer?? x A B)(bool-if integer? x A B))
(define (lambda?? x A B)(bool-if lambda? x A B))
(define (legal?? x A B)(bool-if legal? x A B))
(define (list?? x A B)(bool-if list? x A B))
(define (macro?? x A B)(bool-if macro? x A B))
(define (NaN?? x A B)(bool-if NaN? x A B))
(define (nil?? x A B)(bool-if nil? x A B))
(define (null?? x A B)(bool-if null? x A B))
(define (number?? x A B)(bool-if number? x A B))
(define (primitive?? x A B)(bool-if primitive? x A B))
(define (protected?? x A B)(bool-if protected? x A B))
(define (quote?? x A B)(bool-if quote? x A B))
(define (string?? x A B)(bool-if string? x A B))
(define (symbol?? x A B)(bool-if symbol? x A B))
(define (true?? x A B)(bool-if true? x A B))
(define (zero?? x A B)(bool-if zero? x A B))
(define (not?? x A B)(bool-if not x A B))
(define-macro (nest)
(setq op (args 0) rargs (rest (args)))
(op (eval (if (symbol? (rargs 0))
(begin
(setq r (rest (rargs))
lst (rargs -1)
r (if (symbol? lst)
(setf (r -1)(list lst))
r
)
)
(apply (rargs 0)(map eval r))
)
(rargs 0)
))))
(define-macro (sn) (nest sin ))
(define-macro (cs) (nest cos ))
(define (bool-if func x A B)
(if (or A B)
(eval (if (func x) A B))
(func x)))
(define (new-integer? x A B)
(bool-if integer? x A B))
(define-bool (even?)
(zero? (% $X 2))
)
;; New FOR-ALL
(define (forall test lst (op and))
(if-not (list? test)
(for-all test lst)
(apply op (map for-all test (dup lst (length test))))))
(define (string-or-list? x)(or (list? x)(string? x)))
(define-macro (length?)
(let (len (length (args))
fst (eval (args 0))
scd (eval (args 1))
)
;....if we have two lists to compare
(if (and (<= 2 len 3)
(string-or-list? fst)
(string-or-list? scd))
((if (= len 2) = (eval (args 2)))
(length fst)
(length scd))
;....otherwise operate on a single list
(apply length2? (map eval (args)))
)
)
)
(define (length2? lst (n 1)(op =) booltest)
(and (op (length lst)
(if (string-or-list? n)(length n) n))
(if booltest
(if (list? booltest)
(for-all true?
(map for-all booltest (dup lst (length booltest))))
(for-all booltest lst))
true
)))
(define (length? lst (n 1)(op =) booltest)
(and (op (length lst)
(if (or (string? n)(list? n))(length n) n))
(if booltest
(if (list? booltest)
(for-all true?
(map for-all booltest (dup lst (length booltest))))
(for-all booltest lst))
true
)))
(define (integer-vector? v)(length? v 0 > integer?))