注释

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
EGL 不支持嵌入式注释,因此下列条目会导致错误:
   /* 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 */   

最后一个示例中的双右向斜杠(//)本身是更大型的注释的一部分。

在符号 #sql{ 与 } 之间,前面描述的 EGL 注释无效。下列描述是适用的:

相关概念
EGL 项目、包和文件

相关参考
EGL 源格式
EGL 语句

使用条款 | 反馈
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.