On 9/17/17 8:18 AM, Paul Dupuis via use-livecode wrote:
concatenating a cr (or whatever line delimiter the file uses if opening
as binary) before mStart and reading from file until that string will
find all instances but the 1st line of the file (it the file starts with
mstart)
I think it should find the first line as well:
on parseFile
put "/path/to/file" into tFile
put cr & "mstart" into tDelim
open file tFile for read
repeat until eof
read from file tFile until tDelim
-- process the text here
end repeat
end parseFile
The only hitch is that the last word of the retrieved text will be
"mstart" preceded by a cr. But it wouldn't be hard to delete that and
add it before the next retrieval, since the delimiter is a constant.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode