Where is the Bug in this Code Snippet?

//Procedure geekOrNerd receives values daysPlayingWOW and fashionSense and returns 0 = neither, 1 = geek, 2 = nerd.

select;

when daysPlayingWOW = *zeros;

return *zero;

when daysPlayingWOW > 100;

return 2;

when fashionSense > 1000;

return *zero;

when daysPlayingWOW > fashionSense/12;

if numberOfNonAthleticShoes > 20;

return 1;

else;

return 2;

endif;

other;

return 1;

endsl;

Advertisements

4 responses

  1. You can be a geek no matter how many shoes you have

  2. True. One just receives a special exemption based on the number of shoes – but it is not the only condition.

    Perhaps I ought to publish the logic underlying how the calling program calculates the value of fashionSense.

  3. It should come as no surprise to discover that niche-marketing does target shoes for geeks http://www.zazzle.com/geek+shoes

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: