mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 20:31:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			343 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			343 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| Program Example52;
 | |
| 
 | |
| { Program to demonstrate the Rewrite function. }
 | |
| 
 | |
| Var F : File;
 | |
|     I : longint;
 | |
| 
 | |
| begin
 | |
|   Assign (F,'Test.dat');
 | |
|   { Create the file. Recordsize is 4 } 
 | |
|   Rewrite (F,Sizeof(I));
 | |
|   For I:=1 to 10 do
 | |
|     BlockWrite (F,I,1);
 | |
|   close (f);
 | |
|   { F contains now a binary representation of
 | |
|     10 longints going from 1 to 10 }
 | |
| end.
 | 
