有时我在源代码文件中发现注释中有类似的引号,请注意`:
`help'
``help"例如,这些注释来自GNU源代码文件cat.c:
/* Plain cat. Copies the file behind `input_desc' to STDOUT_FILENO. */ /* Select which version of `cat' to use. If any options (more than -u,
--version, or --help) were specified, use `cat', otherwise use
`simple_cat'. *//* Suppress `used before initialized' warning. */在其他部分,则使用"“:
/* Determines how many consecutive newlines there have been in the
input. 0 newlines makes NEWLINES -1, 1 newline makes NEWLINES 1,
etc. Initially 0 to indicate that we are at the beginning of a
new line. The "state" of the procedure is determined by
NEWLINES. */什么意思?它是用来做什么的?
发布于 2012-02-08 23:42:06
这是使用LaTeX的人的结果(习惯)--这并不意味着什么。
例如,在LaTeX中,``hello there''会导致"hello there"。
但是,如果您看到as part of a shell script, the command within the backticks ()被执行。例如,
$ echo `whoami`
awesome-linux-accountname发布于 2012-02-09 01:09:22
在过去,为‘和’显示的符号产生了对称的“智能引号”,而不是我们今天看到的Unicode纠正的不平衡混乱。
从那时起,代码和习惯使用它们作为单个智能引号,并将它们作为双智能引号的模拟:
``help''但这是不再推荐的GNU代码,可以说是起源于它。
在库恩的论著中还有进一步的阅读和背景。
发布于 2012-02-08 22:51:22
一般来说,评论中的引号没有标准意义。一些标准的含义可以在组织内部定义,或者为特定的项目定义,但我从未见过这样的定义。
在你的例子中,引号有时被用来表示括起来的单词是某物的名称,比如变量('input_desc')或程序('cat')。可能有为GNU源代码定义的约定,但从示例中还不清楚是否存在。
在最后一个例子中,我不清楚为什么引用"state“。
https://softwareengineering.stackexchange.com/questions/134064
复制相似问题