Foo, Bar是什麼意思?

有些朋友問:foo , bar 是什麼意思,爲什麼C++書籍中經常見到這個詞。

我google了一下, 發現沒有很好的中文答案。這個問題,在維基百科上有很好的回答。在這裏翻譯給大家。

譯文:

術語foobar, foo, bar, bazqux經常在計算機編程或計算機相關的文檔中被用作佔位符的名字。當變量,函數,或命令本身不太重要的時候,foobar, foo, bar,bazqux就被用來充當這些實體的名字,這樣做的目的僅僅是闡述一個概念,說明一個想法。
這些術語本身相對於使用的場景來說沒有任何意義。
foobar經常被單獨使用;而當需要多個實體舉例的時候,foobar,和baz則經常被按順序使用

原文:

The terms foobar, foo, bar, baz and qux are sometimes used as placeholder names (also referred to as metasyntactic variables) in computer programming or computer-related documentation.[1] They have been used to name entities such as variables, functions, and commands whose purpose is unimportant and serve only to demonstrate a concept. The words themselves have no meaning in this usage. Foobar is sometimes used alone; foo, bar, and baz are sometimes used in that order, when multiple entities are needed.


參考資料:
Foo, Bar是什麼意思? - 中道學友
Foobar - Wiki

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章