I am using this method(): Microsoft.VisualBasic.FileSystem.FilePut(file_num, "aaa",-1)
and would like to know what '-1' can mean.
MSDN writes it is "record number (Random mode files) or byte number (Binary mode files) at which writing starts". It does not make sense as there is no -1 record.
However, the code snippet works fine.
Loading

VulpesRank #55 · 29.2K reputationPosted Mar 8, 2013, 4:27 AM EST
If you pass -1, or omit it altogether, this means that the next record or byte after the last FileGet or FilePut function, or pointed to by the last Seek function, will be written to.
Tamas Szigeti15 reputationPosted Mar 8, 2013, 4:53 AM EST
If I understood it correctly, the third parameter refers to whether the next record should be written or shouldn't. If the param is -1 or void, the next record shall be written.
VulpesRank #55 · 29.2K reputationPosted Mar 8, 2013, 5:11 AM EST
Here's a VB example I found on MSDN which makes the use of -1 clear though for FileGet rather than FilePut: