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
__

(prin1 [expression [file-descriptor]])


Print it exactly the way it looks.


This function prints data to the screen or to a file. When a file-descriptor is provided, LISP prints to a file; when the file-descriptor is missing, LISP prints to the progeCAD 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. Only the expression is printed, no new line or space is included.

The prin1 function can be used with no arguments to return a null string, in which case an empty file is printed.

Examples

Code Prints Returns
(setq v1 222)    
     
(prin1 v1) 222 222
(prin1 'v1) V1 V1
(prin1 "Thank You") "Thank you" "Thank you"
(prin1 "Sample" f) "Sample"(to file f) "Sample"
(prin1 "\nName:") "\nName:" "\nName:"

NOTES

  • Use the prin1 function at the end of a LISP routine to suppress the display of nil when the routine finishes running:

    (prin1)

  • The difference between the prin1 function and LISP's other print-related functions (for example, princ and print) is that prin1 treats control characters literally.
  • progeCAD does not support Unicode.

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