|
|
发表于 2013-5-15 18:03:34
|
显示全部楼层
用FlowControl
" y# Z+ e- L5 W# O: Z( O" @: w U# B9 l* K3 I
大概是这样控制的:
: v: e: B0 l& R- ^; l- k6 X2 t7 c+ }# G: | P' k' ?. I
if SP1.empty then' E" b% Z! A! Z' X7 V( I/ I/ Z
r:=1;8 r6 W7 ]3 c @; I" G: {" [
elseif SP2.empty then
9 k7 m% i: ?1 [ L8 B r:=2;8 i1 n4 u) ~+ }9 M) ]$ \
elseif SP3.empty then
0 b1 V0 ^5 `5 L4 _ r:=3;
: f" y7 E7 ~) m0 ^2 r/ aelse" b$ i, }2 R: `2 z, ?! i
r:=default_output;
7 _2 B5 u8 ^% V" P) Y6 j3 i0 aend;4 o5 V6 X8 ], y0 N1 {
- {: v/ p8 G1 P1 k# a1 g' P6 greturn r; |
|