Join the live talk at Discord.Be part of the conversation athttp://discord.qb64.org.
0 Members and 1 Guest are viewing this topic.
FF = FreeFile If _FileExists("temp.tmp") Then Kill "temp.tmp" Open DB_FILE For Input As #FF: HH = FreeFile Open "temp.tmp" For Append As #HH While Not EOF(FF) Line Input #FF, aline If RECNUM = cnt Then Print #HH, INFO Else Print #HH, aline End If cnt = cnt + 1 Wend Close #HH Close #FF Kill DB_FILE '<-- program fails here with file not closed Name "temp.tmp" As DB_FILE
CLOSE #1, CLOSE #2
Glad you got this fixed. Hope you feel better soon!
CLOSE without any argument will close all open files.
thanks! that is very helpfulSo with my current conundrum, how would I seek out and destroy any stragglers :-)
What is straggling? certainly not open files not closed yet because you just learned, I think lol, that CLOSE without argument closes them all.Sometimes when I do file work I have to ChDir and change back to get the system to update it's file listing for the folder that I am working in like renaming files, moving, removing... specially working from QB64.