Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Stuck at the end of a file

Author
Message
DCSoundSystem
User Offline
Joined: 6th Jan 2018
Location:
Posted: 7th Jan 2018 04:55
Hey, I've got this problem with my program where I read in a file, close it, and then try to open the same file again. But on the second time opening it still tells me I'm at EOF(end of file). I've tried opening a different file to file 1(the file number I'm using) and then opening the original file again. But no luck. Any tips on closing a file so that I open it again as if it was the first time opening it?
DCSoundSystem
User Offline
Joined: 6th Jan 2018
Location:
Posted: 7th Jan 2018 05:05
Hello, I might be double posting this. But I have a file I have opened in a program I am making. At one point, I close the file and reopen the same file. But when I try to read from it, I am stuck at EOF(end of file). Is there any way to close a file so that I can reopen it as if it was the first time I opened it?
LBFN
11
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 7th Jan 2018 13:47
First, you posted in the DarkBASIC Classic forum. Are you really using that or are you using DarkBASIC Pro? I duplicated what you are doing in DB Pro and it worked fine. Could you please post the code you are using? Select it in the DB editor and copy it and then click the CODE button here, paste the code and click the CODE button again. That way it will put your code in a snippet box.



So many games to code.....so little time.
Latch
11
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Jan 2018 21:16
just be sure to close the file after you're done with your file operations before you perform any new ones.

Enjoy your day.

Login to post a reply

Server time is: 2018-04-25 23:17:55
Your offset time is: 2018-04-25 23:17:55