Re: File - read from EOF

2017-05-28 Thread JB via use-livecode
Thanks for the suggestion. Actually the way I am processing the data from the end makes it faster for what I need in the long run. I finally got it working but now I need to clean it up and probably re think it again since I did it so many different ways. Thanks to everyone for your help! JB

Re: File - read from EOF

2017-05-28 Thread Richard Gaskin via use-livecode
JB wrote: > When I read the data is put into it so I was putting empty > into it after the read to make sure it was clear. > > I tried not putting empty into it and used, > repeat until it = empty > > but apparently it never became empty. When I read your earlier description I thought you were r

Re: File - read from EOF

2017-05-28 Thread JB via use-livecode
Thanks for the info! I almost have it by keeping track of what is read. While Livecode is very fast with text I am trying to keep the process a small as possible. If I am working of 350 files a fews seconds on each file adds up a lot. JB > On May 28, 2017, at 1:29 PM, hh via use-livecode > w

Re: File - read from EOF

2017-05-28 Thread hh via use-livecode
[This certainly depends upon how you read 'sections'. If one uses a separator and search backwards then you'll get empty before the first if at start of file.] When testing this 'ineffective' way (because of searching backwards) I found a better method: Say your separator is for example c0=numToC

Re: File - read from EOF

2017-05-28 Thread JB via use-livecode
That did not work for me. When I read the data is put into it so I was putting empty into it after the read to make sure it was clear. I tried not putting empty into it and used, repeat until it = empty but apparently it never became empty. JB > On May 28, 2017, at 10:37 AM, hh via use-livec

Re: File - read from EOF

2017-05-28 Thread hh via use-livecode
> JB wrote: > ... I want to read in sections from the EOF and > stop at the beginning of the file instead reading > from the start to EOF. > > I have no problems opening, reading and > closing files or reading in sections. > > Does anyone know the easiest way to determine > when I reach the start o

Re: File - read from EOF

2017-05-28 Thread JB via use-livecode
Thanks, Richard JB > On May 28, 2017, at 8:26 AM, Richard Gaskin via use-livecode > wrote: > > Mike Bonner wrote: > > > On Sat, May 27, 2017 at 7:23 PM, JB wrote: > >> I want to read a file as binary of any > >> size but as crazy as it sounds I want > >> to read in sections form the EOF and

Re: File - read from EOF

2017-05-28 Thread Richmond Mathewson via use-livecode
Personally I'd do something "totally mental": I'd import the file contents into a field, reverse its order and work on from there. Richmond. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe

Re: File - read from EOF

2017-05-28 Thread Mike Bonner via use-livecode
Thanks for letting me know the limitations of the method I offered. Now that you point it out, it makes sense since it'd be rather tough to do a count of something that isn't entirely accessible beginning to end. The detailed files method is definitely better. I guess one could go read a file by

Re: File - read from EOF

2017-05-28 Thread Richard Gaskin via use-livecode
Mike Bonner wrote: > On Sat, May 27, 2017 at 7:23 PM, JB wrote: >> I want to read a file as binary of any >> size but as crazy as it sounds I want >> to read in sections form the EOF and >> stop at the beginning of the file instead >> reading from the start to EOF. >> >> I have no problems openin

Re: File - read from EOF

2017-05-28 Thread Jan Schenkel via use-livecode
On Sun, 5/28/17, JB via use-livecode wrote: > > Subject: File - read from EOF > To: "How to use LiveCode" > Cc: "JB" > Date: Sunday, May 28, 2017, 2:23 AM > > I want to read a file as binary of any > size but as crazy as it sounds I want > to read in sections form the EOF and > stop at the begi

Re: File - read from EOF

2017-05-27 Thread JB via use-livecode
Hi Mike, That sounds really good! thank you very much, JB > On May 27, 2017, at 7:50 PM, Mike Bonner via use-livecode > wrote: > > I think you need to do the following > > First get the length in bytes of the file > get the number of bytes in url ("binfile:" & yourfile) > > I have a file t

Re: File - read from EOF

2017-05-27 Thread Mike Bonner via use-livecode
I think you need to do the following First get the length in bytes of the file get the number of bytes in url ("binfile:" & yourfile) I have a file that I just did this on and there are 289558088 bytes Then you can either start reading at byte -whatever to -1 to grab the last part, adjusting the