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 / resetting a file

Author
Message
BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 2nd Aug 2006 21:19
is there any way to reset the position in reading a file? I am making a text adventure and the computer reads a lot of words (word lists, verb lists ect). However, everytime I want to check a new word against one of those lists, I have to close the file and reopen it. Is there any way to simply restart reading at the beginning?
SimSmall
21
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 2nd Aug 2006 22:13
when the program loads, copy the top lines in the file that need to be read later on into another text file. Then when comparing, open the new file, which allows you to keep the main text file open.

Then just before the program closes, delete this new file.

Login to post a reply

Server time is: 2026-07-08 10:16:20
Your offset time is: 2026-07-08 10:16:20