-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmadTypes.pas
137 lines (114 loc) · 4.19 KB
/
madTypes.pas
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// ***************************************************************
// madTypes.pas version: 1.4c · date: 2000-07-25
// -------------------------------------------------------------
// general purpose types
// -------------------------------------------------------------
// Copyright (C) 1999 - 2000 www.madshi.net, All Rights Reserved
// ***************************************************************
// 2000-07-25 1.4c MadException/TMethod added (to get rid of SysUtils)
unit madTypes;
{$I mad.inc}
interface
// ***************************************************************
const
maxCard = high(cardinal);
type
TExtBool = (no, yes, other);
// TSxxx = set of xxx
TSByte = set of byte;
TSChar = set of char;
TSBoolean = set of boolean;
TSExtBool = set of TExtBool;
// TPSxxx = ^(set of xxx)
TPSByte = ^TSByte;
TPSChar = ^TSChar;
TPSBoolean = ^TSBoolean;
TPSExtBool = ^TSExtBool;
// TPxxx = ^xxx
TPByte = ^byte;
TPShortInt = ^shortInt;
TPChar = ^char;
TPBoolean = ^boolean;
TPExtBool = ^TExtBool;
TPWord = ^word;
TPSmallInt = ^smallInt;
TPCardinal = ^cardinal;
TPInteger = ^integer;
TPPointer = ^pointer;
TPString = ^string;
TPIUnknown = ^IUnknown;
TPInt64 = ^int64;
// TAxxx = array [0..maxPossible] of xxx
TAByte = array [0..maxInt -1] of byte;
TAShortInt = array [0..maxInt -1] of shortInt;
TAChar = array [0..maxInt -1] of char;
TABoolean = array [0..maxInt -1] of boolean;
TAExtBool = array [0..maxInt -1] of TExtBool;
TAWord = array [0..maxInt shr 1-1] of word;
TASmallInt = array [0..maxInt shr 1-1] of smallInt;
TACardinal = array [0..maxInt shr 2-1] of cardinal;
TAInteger = array [0..maxInt shr 2-1] of integer;
TAPointer = array [0..maxInt shr 2-1] of pointer;
TAString = array [0..maxInt shr 2-1] of string;
TAIUnknown = array [0..maxInt shr 2-1] of IUnknown;
TAInt64 = array [0..maxInt shr 3-1] of int64;
// TPAxxx = ^(array [0..maxPossible] of xxx)
TPAByte = ^TAByte;
TPAShortInt = ^TAShortInt;
TPAChar = ^TAChar;
TPABoolean = ^TABoolean;
TPAExtBool = ^TAExtBool;
TPAWord = ^TAWord;
TPASmallInt = ^TASmallInt;
TPACardinal = ^TACardinal;
TPAInteger = ^TAInteger;
TPAPointer = ^TAPointer;
TPAString = ^TAString;
TPAIUnknown = ^TAIUnknown;
TPAInt64 = ^TAInt64;
// TDAxxx = array of xxx
TDAByte = array of byte;
TDAShortInt = array of shortInt;
TDAChar = array of char;
TDABoolean = array of boolean;
TDAExtBool = array of TExtBool;
TDAWord = array of word;
TDASmallInt = array of smallInt;
TDACardinal = array of cardinal;
TDAInteger = array of integer;
TDAPointer = array of pointer;
TDAString = array of string;
TDAIUnknown = array of IUnknown;
TDAInt64 = array of int64;
// TPDAxxx = ^(array of xxx)
TPDAByte = ^TDAByte;
TPDAShortInt = ^TDAShortInt;
TPDAChar = ^TDAChar;
TPDABoolean = ^TDABoolean;
TPDAExtBool = ^TDAExtBool;
TPDAWord = ^TDAWord;
TPDASmallInt = ^TDASmallInt;
TPDACardinal = ^TDACardinal;
TPDAInteger = ^TDAInteger;
TPDAPointer = ^TDAPointer;
TPDAString = ^TDAString;
TPDAIUnknown = ^TDAIUnknown;
TPDAInt64 = ^TDAInt64;
// ***************************************************************
MadException = class(TObject)
private
FMessage : string;
public
constructor Create (const msg: string);
property Message : string read FMessage write FMessage;
end;
TMethod = record code, data: pointer; end;
// ***************************************************************
implementation
// ***************************************************************
constructor MadException.Create(const msg: string);
begin
FMessage := msg;
end;
// ***************************************************************
end.