剛剛在讀 MSDN,被一句參數說明嚇到,本以為是 MSDN 白爛,後來仔細一想,才發覺其實是斷句的問題。

在 MSDN 裡,CreateNamedPipe() 這個函式的第三個參數 dwPipeMode 的說明裡,有這麼一句話:

The functions fails if dwPipeMode specifies anything other than 0 or the flags listed in the following table.

我第一眼讀完的理解是:

The functions fails if dwPipeMode specifies ( anything other than 0 ) or ( the flags listed in the following table ) .

於是大驚小怪的叫:有沒有搞錯,寫 0 或者「沒有列在」下面表格的那些 flag,才不會失敗?!

兩分鐘後,仔細重讀才發現,原來是我斷句錯誤。這句應該是這麼被理解的:

The functions fails if dwPipeMode specifies anything other than ( 0 ) or ( the flags listed in the following table ) .

兩種斷句,應該都可以,只不過第一種很搞笑,第二種才合理。

習慣上,我在撰寫英文句子時,會儘量讓 "or" 兩邊的子句,長度差不多,感覺比較對稱。也許就是因為這種習慣,讓我把句子讀錯了吧。