Browse Source

- high() cannot be used in cdecle'd routines

carl 23 years ago
parent
commit
574d6ed81a
2 changed files with 8 additions and 47 deletions
  1. 4 18
      tests/test/cg/tcalcst4.pp
  2. 4 29
      tests/test/cg/tcalvar4.pp

+ 4 - 18
tests/test/cg/tcalcst4.pp

@@ -375,13 +375,6 @@ var
      value_u8bit := b2;
   end;
 
-  procedure proc_const_smallarray_open_mixed(b1: byte; const arr : array of byte; b2: byte);cdecl;
-  begin
-    { form 0 to N-1 indexes in open arrays }
-    if arr[high(arr)] = RESULT_U8BIT then
-      global_u8bit := RESULT_U8BIT;
-     value_u8bit := b2;
-  end;
 
 
 
@@ -676,16 +669,6 @@ begin
   if value_u8bit <> RESULT_U8BIT then
     failed := true;
 
-  clear_globals;
-  clear_values;
-
-  value_smallarray[SMALL_INDEX] := RESULT_U8BIT;
-  proc_const_smallarray_open_mixed(RESULT_U8BIT,value_smallarray,RESULT_U8BIT);
-  if global_u8bit <> RESULT_U8BIT then
-    failed := true;
-  if value_u8bit <> RESULT_U8BIT then
-    failed := true;
-
 
   if failed then
     fail
@@ -695,7 +678,10 @@ end.
 
 {
   $Log$
-  Revision 1.6  2002-11-09 21:47:36  carl
+  Revision 1.7  2002-11-20 19:39:21  carl
+  - high() cannot be used in cdecle'd routines
+
+  Revision 1.6  2002/11/09 21:47:36  carl
     + updated tests for correct parsing (array of const now allowed with high!)
 
   Revision 1.5  2002/09/22 14:16:12  carl

+ 4 - 29
tests/test/cg/tcalvar4.pp

@@ -286,11 +286,6 @@ var
     arr[1] := RESULT_U8BIT;
   end;
 
-  procedure proc_var_smallarray_open(var arr : array of byte);cdecl;
-  begin
-    arr[high(arr)] := RESULT_U8BIT;
-    arr[low(arr)] := RESULT_U8BIT;
-  end;
 
 
 
@@ -396,12 +391,6 @@ procedure proc_var_formaldef_string(var buf);cdecl;
     value_u8bit := RESULT_U8BIT;
   end;
 
-  procedure proc_var_smallarray_open_mixed(b1 : byte; var arr : array of byte; b2: byte);cdecl;
-  begin
-    arr[high(arr)] := RESULT_U8BIT;
-    arr[low(arr)] := RESULT_U8BIT;
-    value_u8bit := RESULT_U8BIT;
-  end;
 
 
   procedure proc_var_formaldef_array_mixed(b1 : byte; var buf; b2: byte);cdecl;
@@ -556,14 +545,6 @@ begin
 
 
 
-  clear_globals;
-  clear_values;
-
-  proc_var_smallarray_open(value_smallarray);
-  if (value_smallarray[SMALL_INDEX] <> RESULT_U8BIT) or (value_smallarray[1] <> RESULT_U8BIT) then
-    failed := true;
-
-
   if failed then
     fail
   else
@@ -718,15 +699,6 @@ begin
 
 
 
-  clear_globals;
-  clear_values;
-
-  proc_var_smallarray_open_mixed(RESULT_U8BIT, value_smallarray, RESULT_U8BIT);
-  if (value_smallarray[SMALL_INDEX] <> RESULT_U8BIT) or (value_smallarray[1] <> RESULT_U8BIT) then
-    failed := true;
-  if value_u8bit <> RESULT_U8BIT then
-    failed := true;
-
   if failed then
     fail
   else
@@ -737,7 +709,10 @@ end.
 
 {
   $Log$
-  Revision 1.5  2002-11-09 21:47:37  carl
+  Revision 1.6  2002-11-20 19:39:21  carl
+  - high() cannot be used in cdecle'd routines
+
+  Revision 1.5  2002/11/09 21:47:37  carl
     + updated tests for correct parsing (array of const now allowed with high!)
 
   Revision 1.4  2002/09/22 09:08:41  carl