Sequential File Position Reset

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
Pharoah
Coder
Posts: 33
Joined: Sun Nov 27, 2005 10:35 am
Location: Pennsylvania, United States
Contact:

Sequential File Position Reset

Post by Pharoah »

Is there any way to go back to the beginning of a sequential file without closing it and then re-opening it? I know this is probably a stupid question, but I did not find anything about it
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

Try SEEK, might work..
I have left this dump.
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

I am pretty sure that you need to close and open is again... or just use random access files.
Image
Pharoah
Coder
Posts: 33
Joined: Sun Nov 27, 2005 10:35 am
Location: Pennsylvania, United States
Contact:

Post by Pharoah »

Yep, SEEK'll work. It sets it to the byte position in the file.
For most things I do just use random-access files. But this is a readme file and so I wanted to make it readable by any text-editor in case the person didn't want to find out if the program had a built-in readme viewer/help system
Post Reply