
If caring for a newborn were a Pascal program
October 26, 2006
program Cycle;
var
age_in_hours : longint;
diaper_is_nasty : boolean;
(* Code for subroutines has been omitted. *)
begin
age_in_hours := 0;
repeat
CheckDiaper (diaper_is_nasty);
if diaper_is_nasty then
ChangeDiaper;
FeedBaby;
LetBabySleep;
age_in_hours := age_in_hours + 3
until age_in_hours > 720;
writeln ('Congratulations, you've made it
through the first month.');
end.
Burp;…(between FeedBaby and LetBabySleep)…
Come on. There's only about 720 hours in a month.
singLullaby;wherefavoriteLullaby := "Waltzing Mathida";andfavoriteLullaby–>meterSet := "6/8";…oops wrong OO & cultural language syntax…