+ new bugs

This commit is contained in:
pierre 2000-01-10 00:40:27 +00:00
parent b270e9c21d
commit 0c99cac9ce
4 changed files with 78 additions and 0 deletions

9
tests/webtbs/tbug769.pp Normal file
View File

@ -0,0 +1,9 @@
Program test;
var x,y:integer;
begin
y:=5;
for x:=0 to 10 do if x<y then writeln(x);
end.

28
tests/webtbs/tbug772.pp Normal file
View File

@ -0,0 +1,28 @@
type tFoo = object
a:integer;
constructor Create;
procedure ReadA;
procedure ShowA;
end;
constructor tFoo.Create;
begin
a:=0;
end;
procedure tFoo.ReadA;
begin
write('a: '); Readln(a);
end;
procedure tFoo.ShowA;
begin
writeln('A=',a);
end;
var Foo:tFoo;
begin
Foo.Create;
Foo.ReadA; {this leaves Foo.a untouched, but it should'nt}
Foo.ShowA;
end.

16
tests/webtbs/tbug776.pp Normal file
View File

@ -0,0 +1,16 @@
{$mode objfpc}
uses sysutils;
var i:integer;
j : record
x,y : longint;
end;
begin
i:=0;
format('%d', [i]);
with j do
begin
x:=2;
y:=4;
Writeln('j.x=',x,' j.y=',y);
end;
end.

25
tests/webtbs/tbug784.pp Normal file
View File

@ -0,0 +1,25 @@
program BigRange;
const
Limit = 100000000; { Hundred millions }
One = 1;
var
Huge: longint;
begin
Huge := Limit + One;
writeln(One, ' is the lower bound');
writeln(Limit, ' is the upper bound');
if Limit in [One .. Limit] then
writeln(Limit, ' is within the range')
else
writeln(Limit, ' is out of the range');
if Huge in [One .. Limit] then
writeln(Huge, ' is within the range')
else
writeln(Huge, ' is out of the range')
end.