mbrandt5 发表于 2022-7-5 18:47:13

(If X (p)

How do I make ...code... perform if X = p
 
 
Like this but with it working...
 
 
(If X (p))
 
 
(...code...)
 
 
)

Tharwat 发表于 2022-7-5 19:05:25

What are the values of x and p ?

Lee Mac 发表于 2022-7-5 19:20:13

(if (= x p)    ...)

Tharwat 发表于 2022-7-5 19:31:59

(if (equal x p 1e-4) (.....))

mbrandt5 发表于 2022-7-5 19:35:49

oh yeah I forgot lisp lists those first thank you

BIGAL 发表于 2022-7-5 19:58:51

A bit more
 

(if (= x p))(do line 1)(else do line 2))(if (= x p))(progn(do line 1)(do line 1a)(do line 1b))(else do line 2))
页: [1]
查看完整版本: (If X (p)