Browse Source

+ several bug files added

florian 26 years ago
parent
commit
823e429c3a
7 changed files with 46 additions and 1 deletions
  1. 2 0
      bugs/1.pas
  2. 5 0
      bugs/bug0185.pp
  3. 11 0
      bugs/bug0222.pp
  4. 10 0
      bugs/bug0223.pp
  5. 12 0
      bugs/bug0224.pp
  6. 1 0
      bugs/bug0224.txt
  7. 5 1
      bugs/readme.txt

+ 2 - 0
bugs/1.pas

@@ -0,0 +1,2 @@
+begin
+end.

+ 5 - 0
bugs/bug0185.pp

@@ -6,6 +6,7 @@ var s: String;
     i: integer;
     i: integer;
     code: word;
     code: word;
     e: 0..10;
     e: 0..10;
+    enum : (a,b,c,d);
 
 
 Begin
 Begin
 {$R-}
 {$R-}
@@ -27,4 +28,8 @@ Begin
   s := '65535';
   s := '65535';
   val(s, i, code); {must give a range check error}
   val(s, i, code); {must give a range check error}
   Writeln('Val range check failed!');
   Writeln('Val range check failed!');
+
+  { val must also handle enums }
+  s:='2';
+  val(s, enum, code); 
 End.
 End.

+ 11 - 0
bugs/bug0222.pp

@@ -0,0 +1,11 @@
+
+type TStruct = record 
+ 		 x,y: Integer;
+               end; 
+
+var i: TStruct;    
+
+begin
+  for i.x:=1 to 10 do
+    writeln(i.x);
+end.

+ 10 - 0
bugs/bug0223.pp

@@ -0,0 +1,10 @@
+
+var a:string;
+
+begin
+  writeln('B:'='B:');            { debbuger evaluates this to FALSE }
+
+  a:='A:';
+  inc(a[1]);
+  writeln(a='B:');               { TRUE }
+end.

+ 12 - 0
bugs/bug0224.pp

@@ -0,0 +1,12 @@
+
+var f:text;
+    i:integer;
+begin
+  assign(f,'bug0224.txt');
+  reset(f);
+{$I-}
+  readln(f,i);              { you can't avoid run-time error generation }
+{$I+}
+  if IOResult<>0 then writeln('error...')
+                 else close(f);
+end.

+ 1 - 0
bugs/bug0224.txt

@@ -0,0 +1 @@
+     

+ 5 - 1
bugs/readme.txt

@@ -299,4 +299,8 @@ bug0218.pp   rounding errors with write/str (the bug is fixed, but there
              value PFV)
              value PFV)
 bug0220.pp   can't choose overload with array of char
 bug0220.pp   can't choose overload with array of char
 bug0221.pp   syntax parsing incompatibilities with tp7
 bug0221.pp   syntax parsing incompatibilities with tp7
-
+1.pp         produces a linker error under win32, sorry for the filename
+             but the filename is the bug :)
+bug0222.pp   an record field can't be the counter index (compiles with TP)
+bug0223.pp   wrong boolean evaluation in writeln
+bug0224.pp   I/O-Error generation in readln can't be switched off