EGL 文件中的注释是通过下列任何一种方式创建的:
可将注释放在可执行语句的内部或外部,如以下示例所示:
/* the assignment e = f occurs if a == b or if c == d */ if (a == b // one comparison || /* OR; another comparison */ c == d) e = f; end
/* this line starts a comment /* and this line ends the comment, */ but this line is not inside a comment at all */
前两行中的注释包括了另外一个注释定界符(/*)。仅当 EGL 尝试将第三行解释为源代码时才会出错。
下列情况有效:
a = b; /* this line starts a comment // and this line ends the comment */
最后一个示例中的双右向斜杠(//)本身是更大型的注释的一部分。
相关概念
EGL 项目、包和文件