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
__

(princ [expression [file-descriptor]])


Print, taking into account control characters.


This function prints to a file or to the screen. When a file-descriptor is provided, LISP prints to a file; when the file-descriptor is missing, LISP prints to the Prompt History window.

When you are printing to a file, the file must previously have been opened with the open function in write "w" or append "a" mode.

The argument expression represents the expression to be printed. It can be any expression, not just a string. The expression is printed, as well as a new line.

Unlike princ function activates any control characters present within the expression. You can use the following control characters within the expression:

Control Character Meaning
\\ \ backslash character
\" " quote character
\e Escape
\n Newline
\r Return
\t Tab
\nnn Octal code nnn

Examples

Code Prints Returns
(princ "\nName:") (new line)
Name:
"\n Name:"

 

   
(setq a "Address: ")    
(princ a) Address: "Address: "
(princ 'a) A A
(princ "Telephone: " f) Telephone: (to file f) "Telephone: "

NOTE  The difference between the princ function and LISP's other print-related functions (for example, princ acts upon control characters.

(prompt string)

(setq symbol1 statement1 [symbol2 statement2] ...)

(terpri)

(write-line string [file-descriptor])

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+.