Vicc
amd 2005.07.07. 08:45
Közmondások programnyelven
Közmondások programnyelven
* Addig jar a korsó a kútra... */
while( state(Korso) != _BROKEN ) go( Korso, &Kut);
--------------------------------------------------------------------------------
/* Ki mint vet, úgy arat */
set_quality( Aratas, get_quality(Vetes) );
--------------------------------------------------------------------------------
/* Ajandék lónak... */
if( origin(Horse) == _SOUVENIR ) Allow_Look_At.Teeth=0;
--------------------------------------------------------------------------------
/* Soha ne a falu legszebb lányát vedd feleségül! */
if( bride_ID == most_beautiful( GetAllGirls(_THIS_VILLAGE))) exit(-1);
--------------------------------------------------------------------------------
{Ki korán kel, aranyat lel}
If TimeToInt(Wakeup.Time)<TimeToInt(StrToTime("06:00:00")) then AddToList(UserLoggedIn.FoundItems,Gold);
--------------------------------------------------------------------------------
{Nezd meg az anyjat, vedd el a lanyat}
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;
--------------------------------------------------------------------------------
{Aki máasnak vermet ás az a sírásó}
type TEmployed=class(THuman) Job : String[30]; procedure OnGraveDigging( Sender: Tobject); private { Private declarations } public { Public declarations } end; Procedure TEmployed.OnGraveDigging( Sender: Tobject); begin Sender.Job:="GraveDigger"; end;
--------------------------------------------------------------------------------
{Egyszer volt Budán kutyavásár}
Const Num_Of_Dog_Buying_In_Buda=1;
--------------------------------------------------------------------------------
/* Sok lúd disznót gyöz */
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) else if NumA*A.Strength<NumB*B.Strength then write(B.Caption) else write('Nobody'); writeln(' Won'); end; begin Lud.Caption:='Lúd'; Lud.Strength:=10; Diszno.Caption:='Disznó'; Diszno.Strength:=540; Attack(Lud, Diszno, 1, 1 ); Attack(Lud, Diszno, 20, 1 ); Attack(Lud, Doszno, 60, 1 ); end. F9 (Run)
Result:
Disznó Won. Disznó Won. Lúd Won.
|