免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6431 | 回复: 6
打印 上一主题 下一主题

C语言 ^L什么意思? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-09-04 11:30 |只看该作者 |倒序浏览
本帖最后由 gouven 于 2010-09-04 12:12 编辑
  1. ^L
  2. /* Print version and copyright information.  */

  3. static void
  4. print_version (void)
  5. {
  6.   printf ("hello (GNU %s) %s\n", PACKAGE, VERSION);
  7.   /* xgettext: no-wrap */
  8.   puts ("");
  9.   
  10.   /* It is important to separate the year from the rest of the message,
  11.      as done here, to avoid having to retranslate the message when a new
  12.      year comes around.  */
  13.   printf (_("\
  14. Copyright (C) %s Free Software Foundation, Inc.\n\
  15. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
  16. This is free software: you are free to change and redistribute it.\n\
  17. There is NO WARRANTY, to the extent permitted by law.\n"),
  18.               "2007");
  19. }
复制代码
代码摘自GNU hello-2.3/src/hello.c,请看第一行。

论坛徽章:
0
2 [报告]
发表于 2010-09-04 12:20 |只看该作者
这是什么记号吗?在Google上完全没找到

论坛徽章:
0
3 [报告]
发表于 2010-09-04 12:22 |只看该作者
vim里光标还无法移到 L 上,难道是编辑器的什么记号?

论坛徽章:
0
4 [报告]
发表于 2010-09-04 12:33 |只看该作者
vim里光标还无法移到 L 上,难道是编辑器的什么记号?
gouven 发表于 2010-09-04 12:22



^L是换页符"\014",作用是打印时先换一页。

论坛徽章:
0
5 [报告]
发表于 2010-09-04 23:14 |只看该作者
楼上高手。这么偏门你都知道

论坛徽章:
0
6 [报告]
发表于 2010-09-05 00:27 |只看该作者
回复 5# zhangsuozhu


    确实,我在Google上都没找到。{:3_189:}

论坛徽章:
0
7 [报告]
发表于 2010-09-05 11:38 |只看该作者
楼上高手。这么偏门你都知道
zhangsuozhu 发表于 2010-09-04 23:14



    呵呵,这小意思。我一直开发银行程序,其中打印控制时需要换页,都写一个^L,所以很熟悉。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP