If [red light]
Then “stop at a marked limit line” (A,B);
If [an indication to proceed is shown]
Then
Go(A);
Exception
If [pedestrians lawfully within an adjacent crosswalk]
Then
Yield (B);
End If;
End If;
If [green light]
Then
If [pedestrians lawfully within an adjacent crosswalk]
Then
Yield(B);
Else
Go (A);
End if;
End If;
在我看來,A和B不是平行的關係,所以沒有dead loop,B作為A的一個exception, 它依舊可以獨立存在,就是第二個if
如果程序走到exception而你不走,就用B罰。
因為我無法用你的例子編程,但條款寫成程序,是這樣的
所有跟帖:
•
最後一把
-原野青蛙-
♀
(1187 bytes)
()
03/09/2015 postreply
15:33:15
•
你就是錯在這裏,B不是else, A的else是go,B是else 的exception
-慧惠-
♀
(44 bytes)
()
03/09/2015 postreply
15:39:46
•
青蛙就是沒有理解英文的意思才造成他寫成那樣的程序,還理直氣壯,
-水中撈月-
♂
(27 bytes)
()
03/09/2015 postreply
16:05:15
•
但第一個條件,程序走不通,所以我估計,正確理解應該是這樣吧
-慧惠-
♀
(268 bytes)
()
03/09/2015 postreply
16:07:49
•
把俺上麵的解釋看一遍,再編。
-水中撈月-
♂
(54 bytes)
()
03/09/2015 postreply
16:18:51
•
你上麵哪個解釋最好?copy/paste過來好吧?
-慧惠-
♀
(0 bytes)
()
03/09/2015 postreply
16:27:44
•
提示一下:
-水中撈月-
♂
(116 bytes)
()
03/09/2015 postreply
16:39:14
•
這個解釋:
-水中撈月-
♂
(206 bytes)
()
03/09/2015 postreply
16:42:56
•
非程序員改寫一把,請指教:
-水中撈月-
♂
(858 bytes)
()
03/09/2015 postreply
16:52:44
•
你那個提示是對的,這樣一個條件下麵,就隻會有一個指令了
-慧惠-
♀
(693 bytes)
()
03/09/2015 postreply
17:24:45
•
算了,超出俺的理解範圍了,謝謝你的合作。既然已打包,就別再勞神了。
-水中撈月-
♂
(0 bytes)
()
03/09/2015 postreply
17:33:12
•
嗯,打包的東西,我也懶得進。不過我明白了,否則堵那兒非把我憋死不可。
-慧惠-
♀
(0 bytes)
()
03/09/2015 postreply
17:37:05