Penggunaan
Function Pada Bahasa Pemrograman Pascal Untuk Pencatatan Daya Listrik (KWH
Dengan Komputer)
Program Lampu Sollar Cell
Function_lampu sollar cell
Interface
Usescrt :
Type
ST100 = String100 [100]
Var
Baris, Colom, Byte :
Tekan : Car :
Procedur 2ot Power (A,B, word);
Function Posisi (x,y :byte) : integer
:
Function Posisi (x, y : byte) :
integer :
Procedure HID (x, y, war : byte : kar
: char) :
Procedure HIDUP (x, y : byte ;
menyimpan arus : ST100)
Funcition lampu menyala (x1, y1, x2,
y2, : byte ;)
Hidup : string : byte ;
Implementation
Procedure SetPower (A(B : word);
Begin
OnLamp (B);
End