mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 01:09:06 +02:00
+ bug0308 and bug0308a
This commit is contained in:
parent
bd9b974883
commit
291eb87a54
5
bugs/bug0308.pp
Normal file
5
bugs/bug0308.pp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
uses bug0308a;
|
||||||
|
|
||||||
|
begin
|
||||||
|
writeln(coursedb.name(60));
|
||||||
|
end.
|
26
bugs/bug0308a.pp
Normal file
26
bugs/bug0308a.pp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
unit bug0308a;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
type
|
||||||
|
tcourses = object
|
||||||
|
function index(cName: string): integer;
|
||||||
|
function name(cIndex: integer): string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var coursedb: tcourses;
|
||||||
|
l: longint;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
function tcourses.index(cName: string): integer;
|
||||||
|
begin
|
||||||
|
index := byte(cName[0]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function tcourses.name(cIndex: integer): string;
|
||||||
|
begin
|
||||||
|
name := char(byte(cIndex));
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
@ -397,3 +397,4 @@ bug0293.pp no error with variable name = type name
|
|||||||
bug0299.pp passing Array[0..1] of char by value to proc leads to problems
|
bug0299.pp passing Array[0..1] of char by value to proc leads to problems
|
||||||
bug0305.pp Finally is not handled correctly after inputting 0
|
bug0305.pp Finally is not handled correctly after inputting 0
|
||||||
bug0307.pp "with object_type" doesn't work correctly!
|
bug0307.pp "with object_type" doesn't work correctly!
|
||||||
|
bug0308a.pp problem with objects that don't have VMT nor variable fields
|
||||||
|
Loading…
Reference in New Issue
Block a user