Page 123 - MODUL PDKP'21
P. 123
Modul 4 – Interface, File dan Kursor 2021
B:=B-1 else
B:=baris;
if key=#80 then
if B<baris then
B:=B+1 else
B:=1;
gotoxy(kiri,atas+B);write('>');
gotoxy(29,29);
key:=readkey;
until key=#13;
end;
procedure kursor1(kiri,atas,baris:integer;var n:integer);
begin
n:=1;
key1:=#0;
repeat
gotoxy(kiri,atas+n);write(' ');
if key1=#72 then
if n>1 then
n:=n-1 else
n:=baris;
if key=#80 then
if n<baris then
n:=n+1 else
n:=1;
gotoxy(kiri,atas+n);write('>');
gotoxy(29,29);
key1:=readkey;
until key1=#13;
end;
procedure daftarmenu;
begin
clrscr;
repeat
gotoxy(20,5);writeln('Hari/Tanggal:',datetimetostr(now));
gotoxy(20,6);writeln(UTF8ToCP866('╔═══════════════════════╗'));
gotoxy(20,7);writeln(UTF8ToCP866('╠═══════════════════════╣'));
gotoxy(20,8);writeln(UTF8ToCP866('║ Silahkan Pilih Menu ║'));
gotoxy(20,9);writeln(UTF8ToCP866('╠═══════════════════════╣'));
gotoxy(20,10);writeln(UTF8ToCP866('║1. Daftar Makanan ║'));
gotoxy(20,11);writeln(UTF8ToCP866('║2. Form Pembelian ║'));
gotoxy(20,12);writeln(UTF8ToCP866('║3. Nota Pembelian ║'));
gotoxy(20,13);writeln(UTF8ToCP866('║4. Keluar ║'));
gotoxy(20,14);writeln(UTF8ToCP866('╚══════════════════════╝'));
kursor(18,9,4,n);
if n=1 then Daftarmakanan;
Praktikum Dasar Komputer dan Pemrograman 2021 IV-112