$if 0 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ· PowerBASIC v3.20 ÚÄÄ´ DASoft ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ· ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ Copyright 1995 ³ DATE: 1995-10-01 ÇÄ· ³ ³ FILE NAME FSEEK .TXT º by ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÄ º º ³ ³ º Don Schullian, Jr. º º ³ ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º º ³ A license is hereby granted to the holder to use this source code in º º ³ any program, commercial or otherwise, without receiving the express º º ³ permission of the copyright holder and without paying any royalties, º º ³ as long as this code is not distributed in any compilable format. º º ³ IE: source code files, PowerBASIC Unit files, and printed listings º º ÔÍÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ º ³ .................................... º ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ $endif '.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø.ø ' ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø ø PowerBASIC keeps internal track of file positions so, when you use SEEK as function you get back PB's information that may, or may not be DOS's idea of where the pointers are. This is not important unless you are using any of the file reading/writing functions that use the file's handle: fReadBlock? fWriteBlock? fReadBlockPtr? fWriteBlockPtr? fReadB? fWriteB? fReadI% fWriteI? fReadW?? fWriteW? fReadL& fWriteL? fReadD??? fWriteD? What happens is that DOS writes/reads the data, updates the file pointers but because we have by-passed PowerBASIC it doesn't have the changes stored in it's variables. Mostly all of this is a "tempest in a teacup" as the SEEK function is a rare call indeed but you need to be aware of the situation. fSEEK& returns DOS's pointer position at all times! There are 2 other functions that go beyond the SEEK statement that are available to you if you need them: fSEEKend& ( Handle% ) same as SEEK #FileNo, LOF(FileNo%) fSEEKrel& ( Handle%, Bytes% ) this function will move the pointer forwards (Bytes% > 0 ) or backwards (Bytes% < 0 ) through the file. Once again, these are rare calls but may come in handy sometime!