-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCompileFunctUnit.dfm
230 lines (216 loc) · 12.5 KB
/
CompileFunctUnit.dfm
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
object FormCompileFunct: TFormCompileFunct
Left = 327
Top = 213
Width = 769
Height = 464
Caption = #1050#1086#1084#1087#1080#1083#1080#1088#1086#1074#1072#1090#1100' '#1089#1074#1086#1102' '#1092#1091#1085#1082#1094#1080#1102
Color = clBtnFace
Constraints.MinHeight = 464
Constraints.MinWidth = 769
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
OldCreateOrder = False
ShowHint = True
DesignSize = (
753
425)
PixelsPerInch = 96
TextHeight = 13
object LabelInfo1: TLabel
Left = 8
Top = 8
Width = 114
Height = 13
Caption = #1054#1073#1097#1072#1103' '#1080#1085#1092#1086#1088#1084#1072#1094#1080#1103':'
end
object MemoInfo: TMemo
Left = 8
Top = 24
Width = 737
Height = 137
Anchors = [akLeft, akTop, akRight]
BevelInner = bvNone
Color = clBtnFace
Enabled = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
Lines.Strings = (
#1047#1076#1077#1089#1100' '#1074#1099' '#1084#1086#1078#1077#1090#1077' '#1082#1086#1084#1087#1080#1083#1080#1088#1086#1074#1072#1090#1100' '#1089#1086#1073#1089#1090#1074#1077#1085#1085#1091#1102' '#1092#1091#1085#1082#1094#1080#1102' '#1089' '#1087#1086#1084#1086#1097#1100#1102' '#1089#1088#1077#1076 +
#1089#1090#1074' '#1089#1088#1077#1076#1099' '#1087#1088#1086#1075#1088#1072#1084#1084#1080#1088#1086#1074#1072#1085#1080#1103' Delphi '
#1103#1079#1099#1082#1072' Pascal. '#1045#1089#1083#1080' '#1074#1099' '#1079#1085#1072#1082#1086#1084#1099' '#1089' '#1089#1080#1085#1090#1072#1082#1089#1080#1089#1086#1084' Pascal, '#1090#1086' '#1090#1088#1091#1076#1085#1086#1089#1090#1077 +
#1081' '#1085#1077' '#1076#1086#1083#1078#1085#1086' '#1074#1086#1079#1085#1080#1082#1085#1091#1090#1100'. '#1045#1089#1083#1080' '#1078#1077' '#1074#1099' '#1085#1077' '
#1079#1085#1072#1082#1086#1084#1099' '#1089' '#1101#1090#1080#1084' '#1103#1079#1099#1082#1086#1084' '#1087#1088#1086#1075#1088#1072#1084#1084#1080#1088#1086#1074#1072#1085#1080#1103', '#1090#1086' '#1074' '#1090#1077#1082#1089#1090#1077' '#1085#1080#1078#1077' '#1087#1088#1080#1074#1077#1076#1077 +
#1085#1072' '#1089#1087#1088#1072#1074#1082#1072'. '#1050' '#1089#1086#1078#1072#1083#1077#1085#1080#1102', '#1074#1099' '#1083#1080#1096#1077#1085#1099' '
#1074#1086#1079#1084#1086#1078#1085#1086#1089#1090#1080' '#1087#1088#1086#1074#1077#1088#1082#1080' '#1089#1080#1085#1090#1072#1082#1089#1080#1089#1072', '#1082#1072#1082' '#1101#1090#1086' '#1088#1077#1072#1083#1080#1079#1086#1074#1072#1085#1085#1086' '#1074' Delphi. ' +
#1053#1086' '#1074#1099' '#1084#1086#1078#1077#1090#1077' '#1080#1089#1087#1086#1083#1100#1079#1086#1074#1072#1090#1100' '#1083#1102#1073#1091#1102' '#1085#1072' '
#1074#1072#1096' '#1074#1082#1091#1089' '#1089#1088#1077#1076#1091' '#1087#1088#1086#1075#1088#1072#1084#1084#1080#1088#1086#1074#1072#1085#1080#1103' '#1076#1083#1103' '#1089#1086#1079#1076#1072#1085#1080#1103' dll - '#1073#1080#1073#1083#1080#1086#1090#1077#1082#1080'. '#1057 +
#1083#1077#1076#1091#1102#1097#1080#1081' '#1090#1077#1082#1089#1090' '#1074#1099' '#1084#1086#1078#1077#1090#1077' '
#1088#1077#1076#1072#1082#1090#1080#1088#1086#1074#1072#1090#1100' '#1085#1072' '#1074#1072#1096#1077' '#1091#1089#1084#1086#1090#1088#1077#1085#1080#1077', '#1085#1086' '#1089#1086#1073#1083#1102#1076#1072#1103' '#1089#1080#1085#1090#1072#1082#1089#1080#1089' '#1080' '#1087#1088#1072#1074#1080#1083 +
#1072' '#1103#1079#1099#1082#1072' Pascal - Delphi.'
'Dll - '#1073#1080#1073#1083#1080#1086#1090#1077#1082#1072' '#1076#1086#1083#1078#1085#1072' '#1089#1086#1076#1077#1088#1078#1072#1090#1100' '#1074#1089#1077#1075#1086' '#1083#1080#1096#1100' '#1086#1076#1085#1091' '#1069#1050#1057#1055#1054#1056#1058#1048#1056#1059#1045#1052#1059#1070 +
' '#1092#1091#1085#1082#1094#1080#1102' '#1082#1086#1085#1089#1090#1088#1091#1082#1094#1080#1080' ('#1085#1072' Pascal) '
'- function funct (x:Extended):Extended; Extended - '#1095#1080#1089#1083#1086' '#1089' '#1087#1083#1072#1074#1086 +
#1102#1097#1077#1081' '#1090#1086#1095#1082#1086#1081'. (Result.log - '#1083#1086#1075')')
ParentFont = False
ReadOnly = True
TabOrder = 0
end
object MemoTextCode: TMemo
Left = 8
Top = 160
Width = 737
Height = 225
Anchors = [akLeft, akTop, akRight, akBottom]
BevelInner = bvNone
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
Lines.Strings = (
'library CustomFunction;'
''
'uses SysUtils, Classes, Math;'
''
'{'
#1053#1077' '#1073#1086#1083#1100#1096#1072#1103' '#1089#1087#1088#1072#1074#1082#1072' '#1087#1086' '#1103#1079#1099#1082#1091
''
' '#1055#1088#1080#1084#1077#1088#1099':'
' **********************'
' function funct(x:Extended):Extended; stdcall;'
' begin'
' Result:=Sin(x);'
' end;'
' **********************'
' '#1058#1088#1080#1075#1086#1085#1086#1084#1077#1090#1088#1080#1095#1077#1089#1082#1080#1077' '#1092#1091#1085#1082#1094#1080#1080
' Cos(x) - '#1050#1086#1089#1080#1085#1091#1089
' Sin(x) - '#1057#1080#1085#1091#1089
' Tan(x) - '#1058#1072#1085#1075#1077#1085#1089
' Cotan(x) - '#1050#1072#1090#1072#1085#1075#1077#1085#1089
' ArcCot(x) - '#1040#1088#1082#1082#1086#1090#1072#1085#1075#1077#1085#1089
' Cosecant(x) - '#1050#1086#1089#1077#1082#1072#1085#1089
' Secant(x) - '#1057#1077#1082#1072#1085#1089
' **********************'
' Floor(x) - '#1051#1077#1089#1085#1080#1094#1072
' Exp(x) - '#1069#1082#1089#1087#1072#1085#1077#1085#1090#1072
' Power(x) - '#1042#1086#1079#1074#1077#1076#1077#1085#1080#1077' '#1074' '#1089#1090#1077#1087#1077#1085#1100
' Abs(x) - '#1052#1086#1076#1091#1083#1100#1085#1099#1077' '#1089#1082#1086#1073#1082#1080
' Round(x) - '#1054#1082#1088#1091#1075#1083#1077#1085#1080#1077
' Trunc(x) - '#1054#1090#1073#1088#1086#1089#1080#1090#1100' '#1076#1088#1086#1073#1085#1091#1102' '#1095#1072#1089#1090#1100
' Inc(x) - '#1059#1074#1077#1083#1080#1095#1080#1090#1100' x '#1085#1072' 1'
' Inc(x, n) - '#1059#1074#1077#1083#1080#1095#1080#1090#1100' x '#1085#1072' n'
' Dec(x) - '#1059#1084#1077#1085#1100#1096#1080#1090#1100' x '#1085#1072' 1'
' Dec(x, n) - '#1059#1084#1077#1085#1100#1096#1080#1090#1100' x '#1085#1072' n'
' Sqr(x) - '#1050#1074#1072#1076#1088#1072#1090' x'
' Sqrt(x) - '#1050#1086#1088#1077#1085#1100' '#1095#1080#1089#1083#1072' x'
' **********************'
' '#1055#1088#1080#1084#1077#1088' '#1092#1091#1085#1082#1094#1080#1080': '#1050#1074#1072#1076#1088#1072#1090#1085#1086#1077' '#1091#1088#1072#1074#1085#1077#1085#1080#1077
''
' function funct(x:Extended):Extended; stdcall;'
' begin'
' //2x^2+3x+6 -- '#1044#1074#1072' x '#1074' '#1082#1074#1072#1076#1088#1072#1090#1077', '#1087#1083#1102#1089' '#1090#1088#1080' x, '#1087#1083#1102#1089' '#1096#1077#1089#1090#1100
' Result:=(2*Power(x, 2))+(3*x)+6;'
' end;'
' '
' '#1054#1087#1077#1088#1072#1090#1086#1088#1099':'
' := - '#1055#1088#1080#1089#1074#1086#1080#1090#1100
' + - '#1057#1083#1086#1078#1080#1090#1100' (X+1)'
' - - '#1042#1099#1095#1077#1089#1090#1100' (X-1)'
' * - '#1059#1084#1085#1086#1078#1080#1090#1100' (X*2)'
' / - '#1056#1072#1079#1076#1077#1083#1080#1090#1100' (X/2)'
' '#1059#1089#1083#1086#1074#1085#1072#1103' '#1082#1086#1085#1089#1090#1088#1091#1082#1094#1080#1103': if then else ('#1077#1089#1083#1080', '#1090#1086', '#1074' '#1087#1088#1086#1090#1080#1074#1085#1086#1084' '#1089#1083#1091#1095#1072 +
#1077') '
' '#1053#1072#1087#1088#1080#1084#1077#1088': '
' if x = 2 then x:=x+3; ('#1077#1089#1083#1080' x '#1088#1072#1074#1077#1085' 2, '#1090#1086' '#1091#1074#1077#1083#1080#1095#1080#1074#1072#1077#1084' x '#1085#1072' 3)'
' if x = 2 then x:=x+3 else x:=x-2; ('#1077#1089#1083#1080' x '#1088#1072#1074#1077#1085' 2, '#1090#1086' '#1091#1074#1077#1083#1080#1095#1080#1074 +
#1072#1077#1084' x '#1085#1072' 3, '#1074' '#1087#1088#1086#1090#1080#1074#1085#1086#1084' '#1089#1083#1091#1095#1072#1077' '#1091#1084#1077#1085#1100#1096#1072#1077#1084' x '#1085#1072' 2)'
' if (x < 2) or (x = 3) then Dec(x, 3.4); ('#1077#1089#1083#1080' x '#1084#1077#1085#1100#1096#1077' 2 '#1080#1083#1080' x' +
' '#1088#1072#1074#1077#1085' 3, '#1090#1086' '#1091#1084#1077#1085#1100#1096#1072#1077#1084' x '#1085#1072' 3.4)'
' '
' or - '#1051#1086#1075#1080#1095#1077#1089#1082#1086#1077' "'#1048#1051#1048'" '
' and - '#1051#1086#1075#1080#1095#1077#1089#1082#1086#1077' "'#1048'"'
' not - '#1051#1086#1075#1080#1095#1077#1089#1082#1086#1077' "'#1053#1045'"'
' mod - '#1086#1089#1090#1072#1090#1086#1082' '#1086#1090' '#1076#1077#1083#1077#1085#1080#1103
' div - '#1076#1077#1083#1077#1085#1080#1077' '#1085#1072#1094#1077#1083#1086
' < - '#1084#1077#1085#1100#1096#1077
' > - '#1073#1086#1083#1100#1096#1077
' = - '#1088#1072#1074#1085#1086
' <> - '#1085#1077#1088#1072#1074#1085#1086
' <= - '#1084#1077#1085#1100#1096#1077' '#1083#1080#1073#1086' '#1088#1072#1074#1085#1086
' >= - '#1073#1086#1083#1100#1096#1077' '#1083#1080#1073#1086' '#1088#1072#1074#1085#1086
''
' '#1069#1090#1086', '#1077#1089#1090#1100' '#1084#1072#1082#1089#1080#1084#1072#1083#1100#1085#1086' '#1091#1088#1077#1079#1072#1085#1085#1099#1081' '#1085#1072#1073#1086#1088' '#1079#1085#1072#1085#1080#1081' '#1076#1083#1103' '#1087#1086#1089#1090#1088#1086#1077#1085#1080#1103' '#1092#1091 +
#1085#1082#1094#1080#1080' '#1074' Delphi.'
'}'
''
'//'#1048#1084#1103' '#1092#1091#1085#1082#1094#1080#1080' ('#1085#1077' '#1086#1073#1103#1079#1072#1090#1077#1083#1100#1085#1086', '#1085#1086' '#1088#1077#1082#1086#1084#1077#1085#1076#1091#1077#1090#1089#1103')'
'const FunctName = '#39'Sin(x)*(x+2)+6'#39';'
''
''
'function funct(x:Extended):Extended; stdcall;'
'begin'
' //'#1059#1082#1072#1078#1080#1090#1077' '#1072#1083#1075#1077#1073#1088#1072#1080#1095#1077#1089#1082#1086#1077' '#1074#1099#1088#1072#1078#1077#1085#1080#1077', '#1085#1077#1086#1073#1093#1086#1076#1080#1084#1086#1081' '#1092#1091#1085#1082#1094#1080#1080','
' //'#1080#1089#1087#1086#1083#1100#1079#1091#1103' '#1089#1090#1072#1085#1076#1072#1088#1090#1085#1099#1077' '#1092#1091#1085#1082#1094#1080#1080' '#1080' '#1087#1088#1086#1094#1077#1076#1091#1088#1099' '#1103#1079#1099#1082#1072' Pascal - Delp' +
'hi'
' //'#1053#1077' '#1079#1072#1073#1091#1076#1100#1090#1077' '#1074#1077#1088#1085#1091#1090#1100' '#1088#1077#1079#1091#1083#1100#1090#1072#1090': '#1087#1088#1080#1089#1074#1086#1080#1090#1100' Result '#1088#1077#1079#1091#1083#1100#1090#1072#1090' '#1074#1072#1096 +
#1077#1081' '#1092#1091#1085#1082#1094#1080#1080'.'
' //Result:=Power(x, 2);'
' //Result:=Sqrt(x);'
' Result:=Sin(x)*(x+2)+6;'
'end;'
''
'function get_name():PChar; stdcall;'
'begin'
' Result:=FunctName;'
'end;'
''
'exports funct, get_name;'
''
'begin'
''
'end.')
ParentFont = False
ScrollBars = ssBoth
TabOrder = 1
end
object ButtonClose: TButton
Left = 672
Top = 392
Width = 75
Height = 25
Hint = #1047#1072#1082#1088#1099#1090#1100
Anchors = [akRight, akBottom]
Caption = #1047#1072#1082#1088#1099#1090#1100
TabOrder = 2
OnClick = ButtonCloseClick
end
object ButtonCompile: TButton
Left = 560
Top = 392
Width = 107
Height = 25
Hint = #1050#1086#1084#1087#1080#1083#1080#1088#1086#1074#1072#1090#1100' '#1082#1086#1076', '#1088#1077#1079#1091#1083#1100#1090#1072#1090' '#1084#1086#1078#1085#1086' '#1091#1074#1080#1076#1077#1090#1100' '#1074' Result.log'
Anchors = [akRight, akBottom]
Caption = #1050#1086#1084#1087#1080#1083#1080#1088#1086#1074#1072#1090#1100
TabOrder = 3
OnClick = ButtonCompileClick
end
object ButtonLog: TButton
Left = 8
Top = 392
Width = 75
Height = 25
Hint = #1055#1088#1086#1089#1084#1086#1090#1088#1077#1090#1100' '#1083#1086#1075
Anchors = [akLeft, akBottom]
Caption = 'Log'
TabOrder = 4
OnClick = ButtonLogClick
end
end