Hi Virgis
'atof' like Alan says. To prevent unexpected errors, I would propose this
function:
(defun MeAtof (Val)
(if (not (wcmatch Val "*[~0-9.-]*")) (atof Val))
)
I've seen, that you plan to read a text string. Probably this string can
contain characters also. In this case 'atof' returns 0, 'MeAtof' returns nil.
Following this, your function may work like this:
...
(if (setq RetVal (MeAtof GT))
(setq GA (* 0.0001 RetVal))
(setq GA "Text is not nummeric.")
)
(print GA)
Cheers
--
Juerg Menzi
MENZI ENGINEERING GmbH, Switzerland
http://www.menziengineering.ch