h1

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.

3 comments

  1. Burp;…(between FeedBaby and LetBabySleep)…


  2. Come on. There's only about 720 hours in a month.


  3. singLullaby;wherefavoriteLullaby := "Waltzing Mathida";andfavoriteLullaby–>meterSet := "6/8";…oops wrong OO & cultural language syntax…



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: