Hi Charles ,
when getline function find a blank line the loop end ignoring the rest of string , so i changed it like this
function getline(s as string, b as sys) as string
=================================================
sys c,bb
bb=b
do
c=asc(s,b)
if c=0 then exit do
if c=13 then b+=1 : exit do
b+=1
end do
if asc(s,b)=10 then b+=1
return mid(s,bb,b-bb)
end function
so it works well but when using it with my next function the program end in the middel and execution did
not reach to end end of function , any help please?
void processAllLayer(string file)
{
sys i = 1
string src , lin
for i = 1 to LayerNo
print "processing... " file chr(10) "by" chr(10) LayName[i]
src = getfile(file)
do
lin = getline(src,i)
if not lin then exit do
print lin
end do
'<------------------------------- program end here????????
if ActiveLayer[i] then
addr eax , src
push eax
call procProcess[i]
push eax : push eax
putfile file, cast bstring eax
call freememory
end if
next
}