duanguilin2007 2016-01-22 08:25
浏览 182
已采纳

“ foo”和“ bar”是什么意思,为什么人们喜欢用它们作为示例? [重复]

This question already has an answer here:

In many program test case or example case, i always see "bar" and "foo", what is the two word represent for and why choose this two words as example?

</div>
  • 写回答

1条回答 默认 最新

  • duan02468 2016-01-22 08:30
    关注

    Google can answer your question far better than I. From wiki:

    The word foo originated as a nonsense word from the 1930s, the military term FUBAR emerged in the 1940s, and the use of foo in a programming context is generally credited to the Tech Model Railroad Club (TMRC) of MIT from circa 1960.[9] However, the precise relationship of these terms is not known with certainty, and several anecdotal theories have been advanced to identify them.

    Also, have a look at this question: What is the origin of foo and bar? as well as this one: https://softwareengineering.stackexchange.com/questions/69788/what-is-the-history-of-the-use-of-foo-and-bar-in-source-code-examples

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line