I'm not sure how you are using your Fn's but it seems to me that
you might be well served adding:
Code:
hFile = FREEFILE
to use a Filenum of 0 (uninitialized LOCAL hFile).
Your first example had a hard coded Filenum of 1 which probably
matched the hFile value from the FREEFILE assignment in your sCFile
function.
You might also consider adding some error checking around file
operations to make sure that they succeeded.
Code:
ErrorOccurred& = ERRCLEAR IF ErrorOccurred& THEN MSGBOX "Error"+STR$(ErrorOccurred&)+" during file I/O."
------------------
Bernard Ertl
Leave a comment: