Közmondások

Egy barátomtól kaptam eme szösszeneteket.

Közmondások leprogramozva:

while (state(Korso) != _BROKEN)
go( Korso, &Kut);
/* Addig jar a korso a kutra... */

set_quality(Aratas, get_quality(Vetes));
/* Ki mint vet, ugy arat */

if(origin(Horse) == _SOUVENIR)
Allow_Look_At.Teeth=0;
/* Ajandek lonak... */

if (bride_ID ==
most_beautiful(GetAllGirls(_THIS_VILLAGE)))
exit(-1);
/* Soha ne a falu legszebb lanyat vedd
felesegul! */

If TimeToInt(Wakeup.Time) <
TimeToInt(StrToTime(''06:00:00'')) then
AddToList(UserLoggedIn.FoundItems,Gold);
{Ki koran kel, aranyat lel}

Function May_I_Marry_Her(Girl:TGirl):boolean;
begin
With Girl.Mother do
May_I_Marry_Her :=
((Body.Qality=''attractive'') and
(face.Quality=''beautiful''));
end;
{Nezd meg az anyjat, vedd el a lanyat}

type
TEmployed=class(THuman)

procedure OnGraveDigging(Sender:Tobject);
private
{ Private declarations }
public
{ Public declarations }
end;

Procedure
TEmployed.OnGraveDigging(Sender:Tobject);
begin
Sender.Job:=''GraveDigger'';
end;
{Aki masnak vermet as az a siraso}

Const
Num_Of_Dog_Buying_In_Buda=1;
{Egyszer volt budan kutyavasar}

uses animals;

var lud, diszno:TAnimal;

Procedure Attack(A, B: Tanimal;
NumA, NumB: Word);
begin
If NumA*A.Strength >
NumB*B.Strength then
write(A.Caption)
If NumA*A.Strength <
NumB*B.Strength then
write(B.Caption)
writeln(' Won');
end;

begin
Lud.Caption:='Lud';
Lud.Strength:=10;
Diszno.Caption:='Diszno';
Diszno.Strength:=540;
Attack(Lud, Diszno, 1, 1);
Attack(Lud, Diszno, 20, 1);
Attack(Lud, Doszno, 60, 1);
end.

F9 (Run)

Result:

Diszno Won.
Diszno Won.
Lud Won.

{Sok lud disznot gyoz}

Hozzászólások