Challenge...

Jim Ault JimAultWins at yahoo.com
Tue Jun 20 18:57:40 EDT 2006


Great, Tom,  and now all you need to watch for is the refinement Alex
noted... what if "/Separation" starts at the 49997th char?... you would not
filter it properly.  That is why he offered that you should keep the last
line of the previous read variable and append the next read to it.

Jim Ault
Las Vegas


On 6/20/06 3:10 PM, "Ton Kuypers" <tkuypers at dmp-int.com> wrote:
> Thanks Jim, this was what I was missing, works like a charm!
> 
> Ton Kuypers
> Digital Media Partners bvba
 
> On 20-jun-06, at 22:15, Jim Ault wrote:
> 
>> There are other strategies for reading a file into memory using
>> 
>> open file fn
>> put 1 into x
>> put 50000000 into y
>> repeat forever
>> read from file fn from x for y characters
>> if it is empty then exit repeat --no more chars to process
>>>          filter it with "*/Separation*"
>>>          replace "#20" with space in it
>> put cr & it after vColors
>> read from file from x for y characters
>>>          filter it with "*/DeviceN*"
>>>          replace "#20" with space in it
>>>          replace "]" with "" in it
>> put cr & it after vColors
>> add y to x
>> end repeat
>> close file fn
>> filter vColors without empty
>> 
>> --check the docs for details





More information about the use-livecode mailing list