contoh program pascal

Program database ini adalah contoh-contoh penggunaan fungsi dan prosedur. Perhatikan contoh berikut:

1: Program BuatFile;

2: var fText : text; data: string;

3: begin

4: writeln(‘MENGISI DATA’);

5: writeln(‘————’);

6: assign(fText, ‘nama.txt’);

7: rewrite(fText); {gunakan reset(fText) bila file sudah ada}

8: writeln(fText, ‘dijas’);

9: writeln(fText, ‘dian’);

10: writeln(fText, ‘cecep’);

11: close(fText);

12: readln;

13: end.

This entry was posted on Minggu, 07 November 2010. You can follow any responses to this entry through the RSS 2.0. You can leave a response.

Leave a Reply