Menu

[r9]: / trunk / src / Global.pas  Maximize  Restore  History

Download this file

67 lines (55 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
unit Global;
interface
{$I FlashPascal.inc}
type
TSymbol=class
name :string; // upper case name
realName :string; // the real name as in type or var definition
NextSymbol:TSymbol; // linked list of symbols
{$IFDEF MEMCHECK}
constructor Create;
destructor Destroy; override;
{$ENDIF}
end;
PScope=^TScope;
TScope=record
Symbol:TSymbol;
Next :PScope;
end;
function StrLess(const Str,Value:string):boolean;
{$IFDEF MEMCHECK}
var
sCount : Integer;
eCount : Integer;
{$ENDIF}
implementation
// compare two litteral integers
function StrLess(const Str,Value:string):boolean;
var
i,l:integer;
begin
l:=Length(Str);
if l=Length(Value) then begin
for i:=1 to l do begin
if Str[i]>Value[i] then begin
Result:=False;
exit;
end;
end;
Result:=True;
end else begin
Result:=l<Length(Value);
end;
end;
{$IFDEF MEMCHECK}
constructor TSymbol.Create;
begin
inc(sCount);
end;
destructor TSymbol.Destroy;
begin
// WriteLn(realName,'->',ClassName);
dec(sCount);
end;
{$ENDIF}
end.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.