1. Re: Binary searching in spell checker & \n problems
[Spell checker]
To load a file in FAST, store it as one loooonnnnnnggggg line with a \n on the
end, and then read in the whole job lot with one gets().
[\n problems]
how about
function read_file(integer fn)
object junk
sequence data
integer leng
junk="" --empty sequence
data={} --ditto
while not atom(junk) do
data=append(data,junk)
junk=gets(fn)
end while
leng=length(data)
if data[leng][length(data[leng])] != '\n' then
data[leng] = data[leng] & '\n'
end if
end function
No extra overhead (except on the last line).
Did I miss something (probably) ?
Daniel