Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Eror on List Functions

2 REPLIES 2
Reply
Message 1 of 3
_drinker_
165 Views, 2 Replies

Eror on List Functions

Hi,

I'm trying to use some Functions from the list like:
cdr
car
cadr
...

and it gives an error:

error: bad function: 1

does anyone know why??
can you help me??
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: _drinker_

_drinker_ wrote:
> Hi,
>
> I'm trying to use some Functions from the list like:
> cdr
> car
> cadr
> ...
>
> and it gives an error:
>
> error: bad function: 1
>
> does anyone know why??
> can you help me??

Show the actual code you tried.
Message 3 of 3
Anonymous
in reply to: _drinker_

(CAR ’((/ 1 2.2) -80.2 -23.002 (* 2 3.3))) devuelve (/ 1 2.2)
(CAR ’(34.45 décimo -12)) devuelve 34.45
(CAR ’(x y z)) devuelve X
(CAR ’(3)) devuelve 3

(CDR ’(8 80.01 -23.4 23 34.67 12)) devuelve (80.01 -23.4 23 34.67 12)
(CDR ’(x y z)) devuelve (Y Z)
(CDR (CAR ’((1 2 4) (3 5 7) (8 1 2)))) devuelve (2 4)

(CADR ’(10 20 34)) devuelve 20
(CADR ’(23 -2 1 34 56.0 (+ 2 2))) devuelve -2
(CADR ’(19 21)) devuelve 21
(CADR ’(21)) devuelve nil
(CADR ’()) devuelve nil

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost