This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Sabtu, 02 Mei 2015

Program FIle Pada Pascal

Contoh Program File Pada Pascal

Program FileTeman;

Uses Crt;
Var
JenisFile    : Text;
Nama         : String;
ALamat       : String;
Telp         : String;
Tanya        : Char;
Pilihan      : shortint;

Begin
Repeat
ClrScr;
Writeln;
writeln(' ____________________________________');
writeln('|        Pilih Salah Satu Menu       |');
writeln('|____________________________________|');
writeln('| 1. Membuat File Data Baru          |');
writeln('| 2. Memasukkan Data Baru            |');
writeln('| 3. Menampilkan Data                |');
writeln('| 4. Keluar                          |');
writeln('|____________________________________|');
writeln('| Masukkan Pilihan :                 |');
writeln('|____________________________________|');
gotoxy(22,10);Readln(Pilihan);
Case  Pilihan Of
1 : Begin
Assign(JenisFile,'Alamat.dat');
ReWrite(JenisFile);
Close(JenisFile);
writeln;
writeln('| File Data Berhasil Dibuat!         |');
writeln('|____________________________________|');
readkey;
End;

2 : Begin
Assign(JenisFile,'Alamat.dat');
Append(JenisFile);
Repeat
ClrScr;
Write(' Nama         : ');Readln(Nama);
Write(' ALamat       : ');Readln(Alamat);
Write(' Telepon      : ');Readln(Telp);
Writeln(JenisFile,Nama);
Writeln(JenisFile,Alamat);
Writeln(JenisFile,Telp);
Writeln;
Write('Apakah mau memasukan data lain (Y/T): ');
Tanya := ReadKey;
Until UpCase(Tanya) = 'T';
Close(JenisFile);
Writeln('Data telah dimasukan !');
End;

3 : Begin
Assign(JenisFile,'Alamat.dat');
Reset(JenisFile);
Repeat
Readln(JenisFile,Nama);
Readln(JenisFile,Alamat);
Readln(JenisFile,Telp);
ClrScr;
Writeln(' Nama         : ',Nama);
Writeln(' ALamat       : ',ALamat);
Writeln(' Telepon      : ',Telp);
Writeln;

If Nama = '' Then
Tanya := 'T'
Else
Begin
Write('Apakah melihat data berikut (Y/T) : ');
Tanya := ReadKey;
End;
Until UpCase(Tanya) = 'T';
Close(JenisFile);
End;

Else
End;
Until Pilihan=4;

End.



sealkazzsoftware.blogspot.com resepkuekeringku.com