Friday, August 19, 2005

A Clockwork Oh-range

/*
* The following C++ function simulates
* the life of Oh. It goes into an
* infinite loop. The only way to stop it
* is to kill the process,
* perhaps by changing a job
* and doing something different.
*/


#define NEWDAY 0
#define 4AM 4
#define MORNING 7
#define LUNCHTIME 12
#define KNOCKOFF 18
#define MIDNIGHT 24

void AClockworkOhrange()
{
int time = MORNING;
bool ever = true ;

for (;ever;)
{
WakeUp();
Struggle();
BrushTeeth();
Struggle();
Eat();
goto work;

work:
Commute();
Struggle();
while (time < KNOCKOFF)
{
if (time == LUNCHTIME)
Eat();
else
{
Work();
Struggle();
}

time++;
}

GoHome();
Eat();
Bathe();
while (time < MIDNIGHT)
{
SelfAmuse();
time++;
}

time = NEWDAY;
goto sleep;

sleep:
BrushTeeth();
while (time < MORNING)
{
HaveNightmare();
if (time == 4AM)
Pee();

time++;
}

continue;
}
}

2 Comments:

Blogger chiakhong said...

You really need to get out of what you are doing now.

A change, (change, change), will do you good.

Saturday, August 20, 2005 2:45:00 AM  
Blogger chiakhong said...

This comment has been removed by a blog administrator.

Saturday, August 20, 2005 2:45:00 AM  

Post a Comment

<< Home