* {{Parameter|fileNumber&}} is the file or port number used in the [[OPEN]] AS [[BINARY]] or [[RANDOM]] statement.
* The [[INTEGER]] or [[LONG]] byte {{Parameter|position}} in a [[BINARY]] file or the record {{Parameter|position}} in a [[RANDOM]] file '''must be greater than zero'''.
* The {{Parameter|position}} can be omitted if the GET operations are consecutive based on the {{Parameter|targetVariable}} [[TYPE]] byte size.
* The {{Parameter|targetVariable}} [[Data types|type]] or [[FIELD]] ''variable'' size determines the byte size and the next {{Parameter|position}} in the file.
* The first byte position in a file is 1. <!-- giving the previous information is enough: This may require adding one to an offset value when documentation uses that position as 0. -->
* GET does not require a byte or record {{Parameter|position}} or {{Parameter|targetVariable}} (or comma) when using a [[FIELD]] statement.
* '''QB64''' can [[PUT]] the entire contents of an array to a file and later GET those contents to a {{Parameter|targetArray()}} (include brackets).
* '''GET may ignore the end of a file and return bad data. If the [[EOF]] function returns -1 after a GET operation, it indicates that the data has ended.'''
{{TextStart}} DO UNTIL {{Cb|EOF}}(1)
{{Cb|GET}} #1, , value%
IF {{Cb|NOT}}({{Cb|EOF}}(1)) THEN {{Cb|PUT}} #2, , value%
LOOP
{{TextEnd}}
{{PageExamples}}
''Example 1:'' Opening a RANDOM file using LEN to calculate and LEN = to designate the file record size.
{{CodeStart}}
{{Cl|TYPE}} variabletype
x {{Cl|AS}} {{Cl|INTEGER}}' '2 bytes
y {{Cl|AS}} {{Cl|STRING}} * 10' '10 bytes
z {{Cl|AS}} {{Cl|LONG}}' '4 bytes
{{Cl|END}} {{Cl|TYPE}}' '16 bytes total
{{Cl|DIM}} record {{Cl|AS}} variabletype
{{Cl|DIM}} newrec {{Cl|AS}} variabletype
file$ = "testrand.inf" '<<<< filename may overwrite existing file
number% = 1 '<<<<<<<<<< record number to write cannot be zero