(defun test (file / F LST X)
;(test "D:\\test.txt")
(setq f (open file "r"))
(while (setq x (READ-LINE f))
(if (or
(= (substr x 1 4) "Mod_")
(= (substr x 1 4) "Man_")
(= (substr x 1 4) "Siz_")
) ;_ or
(setq lst (cons (substr x 5) lst))
) ;_ if
) ;_ while
(close f)
(reverse lst)
) ;_ defun
text-file:
I've used this format to search an external file
Code:
(cond (fn
(setq fp (open fn "r")
loop T
)
(while (and loop (setq line (read-line fp)))
(setq char (substr line 1 1))
(cond ((= char ";")) ; do nothing character
((= char "*") ; flag character
(setq rngmax (read (substr line 2)))
(if (<= cfmax rngmax)
(setq dlist (read-line fp)
loop nil
)
)
)
)
)
(close fp)
)
)
Man_ULTRA MANUFACTURER-1234
When the external file is of the form:
*100
a,b,c
Mod_ULTRA MODEL-123-45/6789
Can anyone show me how to make or fomat a compound search?
Like something with three tiers. Manufacturer,Model, size...
Siz_HUGE SIZE-1234x5678m
« Last Edit: 30-08-2006, 01:40:36 by Water Bear »
Report to moderator Logged
-Is it better to burnout or simply fade away?
-Does fire yield to ice, or is it the other way around?
-Gutta cavat lapidem non vi, sed saepe cadendo
.....
Return Values
'("ULTRA MANUFACTURER-1234" "ULTRA MODEL-123-45/6789" "HUGE SIZE-1234x5678m")