open and read commands
Mike Fedkiw
filepro at adelphia.net
Sat Dec 1 17:40:17 PST 2007
This helped. I can now read the first line from the text document.
How do I get it to continue though the rest of the .txt document? It is only
reading the first line.
(txt) returns the text I am looking for and (x) seemed to be the length of
(txt)
Thank You, Mike
----- Original Message -----
From: "Laura Brody" <laura at hvcomputer.com>
To: <filepro-list at lists.celestial.com>
Sent: Saturday, December 01, 2007 7:59 PM
Subject: Re: open and read commands
>
>
> You really want this:
>
> declare local handle(8,.0)
> declare local txt
>
> aa="c:/jpgfile.wri"
> handle = open(aa,"rt") 'notice that it is "rt" and not just r
> if handle le "0"
> then errorbox "Unable to open file:" < aa; exit
> i = "160" 'how many characters will there be in a line and double it
> x = readline(handle,txt,i)
> if x eq "o" 'EOF reached
> then x = close(handle)
> 'otherwise, do whatever you want with the text in variable txt
>
> Does this help?
>
> --
> Laura Brody
> +------------- Hudson Valley Computer Associates, Inc ----------+
> | PO Box 859 120 Sixth Street http://www.hvcomputer.com |
> | Verplanck, NY 10596-0859 Voice mail: (914) 739-5004 |
> +------ PC repair locally, filePro programming globally --------+
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
More information about the Filepro-list
mailing list