My goal is to create an IF / THEN / ELSE statement in LISP.
To test this I tried to delete "/w1" and "/p1" at startup. (Since some users may have their system to automatically add these at startup.)
At a basic level, this works in some cases:
- delete_3d "/w1" complete
- delete_3d "/p1" complete
But if they dont have "/w1" or "/p1" loaded, then it will create an error trying to delete something that isn't there,
So I tried to make a conditional statement:
I tried this, but after many variations, I had no luck creating an "ELSE" part of the statement
- (if "/w1" (delete_3d "/w1") ( ? )) ;; IF "/w1" exists delete it, If it doesn't exist, NIL - End statement and continue
- (if "/p1" (delete_3d "/p1") ( ? ))
Does anyone have a solution for this?