c++ - C++ 源文件中的不可打印 (0xFF) 字节

标签 c++ editor

这个特定的 C++ 代码项目有 0xFF 字节标记,作为函数定义的前缀。

这样做的目的是什么?它是为了帮助一些简单的源文件解析器吗?

显然编译器忽略了这些标记。

Strange character appearing in C source file

最佳答案

那可能是Form Feed (ASCII 12) (on wiki-pedia) ,换句话说,一个空白字符。

The form feed character is sometimes used in plain text files of source code as a delimiter for a page break, or as marker for sections of code. Some editors, in particular emacs, have built-in commands to page up/down on the form feed character. This convention is predominantly used in Lisp code, and is also seen in Python source code.

当源代码通常打印在纸上以供审查/存档时,它在源代码中很常见。

打印会将纯文本文档中的 FF 解释为“分页符”

半相关:https://twitter.com/sehetw/status/297904888321544192

关于c++ - C++ 源文件中的不可打印 (0xFF) 字节,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14893141/

相关文章:

c++ - 合并内容相似但参数不同的函数

c++ - 我哪里错了?设置日期的数据缓冲区

vim - 如何设置 vim 打开文件请求将定向到先前终端中已打开的文件?

emacs - evil-mode 最佳实践?

eclipse - 如何在 Eclipse 导航器/资源管理器中显示所有文件?

javascript - 在 v8 JavaScript 中重复调用 C++ 是否会产生大量开销?

c++ - 如何检查 LLDB 是否从共享库加载了调试符号?

c++ - 控制 map 中元素的顺序

java - 在 JToggleButton 中保存选择

xml - 寻找免费的 xsd 方案编辑器