mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-23 14:49:13 +02:00
* more bugs
This commit is contained in:
parent
51c5fb965e
commit
e37725d6fd
55
tests/webtbf/tw1842.pp
Normal file
55
tests/webtbf/tw1842.pp
Normal file
@ -0,0 +1,55 @@
|
||||
{ %fail }
|
||||
|
||||
type
|
||||
s8=shortint;
|
||||
s16=smallint;
|
||||
s32=longint;
|
||||
addrtype=pchar;
|
||||
InPacket=pchar;
|
||||
|
||||
PROCEDURE getlrc1 ( Buffer : AddrType ;
|
||||
StartPos : s32 ;
|
||||
MaxPos : s32 ;
|
||||
LastChar : s32 ;
|
||||
VAR LRCPos : s16 ;
|
||||
VAR LRCVal : s8); CDECL; [Public, alias: 'getlrc'];
|
||||
begin
|
||||
LRCPos:=200;
|
||||
LRCVal:=100;
|
||||
end;
|
||||
|
||||
|
||||
PROCEDURE CalcLRC ( APacket : InPacket ;
|
||||
PacketLen : s32;
|
||||
StartPos : s16 ;
|
||||
EndingChar: s16 ;
|
||||
VAR LRCPos : s16 ;
|
||||
VAR LRCVal : s8 );
|
||||
|
||||
|
||||
PROCEDURE getlrc ( Buffer : AddrType ;
|
||||
StartPos : s32 ;
|
||||
MaxPos : s32 ;
|
||||
LastChar : s32 ;
|
||||
VAR LRCPos : s16 ;
|
||||
VAR LRCVal : s8); CDECL; EXTERNAL;
|
||||
|
||||
BEGIN
|
||||
getlrc (APacket,
|
||||
StartPos - 1,
|
||||
PacketLen,
|
||||
EndingChar, {--ETX or SO--}
|
||||
LRCPos,
|
||||
LRCVal);
|
||||
LRCPos := LRCPos + 1;
|
||||
END; { CalcLRC }
|
||||
|
||||
|
||||
VAR
|
||||
LRCPos : s16 ;
|
||||
LRCVal : s8;
|
||||
|
||||
begin
|
||||
calclrc('12345',5,2,ord('5'),LRCPos,LRCVal);
|
||||
writeln(LRCPos,' ',LRCVal);
|
||||
end.
|
24
tests/webtbf/tw1939.pp
Normal file
24
tests/webtbf/tw1939.pp
Normal file
@ -0,0 +1,24 @@
|
||||
{ %fail }
|
||||
|
||||
Type
|
||||
GLEnum = longint;
|
||||
tShader=Record
|
||||
TexturesUsed:Longint;
|
||||
Primitive:GLenum;
|
||||
Blended:Boolean;
|
||||
BlendSrc:GLenum;
|
||||
BlendDst:GLenum;
|
||||
ShaderName:String;
|
||||
End;
|
||||
|
||||
Const EmptyShader:tShader=(
|
||||
TexturesUsed:-1;
|
||||
Primitive:0;
|
||||
Blended:False;
|
||||
BlendSrc:0;
|
||||
BlendDst:0;
|
||||
Tag:'');
|
||||
|
||||
begin
|
||||
end.
|
||||
|
19
tests/webtbs/tw1938.pp
Normal file
19
tests/webtbs/tw1938.pp
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
var A: array [0..1] of Integer;
|
||||
|
||||
function F: Integer; inline;
|
||||
begin
|
||||
F := A[1];
|
||||
end;
|
||||
|
||||
begin
|
||||
A[0] := 1234;
|
||||
A[1] := 5678;
|
||||
WriteLn(F); { writes 1234 }
|
||||
if F<>5678 then
|
||||
begin
|
||||
Writeln('ERROR!');
|
||||
Halt(1);
|
||||
end;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user