这是怎么bracketless / braceless code可能是有效的? [英] How is this bracketless/braceless code possibly valid?

查看:114
本文介绍了这是怎么bracketless / braceless code可能是有效的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我穿过这片code来到

So I came across this piece of code:

%:include <stdio.h>

int main(int argc, char *argv<::>) <%
    printf("C program succesfully running...");
    getchar();

    return 0;
%>

这是一些编译器的bug,或者这是新的东西,因为它没有任何问题运行我还没有发现呢。

Is this some compiler bug or is this something new I have not discovered yet because it is running without any problems.

推荐答案

这code采用C有向图,如下解释:<一href=\"http://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C\">http://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C

This code uses C digraphs, as explained here: http://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C

C标准(ISO / IEC 9899:201X,标点符号§6.4.6:3)具有本就此事说:

The C standard (ISO/IEC 9899:201x, Punctuators §6.4.6:3) has this to say on the matter:

在语言的各个方面,六代币

In all aspects of the language, the six tokens

<: :> <% %> %: %:%:


  
  

的行为,分别相同的六个标记

behave, respectively, the same as the six tokens

[ ] { } # ##


  
  

除了他们的拼写。

except for their spelling.

这篇关于这是怎么bracketless / braceless code可能是有效的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆