텍스트에 저장된 문자에서 숫자만 표시하는 리습인데 ascii code를 이용해서 찾는 방법 좀 알려주세요
아마 아래 노란부분이 변경되어야 할것같은데..
ascii code 사용을 안해봐서… 어떻게 사용하는지를 모르겠어요..
Please help me~~~~
(defun c:test34()
(graphscr)
(setq f-name (getstring “nEnter file name :”))
(setq st_p (getpoint “Enter start point :”))
(setq Xpoint (car st_p))
(setq Ypoint (cadr st_p))
(setq o-file (open f-name “r”))
(setq text-line (read-line o-file))
(while text-line
(setq text-num (strlen text-line))
(setq i 1)
(setq ResultT “”)
(repeat text-num
(setq TextS (substr text-line i 1))
(setq CheckS (numberp (read TextS)))
(if (= CheckS t) (setq ResultT (strcat ResultT TextS)))
(setq i (1+ i))
)
(setq XY (list Xpoint Ypoint))
(if (/= ResultT “”)
(progn
(command “text” XY “2.5” “0” ResultT)
(setq Ypoint (- Ypoint 5.0))
)
)
(setq text-line (read-line o-file))
)
(close o-file)
(princ)
)
공유