DEADSOFTWARE

Добавлены многомерные массивы и статическая проверка индексов
[dsw-obn.git] / test / Test.c
index 22b0e5bd3ff0cbc2179f75cfe1da48159b9fb4b6..8f1b741fb78b8d84351a99400a889a365b784ff5 100644 (file)
@@ -9,17 +9,21 @@
 #include "Out.h"
 
 typedef
-       INT16 (*Test_MyArr[3])[6];
+       INT16 Test_Vector[3];
+
+typedef
+       Test_Vector *Test_PVector;
 
 
-static Test_MyArr Test_a;
+static Test_PVector Test_a;
+static Test_Vector Test_b;
 
 
 
 
 static void EnumPtrs(void (*P)(void*))
 {
-       __ENUMP(Test_a, 3, P);
+       P(Test_a);
 }
 
 
@@ -30,10 +34,8 @@ export int main(int argc, char **argv)
        __REGMAIN("Test", EnumPtrs);
 /* BEGIN */
        Out_Open();
-       Test_a[0] = __NEWARR(NIL, 2, 2, 1, 0, ((INT64)(6)));
-       (*Test_a[0])[0] = 1;
-       Out_Int((*Test_a[0])[0], 0);
-       Out_Ln();
+       Test_a = __NEWARR(NIL, 2, 2, 1, 0, ((INT64)(3)));
+       __MOVE(Test_b, *Test_a, 6);
        Out_Flush();
        __FINI;
 }