有向圖
Version >= C99
1994 年提供了五個三字母的更多可讀替代品。它們只使用兩個字元,稱為有向圖。與三字母不同,有向圖是標記。如果有向圖出現在另一個標記中(例如字串文字或字元常量),那麼它將不會被視為有向圖,而是保持原樣。
以下顯示了處理有向圖序列之前和之後的差異。
#include <stdio.h>
int main()
<%
printf("Hello %> World!\n"); /* Note that the string contains a digraph */
%>
哪個將被視為:
#include <stdio.h>
int main()
{
printf("Hello %> World!\n"); /* Note the unchanged digraph within the string. */
}
| 有向圖 | 當量 |
|---|---|
| <: | [ |
| :> | ] |
| <% | { |
| %> | } |
| %: | # |