case 心情 of
'孤单' :
begin
if 想找鸡 then
if 钱够了 then
找鸡
else
回家 ;
else
if 想找女朋友 then
if 钱不够找鸡但够陪女朋友吃餐饭 and 女朋友答应陪你 then
找鸡
else
回家
else
什么都别想睡觉去;
end ;
'老了怎么办' :
begin
if 有老婆 then
if 关系比较好 and 老婆也不反对生孩子 then
生孩子
else
等时机
else
找老婆先
end ;
'解闷' :
begin
if 有钱 then
if (买狗 and 办狗牌顺利) then
养只你喜欢的狗
else
递归调用 (买狗 and 办狗牌顺利)
else
什么都别想,回家用被子捂着头睡觉 ;
end ;