-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathusetopenrange1.pas
More file actions
42 lines (32 loc) · 819 Bytes
/
Copy pathusetopenrange1.pas
File metadata and controls
42 lines (32 loc) · 819 Bytes
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
unit usetopenrange1;
{$mode delphi}
interface
type
TByteSet = set of Byte;
TBasedIndex = 100..200;
TBasedSet = set of TBasedIndex;
procedure ReplaceByteRange(var S: TByteSet; A, B: Byte); noinline;
procedure ReplaceByteRangeChecked(var S: TByteSet; A, B: Byte); noinline;
procedure ExtendByteRange(var S: TByteSet; A, B: Byte); noinline;
procedure ReplaceBasedRange(var S: TBasedSet; A, B: TBasedIndex); noinline;
implementation
{$R-}
procedure ReplaceByteRange(var S: TByteSet; A, B: Byte);
begin
S := [A..B];
end;
{$R+}
procedure ReplaceByteRangeChecked(var S: TByteSet; A, B: Byte);
begin
S := [A..B];
end;
{$R-}
procedure ExtendByteRange(var S: TByteSet; A, B: Byte);
begin
S := S + [A..B];
end;
procedure ReplaceBasedRange(var S: TBasedSet; A, B: TBasedIndex);
begin
S := [A..B];
end;
end.