This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/goodies/bindata.for

24 lines
545 B
Plaintext
Raw Normal View History

* BINDATA.FOR - This program demonstrates how to read a
* binary data file that does not have any defined records.
program bindata
integer BinArray(20)
integer i
open( unit=1, file='bindata.fil',
+ access='sequential',
+ form='unformatted',
+ recordtype='fixed' )
* Read 20 integers from the binary data file
do i = 1, 20
read( 1 ) BinArray( i )
end do
* Write the extracted values to standard output
do i = 1, 20
write( *, * ) BinArray( i )
end do
end