home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / Convert.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  395 b   |  19 lines

  1. 'This program gives you a precision output
  2. 'and can be inserted into any program
  3. 'using
  4. gosub convert
  5. end
  6. 'this would be placed at the end of your program
  7. convert:
  8. input "What precision do you want" p
  9. i = 1
  10. do while i<=p
  11. i = i+1
  12. numbertoconvert = numbertoconvert*10
  13. loop
  14. numberconverted = round(numbertoconvert)
  15. do while i>0
  16. i=i-1
  17. numberconverted=numberconverted/10
  18. loop
  19. return