========================================================================
procedure tambahdata;
begin
assign(file_mhs,'Mhs.txt');
reset(file_mhs);
if IOresult <> 0 then rewrite(file_mhs);
seek(file_mhs,filesize(file_mhs));
lagi := 'Y';
while upcase(lagi)='Y' do
begin
clrscr;
with filemhs do
begin
gotoxy(5,5);write('-----------------------------------------------------');
gotoxy(5,6);write('|nama mahasiswa : |');
gotoxy(5,7);write('|npm mahasiswa : |');
gotoxy(5,8);write('|kelas mahasiswa : |');
gotoxy(5,9);write('-----------------------------------------------------');
gotoxy(27,6);readln(kelas);
gotoxy(27,7);readln(npm);
gotoxy(27,8);readln(nama);
end;
write(file_mhs, filemhs);
gotoxy(5,15);write('anda ingin memasukkan data lagi(Y/T)?');readln(lagi);
end;
close(file_mhs);
end;
Tidak ada komentar:
Posting Komentar