mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-14 07:06:04 +02:00
27 lines
389 B
ObjectPascal
27 lines
389 B
ObjectPascal
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.
|