CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 01-20-2003, 06:29 AM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
How to "trim" numbers in Lisp

Hi,

I'm writing a Lisp routine that produces an ASCII list of all the round holes in the flat view of a drawing.
Here's an example of the output:
Diameter;X-coordinate;Y-coordinate
4.2999799999360002;206.90503034145198;139.53199609113381
3.5999799999461803;171.39749935552396;129.34448250634
5.1999799999224399;199.39921003322698;157.34619318403981
5.1999799999223999;247.48121003250799;109.2641931847557
4.2999999999359204;231.21901518614598;125.5263880311189

It works fine, but, as you can see the numbers have up to 16 digits behind the decimal point. I'd like to have 1 or 2.
Is there a trick to "trim" the numbers?
Thanks!
Jaap Kramer
Reply With Quote
  #2  
Old 01-20-2003, 10:41 PM
Markus Markus is offline
Registered User
 
Join Date: Oct 2002
Location: Sindelfingen, Germany
Posts: 88
You can use SD-NUM-TO-STRING to reduce the number of digits after the decimal point.

Markus
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:26 PM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.