Foo, Bar的含义
有些朋友问:foo, bar是什么意思, 为什么C++书籍中老见到这个词。我google了一下, 发现没有很好的中文答案。这个问题,在维基百科上有很好的回答。在这里翻译给大家。
译文:
术语foobar, foo, bar, baz 和qux经常在计算机编程或计算机相关的文档中被用作占位符的名字。当变量,函数,或命令本身不太重要的时候,foobar, foo, bar, baz 和qux就被用来充当这些实体的名字,这样做的目的仅仅是阐述一个概念,说明一个想法。这些术语本身相对于使用的场景来说没有任何意义。Foobar经常被单独使用;而当需要多个实体举例的时候,foo,bar,和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. 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.
// C code example
#include <stdio.h> int foobar(int *pi)
{
*pi = 1024;
return *pi;
} int main()
{
char foo[] = "Hello,";
char bar[] = "World!";
printf("%s %s\n", foo, bar); int baz = foobar();
printf("%d, baz");
return 0;
}
Foo, Bar的含义的更多相关文章
- 编程中Foo, Bar 到底什么意思?
1 前言 在很多国外计算机书本和一些第三份开源软件的Demo中经常用到两个英文单词Foo,Bar.这到底是什么意思呢?从步入屌丝界的IT生活见到这两个单词到现在我还是不知道这两个单词的真正含义,今天有 ...
- 有趣的冷知识:编程中Foo, Bar 到底什么意思?
转自:编程中Foo, Bar 到底什么意思? 1 前言 在很多国外计算机书本和一些第三份开源软件的Demo中经常用到两个英文单词Foo,Bar.这到底是什么意思呢?从步入屌丝界的IT生活见到这两个单词 ...
- foo,bar,baz
https://en.wikipedia.org/wiki/Foobar 原文: The terms foobar, foo, bar, baz and qux are sometimes used ...
- foo bar的意思
有些朋友问:foo, bar是什么意思, 为什么C++书籍中老见到这个词. 我google了一下, 发现没有很好的中文答案.这个问题,在维基百科上有很好的回答.在这里翻译给大家. 译文: 术语foob ...
- WARNING: The following packages cannot be authenticated! foo bar baz Install these packages without verification [y/N]?
apt-get install debian-archive-keyring apt-get update
- 怎么写makefile?(转)
跟我一起写 Makefile 陈皓 第一章.概述 什么是makefile?或许很多Winodws的程序员都不知道这个东西,因为那些Windows的IDE都为你做了这个工作,但我觉得要作一个好的和 pr ...
- 【转】Linux makefile 教程 非常详细,且易懂
From: http://blog.csdn.net/liang13664759/article/details/1771246 最近在学习Linux下的C编程,买了一本叫<Linux环境下的C ...
- javascript基础知识show
1.javascript的数据类型是什么 基本数据类型:String,boolean,Number,Undefined,Null 引用数据类型:Object(Array,Date,RegExp,Fun ...
- linux中Makefile文件相关内容
第一章.概述什么是makefile?或许很多Winodws的程序员都不知道这个东西,因为那些Windows的IDE都为你做了这个工作,但我觉得要作一个好的和professional(专业)的程序员,m ...
随机推荐
- POI XSSF与HSSF区别
java操作Excel时报如下错误: The supplied data appears to be in the Office 2007+ XML. You are calling the part ...
- 导包、时间模块【TIME、CALENDAR DATETIME】、SYS、OS, OS.PATH模块、项目开放周期&规范
导包 1.不考虑包的情况下直接from...直接导入文件夹下的具体模块 2. if __name__ == '__ma__' # 自执行 if __name__ == '模块名' # ...
- 神经网络的debug
先建一个只有一层隐藏层的网络确定一切工作正常 在一个数据点上训练,training accuracy应该马上到100%而val accuracy等于随机猜测(overfit),如果不是说明有bug. ...
- [Python3] 040 文件 一般使用
目录 文件 1. open 函数 2. with 语句 3. 先写再读 3.1 写 3.2 读 4. "位置"的查询与移动 4.1 tell() 4.2 seek(cookie, ...
- 微信多开脚本(Windows,Mac)
微信多开 以下内容仅用于学习使用.严禁用于非法用途,违者自负. Windows 多开 Windows 版本的微信在一些比较新的版本好像限制了多开,我们这里提供一个版本(也是官方的).https://p ...
- 【面试向】2019 年微软秋招笔试 Problem 3
Problem Check if a positive integer $n$ can be written as sum of a positive integer and reverse of t ...
- Luogu P3520 [POI2011]SMI-Garbage
题目 把要变边权的边拿出来找欧拉回路就行了.正确性显然,因为一条边经过两次相当于对欧拉回路度数的奇偶性没有影响. 然后把一个个小环输出即可,具体的我也不知道怎么输,题目没讲清楚,我按着题解的来的. # ...
- Python3学习笔记-更新中
1.Python概况 2.Anaconda安装及使用 3.Pycharm安装及使用 4.Hello World!!! 5.数据类型及类型转换 6.分支结构 7.循环语句 8.异常
- windows下使用zookeeper
windows下dos窗口操作:https://blog.csdn.net/a632189007/article/details/78085858
- O010、动手实践虚拟网络
参考https://www.cnblogs.com/CloudMan6/p/5296573.html 本节将演示如何在实验环境中实现下图所示的虚拟网络