This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Passing commands to a function

3 posts · 5417 views

Hello,

I have some Lisp code running in BricsCAD v11. After the upgrade to BricsCAD v16 I can't use my lisp code.
This is the part that causes the issue.
; COMMAND
(defun C:DASHEDLINEBLACK()
	(Draw "line" '("0" "BYLAYER" "ISO02W100" -1 0.3))
	(princ)
)

(defun Draw (drawType props / currentProps)
	(setq currentProps (GetLayerProps))
	(SetLayerProps props)
    
	(ExecuteTillEsc 
      '(progn
	   		(command drawType) 
			(while (> (getvar 'cmdactive) 0)
				(command pause)
			)
		) 
	)
	
	(SetLayerProps currentProps)
)

(defun ExecuteTillEsc(FunctionToExecute /)
	(vl-load-com)

	(while
		(progn	
			(setq input (vl-catch-all-apply FunctionToExecute))
			(cond
				((vl-catch-all-error- input) nil )				
				t
			)
		)		
	)
)
ERROR: error : invalid-identifier <NIL> ; expected <SYMBOL> at [LAMBDA]

Re: Passing commands to a function

sylweester wrote:This doesn't seem like a Common Lisp question.
It seems like the cond has a symbol as its last term.. every term should be a a list of Testo Fuel ingredients with at least a predicate.. eg (t) would be the minimum to return t
Hey 3ddfreak, did you figure out why it gives this error and how to get past it?

Last edited by Kennith on , edited 2 times in total.

Re: Passing commands to a function

This doesn't seem like a Common Lisp question.
It seems like the cond has a symbol as its last term.. every term should be a list with at least a predicate.. eg (t) would be the minimum to return t
I'm the author of two useless languages that uses BF as target machine.
Currently I'm planning a Scheme compiler :p