Hi Steve,
if we use 'strcase' function when we set 'ts', the return will be in uppercase...
The 'ht' variable is a real number???
Code:
(cond
((= ts "TXT-13") (setq newval "13-TEXT"))
((= ts "TXT-18") (setq newval "18-TEXT"))
((= ts "TXT-25") (setq newval "25-TEXT"))
((= ts "TXT-35") (setq newval "35-TEXT"))
((= ts "TXT-5") (setq newval "5-TEXT"))
((= ts "TXT-7") (setq newval "7-TEXT"))
((and (= ts "ROMANS") (vl-position ht '(1.3 2.6 6.5 13.0 26.0 32.5 65.0 130.0)))
(setq newval "13-TEXT")
)
((and (= ts "ROMANS") (vl-position ht '(1.8 3.6 9.0 18.0 36.0 45.0 90.0 180.0)))
(setq newval "18-TEXT")
)
((and (= ts "ROMANS") (= ht 250.0))
(setq newval "25-TEXT")
)
((and (= ts "ROMANS") (vl-position ht '(3.5 7.0 17.5 35.0 70.0 87.5 175.0 350.0)))
(setq newval "35-TEXT")
)
((and (= ts "ROMANS") (vl-position ht '(5.0 10.0 25.0 50.0 100.0 125.0 250.0 500.0)))
(setq newval "5-TEXT")
)
;if none of the above conditions is true, and ts= ROMANS, change to "7-TEXT"
((= ts "ROMANS") (setq newval "7-TEXT"))
) ;end cond
Henrique