I have simple file copy example: var infile,outfile: file; buff: array[1..512] of byte; copied: integer; begin assign(infile, 'input'); reset(infile, SizeOf(byte)); assign(outfile, 'output'); rewrite(outfile, SizeOf(byte)); repeat blockread(infile, buff, 512, copied); blockwrite(outfile, buff, copied); until copied < 512; close(infile); close(outfile); end. It works fine. But if before repeat loop I placed: blockread(infile, buff, 1); blockwrite(outfile, buff, 1); it copy only 16384 (2^14) bytes of input. Always. If input file is smaller than 2^14 bytes then it copied all bytes. If larger then it cutted down to 2^14 bytes. I have this behaviour with GPC only. No problems with FPC, VP... What is wrong? Thanks in advance, Peter __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html
participants (2)
-
Frank Heckenbach -
Peter Norton