CADDIT CAD CAM CNC Software - download AutoCAD compatible design software progeCAD Alibre T-FLEX and more
CADDIT Website Knowledge Base Search:
CL

progeCAD Help

CR
Welcome to progeCAD
Working with progeCAD
Command Reference
CAD System Variables
Programming progeCAD
Full Index (caution - 400kb)

Further Links:

Download progeCAD
Register progeCAD

Learning

T-FLEX PLM tutorial (PDF)
progeCAD IntelliCAD and AutoCAD training 
CATIA 2D 3D design tutorial
Alibre CAD/CAM basic tutorial

Resources

Educational CAD Software Solutions
Python scripting for DOS and Windows
Other free software downloads
CADDIT CAD CAM Forum Australia
__

(cond (statement1 result1 ...) ...)


Do it, if it's true.


This function is a commonly used conditional in LISP. If statement1 evaluates to true, any functions that follow within that block are performed, and the result of the last function is returned.

    • If statement1 evaluates to nil, LISP continues to statement2. If true, it follows the same procedure.
    • If false (or nil), LISP continues to search for a true statement.
    • If no true statements are found, a nil is returned.
    • If there are no result functions in the block, the result of the condition is returned.

Examples

Code Results
(cond ((zerop x) 0) (T nil))

In the previous example, the cond function looks at (setqs of actual examples of the above condition.

Code Results
(setq x 8) nil
(setq x 0) 0

In the next example, if d is set to 5, LISP returns the string "Equal to." If set to 6, it returns "Greater than."

Code
(cond ((< d 5) "Less than")
((= d 5) "Equal to")
((> d 5) "Greater than")
)

(if test statement1 [statement2])

(repeat number statement1 [statement2 ...])

(while text statement )

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language

CADDIT® is a registered trademark in Australia. All Rights Reserved. Comments concerning the content of this site should be addressed to our webmaster. progeCAD is a trademark of ProgeCAD srl. Autodesk® and AutoCAD® are both registered trademarks or trademarks of a third party, and used only for comparison purposes. All other trademarks, trade names or company names referenced herein are used for identification only and are the property of their respective owners. Legal and Terms of Use. Google. Find us on Google+.