Author Topic: problem with decimal  (Read 2454 times)

0 Members and 1 Guest are viewing this topic.

TopoWAR

  • Newt
  • Posts: 135
problem with decimal
« on: September 27, 2014, 11:34:49 AM »
hello all, I was brought autocad 2013 problem, the following code returns a value without decimals me and I wonder what is the reason? I have searched and not what is the problem, I appreciate your help!

Code: [Select]
(setq a (atof "215418.631"))

(rtos a 2 3)

returns -> "215418.000"
Thanks for help

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: problem with decimal
« Reply #1 on: September 27, 2014, 11:50:33 AM »
And what if you use (rtos a 2 14)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TopoWAR

  • Newt
  • Posts: 135
Re: problem with decimal
« Reply #2 on: September 27, 2014, 12:29:09 PM »
CAB , testing testing and found the problem, the cause is a function of DOS_LIB, if I apply the following function gives me the problem of decimals, not having to do this but only because in autocad 2013, it is strange

Code: [Select]
(dos_getfiled "Archivo de Coordenadas" (if archivo_ruta archivo_ruta (getvar "dwgprefix")) "Archivo de Texto (*.txt)|*.txt|Todos los Archivos (*.*)|*.*||")
Thanks for help

RC

  • Guest
Re: problem with decimal
« Reply #3 on: September 29, 2014, 11:47:27 AM »
not a problem here
What version of Dos_lib are you running??

TopoWAR

  • Newt
  • Posts: 135
Re: problem with decimal
« Reply #4 on: September 29, 2014, 12:15:21 PM »
not a problem here
What version of Dos_lib are you running??

I know, the version is 9.0.1 dos_lib last, when I asked for help did not know that the problem was outside lisp.
Thanks for help

RC

  • Guest
Re: problem with decimal
« Reply #5 on: September 30, 2014, 12:51:28 PM »
I too am running DOS_LIB 9.0.1 on AutoCAD 2013 and am NOT having the issue.  This may not be a DOS_LIB issue.