最後一把

來源: 2015-03-09 15:33:15 [博客] [舊帖] [給我悄悄話] 本文已被閱讀:

唯一的問題,用程序來寫,是這個法存在著這個循環漏洞:

A: If (Solid Red & Not Turning)
         1, Stop
         2, Hold in position until indicated to move
    Else If (Solid Red & Turning)
            B:這裏有個無限循環,因為B裏要求先滿足A條件,但是A的至少一種解釋是排除了B,所以才有上麵這個 Else If.
           下麵是進了這個Else If 邏輯後,永遠走不到的:
            If (Safe)
                Go
            Else
                Hold until indicated to move
            End If
     Else
            Green,Yellow, Flashing Red,Flashing Yellow,OR No Light 
     End if