> im needing to put an if statement, or cond (not sure which one or both) in and have no idea how to
> make it work.
> i tried this
> (if ((< px1 qx1)(< py1 qy1)) sym1))
Others have already talked about IF and COND, I'd like to comment on two
beginner's mistakes your initial code is showing:
1. The parentheses must balance. Unless you are closing some larger
piece of program not shown here, you have one closing parenthesis too
much on each line.
2. Unlike many other programming languages, you may not add arbitrary
parentheses anywhere you like to combine clauses. You need to use some
special operators to connect stuff, for example AND, OR etc. PROGN is
also often useful, though meaningless in a test.
I do seem to have trouble counting the parens, but I do know they need to equal.
Im still struggling with the special operators but can see how vital they are to getting things
accomplished in the routine.
> thanks Martti
> I do seem to have trouble counting the parens, but I do know they need to equal.
> Im still struggling with the special operators but can see how vital they are to getting things
> accomplished in the routine.
The trick with counting parens is getting the computer to do that for
you: find an editor that can show the matching parens and can indent the
code according to syntax. Professionals read Lisp code based on the
indentation, not the parens.
The best editor for Lisp work I know is GNU Emacs, but even VLIDE is
better than nothing.