home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
BEEHIVE
/
GAMES
/
STARSHIP.ARC
/
STARMAKE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-09-27
|
2KB
|
71 lines
Program MakeStarFile;
{as is, this program writes the file STAR.DAT for STARSHIP. It can be
modified to produce alternate star data files, but it is suggested that
these also be given new names.}
(* NOT IN COMPILABLE FORM---ADD DECLARATIONS FROM MAIN PROGRAM *)
type
startrade= record
starname: string[15];
r,p,i,ni,a,na: boolean;
end;
var
starfile: file of startrade;
galaxy: array[0..10] of startrade;
filename: string[14];
index: byte;
begin {make orig file}
filename:='star.dat';
assign(starfile,filename);
rewrite(starfile);
for index:=1 to 10 do
begin
with galaxy[index] do
begin
number:=index;
r:=false;
p:=false;
i:=false;
ni:=false;
a:=false;
na:=false;
end;{with}
end;{fordo}
galaxy[1].ni:=true;
galaxy[1].p:=true;
galaxy[2].na:=true;
galaxy[2].i:=true;
galaxy[3].a:=true;
galaxy[4].i:=true;
galaxy[4].p:=true;
galaxy[5].r:=true;
galaxy[6].ni:=true;
galaxy[6].na:=true;
galaxy[7].a:=true;
galaxy[7].p:=true;
galaxy[8].na:=true;
galaxy[9].a:=true;
galaxy[9].ni:=true;
galaxy[9].p:=true;
galaxy[10].a:=true;
galaxy[10].i:=true;
galaxy[1].starname:='Lalande 21185 ';
galaxy[2].starname:='Alpha Centauri ';
galaxy[3].starname:='Sirius ';
galaxy[4].starname:='Barnards Star ';
galaxy[5].starname:='Sol ';
galaxy[6].starname:='Ross 154 ';
galaxy[7].starname:='Epsilon Eridani';
galaxy[8].starname:='Luyten 726-8 ';
galaxy[9].starname:='Luyten 789-6 ';
galaxy[10].starname:='Ross 248 ';
for index:=1 to 10 do write(starfile,galaxy[index]);
close(starfile);
end.