ソースを参照

Clarified example code in interface file

Taddeus Kroes 12 年 前
コミット
2c7c770755
1 ファイル変更9 行追加2 行削除
  1. 9 2
      phases/desug.mli

+ 9 - 2
phases/desug.mli

@@ -44,8 +44,8 @@ void foo() \{
     This is transformed into:
 
 {v void foo() \{
-    int[] a;
-    int[] b;
+    int[3] a;
+    int[2, 2] b;
     a = __allocate(3);
     for (int i = 0, 3) \{
         a[i] = 4;
@@ -57,6 +57,13 @@ void foo() \{
     b[1, 1] = 4;
 \} v}
 
+    Actually, the dimensions of [a] and [b] should have been replaced by new
+    variables earlier for reasons described below, but this is not done in the
+    example to maintain readability.
+
+    Note that array constants in bracket expressions must have a nesting level
+    that is equal to the number of array dimensions, or an error will occur.
+
     {2 Prevent incorrect double evaluation}
 
     In the following code: