home *** CD-ROM | disk | FTP | other *** search
- Program CreateData;
- { This program will create the data file used in the example }
- { program in listing 8.13. It simply creates a binary file }
- { of type word, and then places the values 1 to 100 into }
- { that new data file. }
-
- Var
- F : File of Word; { Output File Type - Word }
- W : Word; { Variable type for the output file }
-
- Begin
- Assign( F, 'DATA.DAT' );{ Associate the file name with F }
- Rewrite( F ); { Open the file for Output Only }
- For W := 1 to 100 Do { Loop 100 times for file output }
- Write( F, W ); { Write the info to the file }
- Close( F ); { Update the file properly }
- End.