home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
280.MAKE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-05-13
|
2KB
|
67 lines
Program Make_SailPlane_Air_Foil_File;
(* DO NOT RUN THIS PROGRAM UNLESS YOU KNOW ABOUT TURBO PASCAL IN DETAIL ! *)
(* Below sets up random access file on disk containing : Reynolds number, *)
(* Foil name times 4 ( E205, E2051, E2052, E2054, etc. ) and Coef of Drag *)
Const
Foil_Records = 45; (* Number of Records *)
Type
Foil_ID = String [30];
Air_Foil_Record = Record
Name : Foil_ID; (* like E205 or NACA 2214, etc. *)
R_Number1 : Real; (* Reynolds assoc. with Record *)
R_Number2 : Real; (* Reynolds assoc. with Record *)
R_Number3 : Real; (* Reynolds assoc. with Record *)
R_Number4 : Real; (* Reynolds assoc. with Record *)
Drag_Array1 : Array [1..64] of Real;
Drag_Array2 : Array [1..64] of Real;
Drag_Array3 : Array [1..64] of Real;
Drag_Array4 : Array [1..64] of Real;
(* Coef of Lift as edited and calc. *)
Rec_Number : Integer;
End; (* of Record on Disk *)
(* Variables For Diminsions, Weights, Coefficents, Ratios Etc. *)
Var
Foil_File : File of Air_Foil_Record;
Foil_Record : Air_Foil_Record;
I, J : Integer; (* Counters for Program Control *)
(* End of Declaration of Variables *)
Begin
(* DO NOT RUN THIS PROGRAM UNLESS YOU KNOW ABOUT TURBO PASCAL IN DETAIL *)
End. (* Remove this line if you know what you are doing *)
Assign ( Foil_File, 'MAKE.DAT');
ReWrite ( Foil_File ); (* Opens File *)
With Foil_Record Do Begin
For I := 1 to Foil_Records Do Begin
Name := 'Undefined';
R_Number1 := 0.0;
R_Number2 := 0.0;
R_Number3 := 0.0;
R_Number4 := 0.0;
For J := 1 to 64 Do Begin
Drag_Array1 [J] := 0.0;
Drag_Array2 [J] := 0.0;
Drag_Array3 [J] := 0.0;
Drag_Array4 [J] := 0.0;
End;
Rec_Number := I;
Write ( Foil_File, Foil_Record );
End; (* of For I 1 to F_Rs *)
End; (* of With Foil File Do *)
Close ( Foil_File );
End.
(*****************************************************