You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
634 B
Plaintext

6 years ago
{ Julius Riegel, 20.12.18 }
program programm1;
uses
utils in './lib/utils.pas';
const
6 years ago
fname = './persons/Name';
6 years ago
6 years ago
procedure gen_entry(fnum: integer);
6 years ago
var
temp_person: person;
6 years ago
curr_fname: string;
6 years ago
begin
curr_fname := fname + int_to_str(fnum) + '.prs';
Write(' Name: ');
ReadLn(temp_person.pname);
Write(' Surname: ');
ReadLn(temp_person.psurname);
temp_person.number := Random(101);
WriteLn(' Number is: ', temp_person.number);
WriteLn;
write_file(curr_fname, temp_person);
end;
var
6 years ago
i: integer;
6 years ago
begin
Randomize;
WriteLn;
for i := 1 to 4 do
gen_entry(i);
WriteLn('[+] All names saved.');
end.