How to append to an existing file?

 
How to append to an existing file? I search the documentation's file functions and find that the FILEOPEN only have modes of FILE_READ and FILE_WRITE. If I want to append some data to an existing file, what can I do?
 
valleyfir:
How to append to an existing file? I search the documentation's file functions and find that the FILEOPEN only have modes of FILE_READ and FILE_WRITE. If I want to append some data to an existing file, what can I do?

I checked the old topics and found the answer:

hfile=FileOpen(filename,FILE_READ|FILE_WRITE,"\t");
    if(hfile<0) 
        {
        Print(filename," OPEN Error: ",GetLastError());
        return(0);
        }
    else FileSeek(hfile,SEEK_END,0);
 
valleyfir:

I checked the old topics and found the answer:

the last sentence should be:

FileSeek(hfile,0,SEEK_END);