--- On Sun, 6/27/10, Alejandro Tejada <[email protected]> wrote: > > Hi Jacke, > > Jacqueline Landman Gay wrote: > > > Try: if it is empty > > Many Thanks! > This works. :-D > > Now the function will be: > > function quasiMD5 pFile > local tMD5s > open file pFile for binary read > repeat > read from file pFile for 4096 chars > if it is empty then > exit repeat > end if > put the md5digest of it after tMD5s > end repeat > close file pFile > return the md5Digest of tMD5s > end quasiMD5 > >
To make this future-proof, you might want to use the byte chunk type for reading from the binary file: read from file pFile for 4096 bytes -- was: chars That way, after Unicode support in the revEngine becomes pervasive and transparent, the above will work just fine, whether or not the intricacies of what constitutes a 'char' change. Jan Schenkel ===== Quartam Reports & PDF Library for Revolution <http://www.quartam.com> ===== "As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld) _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
