“foo”, “bar”, “foobar” 的意思

來源:互聯網
上載者:User

在許多RFC文檔或者代碼例子中包含"foo", "bar", "foobar", 今天突然想知道這些詞彙的來源以及含義, 在網上搜了一下, 大概明白了一些

 

 

http://zh.wikipedia.org/zh/Foobar

 

 在電腦程式設計與電腦技術的相關文檔中,術語foobar是一個常見的無名氏化名,常被作為“偽變數”使用。

 

從技術上講,“foobar”很可能在1960年代至1970年代初通過迪吉多的系統手冊傳播開來。另一種說法是,“foobar”可能來源於電子學中反轉的foo訊號();這是因為如果一個數字訊號是低電平有效(即負壓或零電壓代表“1”),那麼在訊號標記上方一般會標有一根水平橫線,而橫線的英文即為“bar”。在《新駭客辭典》中,還提到“foo”可能早於“FUBAR”出現。[1]

 

http://www.catb.org/jargon/html/F/foobar.html

 

foobar: n.

[very common] Another widely used metasyntactic variable; see foo for etymology. Probably originally propagated through DECsystem manuals by Digital Equipment Corporation (DEC) in 1960s and early 1970s; confirmed sightings there go back to 1972. Hackers do not generally use this to mean FUBAR in either the slang or jargon sense. See also Fred Foobar. In RFC1639, “FOOBAR” was made an abbreviation for “FTP Operation Over Big Address Records”, but this was an obvious backronym. It has been plausibly suggested that “foobar” spread among early computer engineers partly because of FUBAR and partly because “foo bar” parses in electronics techspeak as an inverted foo signal; if a digital signal is active low (so a negative or zero-voltage condition represents a "1") then a horizontal bar is commonly placed over the signal label.

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.