Browse Source

* synchronized with trunk

git-svn-id: branches/wasm@46758 -
nickysn 4 years ago
parent
commit
b79da7e5c3
42 changed files with 95 additions and 63 deletions
  1. 4 2
      packages/fcl-db/src/sqldb/interbase/ibconnection.pp
  2. 25 0
      packages/fcl-db/tests/testsqldb.pas
  3. 19 12
      packages/fcl-passrc/src/pasresolveeval.pas
  4. 1 1
      tests/test/cg/tcalcla1.pp
  5. 1 1
      tests/test/cg/tcalcst1.pp
  6. 1 1
      tests/test/cg/tcalcst2.pp
  7. 1 1
      tests/test/cg/tcalcst3.pp
  8. 1 1
      tests/test/cg/tcalcst4.pp
  9. 1 1
      tests/test/cg/tcalcst5.pp
  10. 1 1
      tests/test/cg/tcalcst6.pp
  11. 1 1
      tests/test/cg/tcalcst7.pp
  12. 1 1
      tests/test/cg/tcalcst8.pp
  13. 1 1
      tests/test/cg/tcalfun1.pp
  14. 1 1
      tests/test/cg/tcalfun2.pp
  15. 1 1
      tests/test/cg/tcalfun3.pp
  16. 1 1
      tests/test/cg/tcalfun4.pp
  17. 1 1
      tests/test/cg/tcalfun6.pp
  18. 1 1
      tests/test/cg/tcalfun7.pp
  19. 1 1
      tests/test/cg/tcalfun8.pp
  20. 1 1
      tests/test/cg/tcalobj1.pp
  21. 1 1
      tests/test/cg/tcalobj2.pp
  22. 1 1
      tests/test/cg/tcalobj3.pp
  23. 1 1
      tests/test/cg/tcalobj4.pp
  24. 1 1
      tests/test/cg/tcalobj6.pp
  25. 1 1
      tests/test/cg/tcalobj7.pp
  26. 1 1
      tests/test/cg/tcalval1.pp
  27. 1 1
      tests/test/cg/tcalval2.pp
  28. 1 1
      tests/test/cg/tcalval3.pp
  29. 1 1
      tests/test/cg/tcalval4.pp
  30. 1 1
      tests/test/cg/tcalval5.pp
  31. 1 1
      tests/test/cg/tcalval7.pp
  32. 1 1
      tests/test/cg/tcalval8.pp
  33. 1 1
      tests/test/cg/tcalvar1.pp
  34. 1 1
      tests/test/cg/tcalvar2.pp
  35. 1 1
      tests/test/cg/tcalvar3.pp
  36. 1 1
      tests/test/cg/tcalvar4.pp
  37. 1 1
      tests/test/cg/tcalvar5.pp
  38. 1 1
      tests/test/cg/tcalvar6.pp
  39. 1 1
      tests/test/cg/tcalvar7.pp
  40. 1 1
      tests/test/cg/tcalvar8.pp
  41. 5 9
      tests/test/cg/tsubst.pp
  42. 5 3
      tests/test/cg/tvec.pp

+ 4 - 2
packages/fcl-db/src/sqldb/interbase/ibconnection.pp

@@ -164,6 +164,7 @@ uses
 const
 const
   SQL_BOOLEAN_INTERBASE = 590;
   SQL_BOOLEAN_INTERBASE = 590;
   SQL_BOOLEAN_FIREBIRD = 32764;
   SQL_BOOLEAN_FIREBIRD = 32764;
+  SQL_NULL = 32767;
   INVALID_DATA = -1;
   INVALID_DATA = -1;
 
 
 procedure TIBConnection.CheckError(ProcName : string; Status : PISC_STATUS);
 procedure TIBConnection.CheckError(ProcName : string; Status : PISC_STATUS);
@@ -834,7 +835,7 @@ begin
         begin
         begin
         if ((SQLType and not 1) = SQL_VARYING) then
         if ((SQLType and not 1) = SQL_VARYING) then
           SQLData := AllocMem(in_SQLDA^.SQLVar[x].SQLLen+2)
           SQLData := AllocMem(in_SQLDA^.SQLVar[x].SQLLen+2)
-        else
+        else if SQLType <> SQL_NULL then
           SQLData := AllocMem(in_SQLDA^.SQLVar[x].SQLLen);
           SQLData := AllocMem(in_SQLDA^.SQLVar[x].SQLLen);
         // Always force the creation of slqind for parameters. It could be
         // Always force the creation of slqind for parameters. It could be
         // that a database trigger takes care of inserting null values, so
         // that a database trigger takes care of inserting null values, so
@@ -1211,7 +1212,8 @@ begin
         SQL_BOOLEAN_FIREBIRD:
         SQL_BOOLEAN_FIREBIRD:
           PByte(VSQLVar^.SQLData)^ := Byte(AParam.AsBoolean);
           PByte(VSQLVar^.SQLData)^ := Byte(AParam.AsBoolean);
       else
       else
-        DatabaseErrorFmt(SUnsupportedParameter,[FieldTypeNames[AParam.DataType]],self);
+        if (VSQLVar^.sqltype <> SQL_NULL) then
+          DatabaseErrorFmt(SUnsupportedParameter,[FieldTypeNames[AParam.DataType]],self);
       end {case}
       end {case}
       end;
       end;
     end;
     end;

+ 25 - 0
packages/fcl-db/tests/testsqldb.pas

@@ -62,6 +62,7 @@ type
     procedure TestMacros;
     procedure TestMacros;
     Procedure TestPrepareCount;
     Procedure TestPrepareCount;
     Procedure TestPrepareCount2;
     Procedure TestPrepareCount2;
+    Procedure TestNullTypeParam;
   end;
   end;
 
 
   { TTestTSQLConnection }
   { TTestTSQLConnection }
@@ -839,6 +840,30 @@ begin
   end;
   end;
 end;
 end;
 
 
+procedure TTestTSQLQuery.TestNullTypeParam;
+begin
+  if not (SQLServerType in [ssSQLite, ssFirebird]) then
+    Ignore(STestNotApplicable);
+  CreateAndFillIDField;
+  try
+    With SQLDBConnector.Query do
+      begin
+      UsePrimaryKeyAsKey:=False; // Disable server index defs etc
+      SQL.Text:='Select ID from FPDEV2 where (:ID IS NULL or ID = :ID)';
+      Open;
+      AssertEquals('Correct record count param NULL',10,RecordCount);
+      Close;
+      ParamByname('ID').AsInteger:=1;
+      Open;
+      AssertEquals('Correct record count param 1',1,RecordCount);
+      AssertEquals('Correct field value: ',1,Fields[0].AsInteger);
+      Close;
+      end;
+  finally
+    SQLDBConnector.Connection.OnLog:=Nil;
+  end;
+end;
+
 
 
 { TTestTSQLConnection }
 { TTestTSQLConnection }
 
 

+ 19 - 12
packages/fcl-passrc/src/pasresolveeval.pas

@@ -1027,20 +1027,27 @@ var
 begin
 begin
   if o=nil then
   if o=nil then
     Result:='nil'
     Result:='nil'
-  else if o is TPasElement then
+  else if o is TPasArrayType then
     begin
     begin
-    Result:=TPasElement(o).Name;
-    if o is TPasGenericType then
-      begin
-      GenType:=TPasGenericType(o);
-      if (GenType.GenericTemplateTypes<>nil)
-          and (GenType.GenericTemplateTypes.Count>0) then
-        Result:=Result+GetGenericParamCommas(GenType.GenericTemplateTypes.Count);
-      end;
-    Result:=Result+':'+o.ClassName;
+      if TPasArrayType(o).ElType = nil then
+          Result:='array of const'
+      else
+        Result:=Format('TArray<%s>', [TPasArrayType(o).ElType.Name]);
     end
     end
-  else
-    Result:=o.ClassName;
+    else if o is TPasElement then
+      begin
+      Result:=TPasElement(o).Name;
+      if o is TPasGenericType then
+        begin
+        GenType:=TPasGenericType(o);
+        if (GenType.GenericTemplateTypes<>nil)
+            and (GenType.GenericTemplateTypes.Count>0) then
+          Result:=Result+GetGenericParamCommas(GenType.GenericTemplateTypes.Count);
+        end;
+      Result:=Result+':'+o.ClassName;
+      end
+    else
+      Result:=o.ClassName;
 end;
 end;
 
 
 function GetObjPath(o: TObject): string;
 function GetObjPath(o: TObject): string;

+ 1 - 1
tests/test/cg/tcalcla1.pp

@@ -24,7 +24,7 @@ program tcalcla1;
 {$mode objfpc}
 {$mode objfpc}
 {$R+}
 {$R+}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  const
  const
  { should be defined depending on CPU target }
  { should be defined depending on CPU target }

+ 1 - 1
tests/test/cg/tcalcst1.pp

@@ -28,7 +28,7 @@ program tcalcst1;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalcst2.pp

@@ -28,7 +28,7 @@ program tcalcst2;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalcst3.pp

@@ -28,7 +28,7 @@ program tcalcst3;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalcst4.pp

@@ -28,7 +28,7 @@ program tcalcst4;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalcst5.pp

@@ -29,7 +29,7 @@ program tcalcst5;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalcst6.pp

@@ -34,7 +34,7 @@ program tcalcst6;
   {$define safecall_is_cdecl}
   {$define safecall_is_cdecl}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalcst7.pp

@@ -28,7 +28,7 @@ program tcalcst7;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalcst8.pp

@@ -28,7 +28,7 @@ program tcalcst8;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalfun1.pp

@@ -31,7 +31,7 @@
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
   { REAL should map to single or double }
   { REAL should map to single or double }
   { so it is not checked, since single  }
   { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalfun2.pp

@@ -31,7 +31,7 @@
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
   { REAL should map to single or double }
   { REAL should map to single or double }
   { so it is not checked, since single  }
   { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalfun3.pp

@@ -31,7 +31,7 @@
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
   { REAL should map to single or double }
   { REAL should map to single or double }
   { so it is not checked, since single  }
   { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalfun4.pp

@@ -33,7 +33,7 @@
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
   { REAL should map to single or double }
   { REAL should map to single or double }
   { so it is not checked, since single  }
   { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalfun6.pp

@@ -31,7 +31,7 @@
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
   { REAL should map to single or double }
   { REAL should map to single or double }
   { so it is not checked, since single  }
   { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalfun7.pp

@@ -31,7 +31,7 @@
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
   { REAL should map to single or double }
   { REAL should map to single or double }
   { so it is not checked, since single  }
   { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalfun8.pp

@@ -31,7 +31,7 @@
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
 
 
   { REAL should map to single or double }
   { REAL should map to single or double }

+ 1 - 1
tests/test/cg/tcalobj1.pp

@@ -20,7 +20,7 @@
 program tcalobj1;
 program tcalobj1;
 {$R+}
 {$R+}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  const
  const
  { should be defined depending on CPU target }
  { should be defined depending on CPU target }

+ 1 - 1
tests/test/cg/tcalobj2.pp

@@ -20,7 +20,7 @@
 program tcalobj2;
 program tcalobj2;
 {$R+}
 {$R+}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  const
  const
  { should be defined depending on CPU target }
  { should be defined depending on CPU target }

+ 1 - 1
tests/test/cg/tcalobj3.pp

@@ -20,7 +20,7 @@
 program tcalobj3;
 program tcalobj3;
 {$R+}
 {$R+}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  const
  const
  { should be defined depending on CPU target }
  { should be defined depending on CPU target }

+ 1 - 1
tests/test/cg/tcalobj4.pp

@@ -22,7 +22,7 @@
 program tcalobj4;
 program tcalobj4;
 {$R+}
 {$R+}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  const
  const
  { should be defined depending on CPU target }
  { should be defined depending on CPU target }

+ 1 - 1
tests/test/cg/tcalobj6.pp

@@ -20,7 +20,7 @@
 program tcalobj6;
 program tcalobj6;
 {$R+}
 {$R+}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  const
  const
  { should be defined depending on CPU target }
  { should be defined depending on CPU target }

+ 1 - 1
tests/test/cg/tcalobj7.pp

@@ -20,7 +20,7 @@
 program tcalobj7;
 program tcalobj7;
 {$R+}
 {$R+}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  const
  const
  { should be defined depending on CPU target }
  { should be defined depending on CPU target }

+ 1 - 1
tests/test/cg/tcalval1.pp

@@ -30,7 +30,7 @@ program tcalval1;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalval2.pp

@@ -28,7 +28,7 @@ program tcalval2;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalval3.pp

@@ -30,7 +30,7 @@ program tcalval3;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalval4.pp

@@ -30,7 +30,7 @@ program tcalval4;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalval5.pp

@@ -32,7 +32,7 @@ program tcalval5;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalval7.pp

@@ -30,7 +30,7 @@ program tcalval7;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalval8.pp

@@ -30,7 +30,7 @@ program tcalval8;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalvar1.pp

@@ -28,7 +28,7 @@ program tcalvar1;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalvar2.pp

@@ -28,7 +28,7 @@ program tcalvar2;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalvar3.pp

@@ -28,7 +28,7 @@ program tcalvar3;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalvar4.pp

@@ -30,7 +30,7 @@ program tcalvar4;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalvar5.pp

@@ -32,7 +32,7 @@ program tcalvar5;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalvar6.pp

@@ -36,7 +36,7 @@ program tcalvar6;
   {$define safecall_is_cdecl}
   {$define safecall_is_cdecl}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalvar7.pp

@@ -30,7 +30,7 @@ program tcalvar7;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 1 - 1
tests/test/cg/tcalvar8.pp

@@ -30,7 +30,7 @@ program tcalvar8;
   {$define tp}
   {$define tp}
 {$endif}
 {$endif}
 
 
-{$i tcaldefs.inc}
+{$i cpudefs.inc}
 
 
  { REAL should map to single or double }
  { REAL should map to single or double }
  { so it is not checked, since single  }
  { so it is not checked, since single  }

+ 5 - 9
tests/test/cg/tsubst.pp

@@ -25,17 +25,13 @@ const
  { Should be equal to the maximum offset possible in indirect addressing
  { Should be equal to the maximum offset possible in indirect addressing
    mode with displacement. (CPU SPECIFIC) }
    mode with displacement. (CPU SPECIFIC) }
 
 
-{$ifdef cpu68k}
-  {$define use_small}
-{$endif}
-{$ifdef cpui8086}
-  {$define use_small}
-{$endif}
-{$ifdef use_small}
+{$i cpudefs.inc }
+
+{$ifdef cpusmall}
  MAX_DISP = 32767;
  MAX_DISP = 32767;
-{$else}
+{$else cpusmall}
  MAX_DISP = 65535;
  MAX_DISP = 65535;
-{$endif}
+{$endif cpusmall}
 
 
 { These different alignments are described in the PowerPC ABI
 { These different alignments are described in the PowerPC ABI
   supplement, they should represent most possible cases.
   supplement, they should represent most possible cases.

+ 5 - 3
tests/test/cg/tvec.pp

@@ -39,19 +39,21 @@ const
  min_small_array = 0;
  min_small_array = 0;
  max_small_array = 255;
  max_small_array = 255;
 
 
-{$IFDEF CPU16}
+{$i cpudefs.inc}
+
+{$ifdef cpusmall}
  min_big_neg_array = -770;
  min_big_neg_array = -770;
  max_big_neg_array = 770;
  max_big_neg_array = 770;
 
 
  min_big_array = 0;
  min_big_array = 0;
  max_big_array = 770;
  max_big_array = 770;
-{$ELSE CPU16}
+{$else cpusmall}
  min_big_neg_array = -77000;
  min_big_neg_array = -77000;
  max_big_neg_array = 77000;
  max_big_neg_array = 77000;
 
 
  min_big_array = 0;
  min_big_array = 0;
  max_big_array = 77000;
  max_big_array = 77000;
-{$ENDIF CPU16}
+{$endif cpusmall}
 
 
  min_big_odd_array = 0;
  min_big_odd_array = 0;
  max_big_odd_array = 255;
  max_big_odd_array = 255;