#File parameter, such as
Code: Select all
WriteData(#File, *MemoryBuffer, LengthToWrite)
Code: Select all
UseFile(#File)
WriteData(*MemoryBuffer, LengthToWrite)
"current file" has changed and that leads to bugs. Spent most of the
morning tracking down that exact situation.
I realize this change would break existing code, but perhaps this could
be included in the upcoming Vs 4.0.
Many of the File commands need this change. This change would
- make them consistent with the ones that already require the #File parameter
deprecate the need for the UseFile(#File) command
Code: Select all
; psuedo code
OpenFile(10,"Example.txt")
OpenFile(20,"Insert.txt")
OpenFile(30,"Rewrite.txt")
While Eof(10) = 0
Text$ = ReadString(10)
; manipulate the data to your heart's content
WriteStringN(30,Text$)
Text$ = ReadString(20)
; manipulate the data to your heart's content
WriteStringN(30,Text$)
Wend
CloseFile(10)
CloseFile(20)
CloseFile(30)
Code: Select all
; psuedo code
OpenFile(10,"Example.txt")
OpenFile(20,"Insert.txt")
OpenFile(30,"Rewrite.txt")
While Eof(10) = 0
UseFile(10)
Text$ = ReadString()
; manipulate the data to your heart's content
UseFile(30)
WriteStringN(Text$)
UseFile(20)
Text$ = ReadString()
; manipulate the data to your heart's content
UseFile(30)
WriteStringN(Text$)
Wend
CloseFile(10)
CloseFile(20)
CloseFile(30)
and/or procedures separated.
Thanks,
Terry