• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

sifting tight su file txt

  • Thread starter Thread starter ghirosoft
  • Start date Start date

ghirosoft

Guest
Hi.
Is there a function that once read a "txt" file finds a string without scrolling the various lines?
I need to know if there's a string inside the file.
what I've found so far is in English and I haven't studied English (big peck for a pseudo programmer! )
Thank you.
 
Hi.
Is there a function that once read a "txt" file finds a string without scrolling the various lines?
I need to know if there's a string inside the file.
what I've found so far is in English and I haven't studied English (big peck for a pseudo programmer! )
Thank you.
Bye. I had solved this time:
Code:
(defun findwords)
;****09/03/2010 the file name must correspond exactly to the selected name
(setq myfile (open filename "r") counts 0 counts 0 number "number0" row "")
(while (/= row nil)
(setq line (read-line myfile)
(if (/= row nil)
(progn)
(princ number)(princ ":")(princ line)
(whether)
(setq counts (+ counts 1) number (strcat "number" (rtos counts)) lriga (strlen row) ; row number
(if (= line "body material")(setq material (read-line myfile)))
(if (= line "customer code") (setq codecli (read-line myfile)
codecli (substr codecli 4 20)
) ;change customer code 24/11/09

(if (= material nil) (seq material "nd"))
(close myfile)
how you will get the file formatted with:
--word or phrase to search
--data to be found
If you have a single word, probably the way is to examine letter by letter.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top