Microsoft KB Archive/62771

= Record Number for PUT/GET Statement Can Be a Long Integer =

Article ID: 62771

Article Last Modified on 8/16/2005

-

APPLIES TO


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

-



This article was previously published under Q62771



SUMMARY
Pages 147 and 280 in the &quot;Microsoft Basic 7.0: Language Reference&quot; and Page 110 in the &quot;Microsoft Basic 7.0: Programmer's Guide&quot; incorrectly state that when specifying the record number in a GET/PUT statement for a random file or the position number for a binary file, the record or position number should be an integer.

The explanation for the GET/PUT statement should describe the record or position number as being either an integer or a long integer.



MORE INFORMATION
The correct syntax for the GET/PUT statement is as follows: {GET|PUT} [#]filenumber% [, [recordnumber&amp;] ] [, [variable] ] When accessing a random file, &quot;recordnumber&&quot; represents the number of the record to be read or written. When accessing a binary file, &quot;recordnumber&&quot; represents the byte position of where the reading or writing starts.

The online Help for Basic PDS 7.00 and 7.10 correctly describes the record number as &quot;recordnumber&&quot;. The following documentation, however, incorrectly describes the record number as &quot;recordnumber%&quot;:


 * 1) Page 110 of the &quot;Microsoft Basic 7.0: Programmer's Guide&quot; for 7.00 and 7.10
 * 2) Pages 147 and 280 of the &quot;Microsoft Basic 7.O: Language Reference&quot; manual for 7.00 and 7.10

By specifying the recordnumber variable as &quot;recordnumber&&quot; instead of &quot;recordnumber%&quot;, it is inferred that the record number variable may either be of type INTEGER or LONG INTEGER.

Using recordnumber% would suggest that the largest possible record number to be 32,767. Since the largest possible record number is 2,147,483,647, the record number should be described as recordnumber&.

Additional query words: BasicCom SR# S900319-92

Keywords: KB62771

-

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

© Microsoft Corporation. All rights reserved.