Microsoft KB Archive/63901

= Incorrect SEEK in Example in Basic 7.00 Language Reference =

Article ID: 63901

Article Last Modified on 10/20/2003

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.1
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q63901



SUMMARY
On page 323 of the &quot;Microsoft Basic 7.0: Language Reference&quot; manual, the example for the SEEK statement (on the 6th line from the bottom) incorrectly shows that the process for backing up a file is as follows: SEEK #1, SEEK(1) - LEN(RecordVar) This statement is the correct method for backing up one record position in a binary file. In a binary file, the SEEK function refers to a byte in the file. Therefore, to move forward or backward a record, you would increment or decrement by the number of bytes in each record of the file.

However, because the file in the SEEK example on page 323 is a RANDOM access file, a SEEK function refers to each record in the file, not to each byte in the file. Thus, the statement should be corrected to read as follows: SEEK #1, SEEK(1) - 1

Additional query words: BasicCom SR# S900712-2

Keywords: KB63901

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.