23 @FB_RTL_ARRAYREDIM, NULL, _
24 FB_DATATYPE_LONG, FB_FUNCMODE_CDECL, _
25 NULL, FB_RTL_OPT_NONE, _
28 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
29 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
30 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
31 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
32 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
33 ( FB_DATATYPE_INVALID, FB_PARAMMODE_VARARG, FALSE ) _
46 @FB_RTL_ARRAYREDIMPRESV, NULL, _
47 FB_DATATYPE_LONG, FB_FUNCMODE_CDECL, _
48 NULL, FB_RTL_OPT_NONE, _
51 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
52 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
53 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
54 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
55 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
56 ( FB_DATATYPE_INVALID, FB_PARAMMODE_VARARG, FALSE ) _
69 @FB_RTL_ARRAYREDIM_OBJ, NULL, _
70 FB_DATATYPE_LONG, FB_FUNCMODE_CDECL, _
71 NULL, FB_RTL_OPT_NONE, _
74 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
75 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
76 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
77 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
78 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
79 ( FB_DATATYPE_INVALID, FB_PARAMMODE_VARARG, FALSE ) _
92 @FB_RTL_ARRAYREDIMPRESV_OBJ, NULL, _
93 FB_DATATYPE_LONG, FB_FUNCMODE_CDECL, _
94 NULL, FB_RTL_OPT_NONE, _
97 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
98 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
99 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
100 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
101 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
102 ( FB_DATATYPE_INVALID, FB_PARAMMODE_VARARG, FALSE ) _
107 @FB_RTL_ARRAYDESTRUCTOBJ, NULL, _
108 FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
109 NULL, FB_RTL_OPT_NONE, _
112 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
113 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
118 @FB_RTL_ARRAYDESTRUCTSTR, NULL, _
119 FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
120 NULL, FB_RTL_OPT_NONE, _
123 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ) _
128 @FB_RTL_ARRAYCLEAR, NULL, _
129 FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
130 NULL, FB_RTL_OPT_NONE, _
133 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
134 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
145 @FB_RTL_ARRAYCLEAROBJ, NULL, _
146 FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
147 NULL, FB_RTL_OPT_NONE, _
150 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
151 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
152 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ), _
153 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
158 @FB_RTL_ARRAYERASE, NULL, _
159 FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
160 NULL, FB_RTL_OPT_NONE, _
163 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
164 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ) _
169 @FB_RTL_ARRAYERASEOBJ, NULL, _
170 FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
171 NULL, FB_RTL_OPT_NONE, _
174 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
175 ( typeAddrOf( FB_DATATYPE_VOID ), FB_PARAMMODE_BYVAL, FALSE ) _
180 @FB_RTL_ARRAYERASESTR, NULL, _
181 FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
182 NULL, FB_RTL_OPT_NONE, _
185 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ) _
190 @FB_RTL_ARRAYLBOUND, NULL, _
191 FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
192 NULL, FB_RTL_OPT_NONE, _
195 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
196 ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYVAL, FALSE ) _
201 @FB_RTL_ARRAYUBOUND, NULL, _
202 FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
203 NULL, FB_RTL_OPT_NONE, _
206 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYDESC, FALSE ), _
207 ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYVAL, FALSE ) _
218 @FB_RTL_ARRAYSNGBOUNDCHK, NULL, _
219 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_FBCALL, _
220 NULL, FB_RTL_OPT_NONE, _
223 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
224 ( FB_DATATYPE_UINT, FB_PARAMMODE_BYVAL, FALSE ), _
225 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
226 ( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ) _
238 @FB_RTL_ARRAYBOUNDCHK, NULL, _
239 typeAddrOf( FB_DATATYPE_VOID ), FB_FUNCMODE_FBCALL, _
240 NULL, FB_RTL_OPT_NONE, _
243 ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYVAL, FALSE ), _
244 ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYVAL, FALSE ), _
245 ( FB_DATATYPE_INTEGER, FB_PARAMMODE_BYVAL, FALSE ), _
246 ( FB_DATATYPE_LONG, FB_PARAMMODE_BYVAL, FALSE ), _
247 ( typeAddrOf( FB_DATATYPE_CHAR ), FB_PARAMMODE_BYVAL, FALSE ) _
265 if(
proc = NULL )
then
273 byval ctor
as FBSYMBOL
ptr, _
274 byval check_access
as integer, _
275 byval is_erase
as integer _
278 if( ctor = NULL )
then exit sub
280 assert( symbIsConstructor( ctor ) )
282 if( check_access )
then
284 errReport( FB_ERRMSG_NOACCESSTODEFAULTCTOR )
289 if( symbGetProcMode( ctor ) <> FB_FUNCMODE_CDECL )
then
290 errReport(
iif( is_erase, FB_ERRMSG_ERASECTORMUSTBECDEL, _
291 FB_ERRMSG_REDIMCTORMUSTBECDEL ) )
295 if( symbGetProcParams( ctor ) <> 1 )
then
296 errReport(
iif( is_erase, FB_ERRMSG_ERASECTORMUSTHAVEONEPARAM, _
297 FB_ERRMSG_REDIMCTORMUSTHAVEONEPARAM ) )
304 byval dtor
as FBSYMBOL
ptr, _
305 byval check_access
as integer, _
306 byval is_erase
as integer _
309 if( dtor = NULL )
then exit sub
311 assert( symbIsDestructor( dtor ) )
313 if( check_access )
then
320 if( symbGetProcMode( dtor ) <> FB_FUNCMODE_CDECL )
then
321 errReport(
iif( is_erase, FB_ERRMSG_ERASEDTORMUSTBECDEL, _
322 FB_ERRMSG_REDIMDTORMUSTBECDEL ) )
325 assert( symbGetProcParams( dtor ) = 1 )
331 dim as ASTNODE
ptr proc =
any
332 dim as integer dtype =
any
333 dim as FBSYMBOL
ptr ctor =
any, dtor =
any, subtype =
any
337 dtype = astGetDataType( arrayexpr )
339 if( dtype = FB_DATATYPE_STRUCT )
then
340 subtype = astGetSubtype( arrayexpr )
347 errReport( FB_ERRMSG_NODEFAULTCTORDEFINED )
354 if( (ctor <> NULL)
or (dtor <> NULL) )
then
380 elseif( dtype = FB_DATATYPE_STRING )
then
410 byval arrayexpr
as ASTNODE
ptr, _
411 byval is_dynamic
as integer, _
412 byval check_access
as integer _
415 dim as ASTNODE
ptr proc =
any
416 dim as integer dtype =
any
417 dim as FBSYMBOL
ptr dtor =
any
421 dtype = astGetDataType( arrayexpr )
423 if( dtype = FB_DATATYPE_STRUCT )
then
432 if( is_dynamic )
then
449 elseif( dtype = FB_DATATYPE_STRING )
then
450 if( is_dynamic )
then
463 if( is_dynamic = FALSE )
then
487 byval s
as FBSYMBOL
ptr, _
488 byval elementlen
as longint, _
489 byval dimensions
as integer, _
490 exprTB()
as ASTNODE
ptr, _
491 byval dopreserve
as integer, _
492 byval doclear
as integer _
497 dim as ASTNODE
ptr proc =
any, expr =
any
498 dim as FBSYMBOL
ptr f =
any, ctor =
any, dtor =
any, subtype =
any
499 dim as integer dtype =
any
501 dtype = symbGetFullType( s )
504 select case typeGet( dtype )
505 case FB_DATATYPE_STRUCT
506 subtype = symbGetSubtype( s )
519 if( (ctor = NULL)
and (dtor = NULL) )
then
520 if( dopreserve = FALSE )
then
521 f = PROCLOOKUP( ARRAYREDIM )
523 f = PROCLOOKUP( ARRAYREDIMPRESV )
526 if( dopreserve = FALSE )
then
527 f = PROCLOOKUP( ARRAYREDIM_OBJ )
529 f = PROCLOOKUP( ARRAYREDIMPRESV_OBJ )
545 if( (ctor = NULL)
and (dtor = NULL) )
then
576 for i
as integer = 0
to dimensions-1
581 if( astGetDataType( expr ) <> FB_DATATYPE_INTEGER )
then
582 expr =
astNewCONV( FB_DATATYPE_INTEGER, NULL, expr )
593 if( astGetDataType( expr ) <> FB_DATATYPE_INTEGER )
then
594 expr =
astNewCONV( FB_DATATYPE_INTEGER, NULL, expr )
607 byval arrayexpr
as ASTNODE
ptr, _
608 byval dimexpr
as ASTNODE
ptr, _
609 byval islbound
as integer _
612 dim as ASTNODE
ptr proc =
any
617 PROCLOOKUP( ARRAYLBOUND ), _
618 PROCLOOKUP( ARRAYUBOUND ) ) )
636 byval idx as ASTNODE
ptr, _
637 byval lb
as ASTNODE
ptr, _
638 byval rb
as ASTNODE
ptr, _
639 byval linenum
as integer, _
640 byval module
as zstring ptr _
643 dim as ASTNODE
ptr proc =
any
644 dim as FBSYMBOL
ptr f =
any
650 f = PROCLOOKUP( ARRAYSNGBOUNDCHK )
652 f = PROCLOOKUP( ARRAYBOUNDCHK )
663 if( lb <> NULL )
then