"Fossies" - the Fresh Open Source Software Archive

Member "FreeBASIC-1.07.1-source/src/compiler/rtl-string.bas" (27 Sep 2019, 110276 Bytes) of package /linux/privat/FreeBASIC-1.07.1-source.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Visual Basic source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "rtl-string.bas": 1.07.0_vs_1.07.1.

    1 '' intrinsic runtime lib string functions (MID, LEFT, STR, VAL, HEX, ...)
    2 ''
    3 '' chng: oct/2004 written [v1ctor]
    4 
    5 
    6 #include once "fb.bi"
    7 #include once "fbint.bi"
    8 #include once "ast.bi"
    9 #include once "rtl.bi"
   10 
   11     dim shared as FB_RTL_PROCDEF funcdata( 0 to ... ) = _
   12     { _
   13         /' function fb_StrInit( byref dst as any, byval dst_len as const integer, _
   14                 byref src as const any, byval src_len as const integer, _
   15                 byval fillrem as const long = 1 ) as string '/ _
   16         ( _
   17             @FB_RTL_STRINIT, NULL, _
   18             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
   19             NULL, FB_RTL_OPT_NONE, _
   20             5, _
   21             { _
   22                 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
   23                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
   24                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
   25                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
   26                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, TRUE, 1 ) _
   27             } _
   28         ), _
   29         /' function fb_WstrAssignToA_Init( byref dst as any, byval dst_len as const integer, _
   30                 byval src as const wstring ptr, byval fillrem as const integer ) as string '/ _
   31         ( _
   32             @FB_RTL_WSTRASSIGNAW_INIT, NULL, _
   33             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
   34             NULL, FB_RTL_OPT_NONE, _
   35             4, _
   36             { _
   37                 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
   38                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
   39                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
   40                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
   41             } _
   42         ), _
   43         /' function fb_StrAssign( byref dst as any, byval dst_len as const integer, _
   44                 byref src as const any, byval src_len as const integer, _
   45                 byval fillrem as const long = 1 ) as string '/ _
   46         ( _
   47             @FB_RTL_STRASSIGN, NULL, _
   48             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
   49             NULL, FB_RTL_OPT_NONE, _
   50             5, _
   51             { _
   52                 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
   53                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
   54                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
   55                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
   56                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, TRUE, 1 ) _
   57             } _
   58         ), _
   59         /' function fb_WstrAssign( byval dst as wstring ptr, byval dst_len as const integer, _
   60                 byval src as const wstring ptr) as wstring ptr '/ _
   61         ( _
   62             @FB_RTL_WSTRASSIGN, NULL, _
   63             typeAddrOf( FB_DATATYPE_WCHAR ), FB_FUNCMODE_FBCALL, _
   64             NULL, FB_RTL_OPT_NONE, _
   65             3, _
   66             { _
   67                 ( typeAddrOf( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
   68                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
   69                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
   70             } _
   71         ), _
   72         /' function fb_WstrAssignFromA( byval dst as wstring ptr, byval dst_len as const integer, _
   73                 byref src as const any, byval src_len as const integer ) as wstring ptr '/ _
   74         ( _
   75             @FB_RTL_WSTRASSIGNWA, NULL, _
   76             typeAddrOf( FB_DATATYPE_WCHAR ), FB_FUNCMODE_FBCALL, _
   77             NULL, FB_RTL_OPT_NONE, _
   78             4, _
   79             { _
   80                 ( typeAddrOf( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
   81                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
   82                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
   83                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
   84             } _
   85         ), _
   86         /' function fb_WstrAssignToA( byref dst as any, byval dst_len as const integer, _
   87                 byval src as const wstring ptr, byval fillrem as const long ) as string '/ _
   88         ( _
   89             @FB_RTL_WSTRASSIGNAW, NULL, _
   90             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
   91             NULL, FB_RTL_OPT_NONE, _
   92             4, _
   93             { _
   94                 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
   95                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
   96                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
   97                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
   98             } _
   99         ), _
  100         /' sub fb_StrDelete( byref str as const string ) '/ _
  101         ( _
  102             @FB_RTL_STRDELETE, NULL, _
  103             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
  104             NULL, FB_RTL_OPT_NONE, _
  105             1, _
  106             { _
  107                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  108             } _
  109         ), _
  110         /' function fb_hStrDelTemp( byref str as const string ) as long '/ _
  111         ( _
  112             @FB_RTL_HSTRDELTEMP, NULL, _
  113             FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
  114             NULL, FB_RTL_OPT_NONE, _
  115             1, _
  116             { _
  117                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  118             } _
  119         ), _
  120         /' sub fb_WstrDelete( byval str as const wstring ptr ) '/ _
  121         ( _
  122             @FB_RTL_WSTRDELETE, NULL, _
  123             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
  124             NULL, FB_RTL_OPT_NONE, _
  125             1, _
  126             { _
  127                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  128             } _
  129         ), _
  130         /' function fb_StrConcat( byref dst as string, _
  131                 byref str1 as const any, byval str1_size as const integer, _
  132                 byref str2 as const any, byval str2_size as const integer ) as string '/ _
  133         ( _
  134             @FB_RTL_STRCONCAT, NULL, _
  135             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  136             NULL, FB_RTL_OPT_NONE, _
  137             5, _
  138             { _
  139                 ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
  140                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
  141                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  142                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
  143                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  144             } _
  145         ), _
  146         /' function fb_WstrConcat( byval str1 as const wstring ptr, byval str2 as const wstring ptr ) as wstring '/ _
  147         ( _
  148             @FB_RTL_WSTRCONCAT, NULL, _
  149             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  150             NULL, FB_RTL_OPT_NONE, _
  151             2, _
  152             { _
  153                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  154                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  155             } _
  156         ), _
  157         /' function fb_WstrConcatWA( byval str1 as const wstring ptr, _
  158                 byref str2 as const any, byval str2_size as const integer ) as wstring '/ _
  159         ( _
  160             @FB_RTL_WSTRCONCATWA, NULL, _
  161             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  162             NULL, FB_RTL_OPT_NONE, _
  163             3, _
  164             { _
  165                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  166                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
  167                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  168             } _
  169         ), _
  170         /' function fb_WstrConcatAW( byref str1 as const any, byval str1_size as const integer, _
  171                 byval str2 as const wstring ptr ) as wstring '/ _
  172         ( _
  173             @FB_RTL_WSTRCONCATAW, NULL, _
  174             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  175             NULL, FB_RTL_OPT_NONE, _
  176             3, _
  177             { _
  178                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
  179                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  180                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  181             } _
  182         ), _
  183         /' function fb_StrCompare( byref str1 as const any, byval str1_size as const integer, _
  184                 byref str2 as const any, byval str2_size as const integer ) as long '/ _
  185         ( _
  186             @FB_RTL_STRCOMPARE, NULL, _
  187             FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
  188             NULL, FB_RTL_OPT_NONE, _
  189             4, _
  190             { _
  191                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
  192                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  193                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
  194                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  195             } _
  196         ), _
  197         /' function fb_WstrCompare( byval str1 as const wstring ptr, byval str2 as const wstring ptr ) as long '/ _
  198         ( _
  199             @FB_RTL_WSTRCOMPARE, NULL, _
  200             FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
  201             NULL, FB_RTL_OPT_NONE, _
  202             2, _
  203             { _
  204                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  205                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  206             } _
  207         ), _
  208         /' function fb_StrConcatAssign( byref dst as any, byval dst_size as const integer, _
  209                 byref src as const any, byval src_len as const integer, _
  210                 byval fillrem as const long = 1 ) as string '/ _
  211         ( _
  212             @FB_RTL_STRCONCATASSIGN, NULL, _
  213             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  214             NULL, FB_RTL_OPT_NONE, _
  215             5, _
  216             { _
  217                 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
  218                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  219                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
  220                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  221                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, TRUE, 1 ) _
  222             } _
  223         ), _
  224         /' function fb_WstrConcatAssign( byval dst as wstring ptr, byval dst_chars as const integer, _
  225                 byval src as const wstring ptr ) as wstring ptr '/ _
  226         ( _
  227             @FB_RTL_WSTRCONCATASSIGN, NULL, _
  228             typeAddrOf( FB_DATATYPE_WCHAR ), FB_FUNCMODE_FBCALL, _
  229             NULL, FB_RTL_OPT_NONE, _
  230             3, _
  231             { _
  232                 ( typeAddrOf( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
  233                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  234                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  235             } _
  236         ), _
  237         /' function fb_StrAllocTempResult( byref str as const string ) as string '/ _
  238         ( _
  239             @FB_RTL_STRALLOCTMPRES, NULL, _
  240             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  241             NULL, FB_RTL_OPT_NONE, _
  242             1, _
  243             { _
  244                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  245             } _
  246         ), _
  247         /' function fb_StrAllocTempDescF( byref str as const any, byval str_size as const integer ) as string '/ _
  248         ( _
  249             @FB_RTL_STRALLOCTMPDESCF, NULL, _
  250             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  251             NULL, FB_RTL_OPT_NONE, _
  252             2, _
  253             { _
  254                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
  255                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  256             } _
  257         ), _
  258         /' function fb_StrAllocTempDescZ( byval str as const zstring ptr ) as string '/ _
  259         ( _
  260             @FB_RTL_STRALLOCTMPDESCZ, NULL, _
  261             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  262             NULL, FB_RTL_OPT_NONE, _
  263             1, _
  264             { _
  265                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  266             } _
  267         ), _
  268         /' function fb_StrAllocTempDescZEx( byval str as const zstring ptr, byval len as const integer ) as string '/ _
  269         ( _
  270             @FB_RTL_STRALLOCTMPDESCZEX, NULL, _
  271             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  272             NULL, FB_RTL_OPT_NONE, _
  273             2, _
  274             { _
  275                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  276                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  277             } _
  278         ), _
  279         /' function fb_WstrAlloc( byval chars as const integer ) as wstring ptr '/ _
  280         ( _
  281             @FB_RTL_WSTRALLOC, NULL, _
  282             typeAddrOf( FB_DATATYPE_WCHAR ), FB_FUNCMODE_FBCALL, _
  283             NULL, FB_RTL_OPT_NONE, _
  284             1, _
  285             { _
  286                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  287             } _
  288         ), _
  289         /' function fb_BoolToStr( byval num as const boolean ) as string '/ _
  290         ( _
  291             @FB_RTL_BOOL2STR, NULL, _
  292             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  293             NULL, FB_RTL_OPT_NOQB, _
  294             1, _
  295             { _
  296                 ( typeSetIsConst( FB_DATATYPE_BOOLEAN ), FB_PARAMMODE_BYVAL, FALSE ) _
  297             } _
  298         ), _
  299         /' function fb_IntToStr( byval num as const long ) as string '/ _
  300         ( _
  301             @FB_RTL_INT2STR, NULL, _
  302             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  303             NULL, FB_RTL_OPT_NONE, _
  304             1, _
  305             { _
  306                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
  307             } _
  308         ), _
  309         /' function fb_IntToStrQB( byval num as const long ) as string '/ _
  310         ( _
  311             @FB_RTL_INT2STR_QB, NULL, _
  312             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  313             NULL, FB_RTL_OPT_QBONLY, _
  314             1, _
  315             { _
  316                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
  317             } _
  318         ), _
  319         /' function fb_BoolToWstr( byval num as const boolean ) as wstring '/ _
  320         ( _
  321             @FB_RTL_BOOL2WSTR, NULL, _
  322             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  323             NULL, FB_RTL_OPT_NONE, _
  324             1, _
  325             { _
  326                 ( typeSetIsConst( FB_DATATYPE_BOOLEAN ), FB_PARAMMODE_BYVAL, FALSE ) _
  327             } _
  328         ), _
  329         /' function fb_IntToWstr( byval num as const long ) as wstring '/ _
  330         ( _
  331             @FB_RTL_INT2WSTR, NULL, _
  332             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  333             NULL, FB_RTL_OPT_NONE, _
  334             1, _
  335             { _
  336                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
  337             } _
  338         ), _
  339         /' function fb_UIntToStr( byval num as const ulong ) as string '/ _
  340         ( _
  341             @FB_RTL_UINT2STR, NULL, _
  342             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  343             NULL, FB_RTL_OPT_NONE, _
  344             1, _
  345             { _
  346                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ) _
  347             } _
  348         ), _
  349         /' function fb_UIntToStrQB( byval num as const ulong ) as string '/ _
  350         ( _
  351             @FB_RTL_UINT2STR_QB, NULL, _
  352             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  353             NULL, FB_RTL_OPT_QBONLY, _
  354             1, _
  355             { _
  356                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ) _
  357             } _
  358         ), _
  359         /' function fb_UIntToWstr( byval num as const ulong ) as wstring '/ _
  360         ( _
  361             @FB_RTL_UINT2WSTR, NULL, _
  362             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  363             NULL, FB_RTL_OPT_NONE, _
  364             1, _
  365             { _
  366                 ( FB_DATATYPE_ULONG, FB_PARAMMODE_BYVAL, FALSE ) _
  367             } _
  368         ), _
  369         /' function fb_LongintToStr( byval num as const longint ) as string '/ _
  370         ( _
  371             @FB_RTL_LONGINT2STR, NULL, _
  372             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  373             NULL, FB_RTL_OPT_NONE, _
  374             1, _
  375             { _
  376                 ( typeSetIsConst( FB_DATATYPE_LONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
  377             } _
  378         ), _
  379         /' function fb_LongintToStrQB( byval num as const longint ) as string '/ _
  380         ( _
  381             @FB_RTL_LONGINT2STR_QB, NULL, _
  382             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  383             NULL, FB_RTL_OPT_QBONLY, _
  384             1, _
  385             { _
  386                 ( typeSetIsConst( FB_DATATYPE_LONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
  387             } _
  388         ), _
  389         /' function fb_LongintToWstr( byval num as const longint ) as wstring '/ _
  390         ( _
  391             @FB_RTL_LONGINT2WSTR, NULL, _
  392             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  393             NULL, FB_RTL_OPT_NONE, _
  394             1, _
  395             { _
  396                 ( typeSetIsConst( FB_DATATYPE_LONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
  397             } _
  398         ), _
  399         /' function fb_ULongintToStr( byval num as const ulongint ) as string '/ _
  400         ( _
  401             @FB_RTL_ULONGINT2STR, NULL, _
  402             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  403             NULL, FB_RTL_OPT_NONE, _
  404             1, _
  405             { _
  406                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
  407             } _
  408         ), _
  409         /' function fb_ULongintToStrQB( byval num as const ulongint ) as string '/ _
  410         ( _
  411             @FB_RTL_ULONGINT2STR_QB, NULL, _
  412             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  413             NULL, FB_RTL_OPT_QBONLY, _
  414             1, _
  415             { _
  416                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
  417             } _
  418         ), _
  419         /' function fb_ULongintToWstr( byval num as const ulongint ) as wstring '/ _
  420         ( _
  421             @FB_RTL_ULONGINT2WSTR, NULL, _
  422             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  423             NULL, FB_RTL_OPT_NONE, _
  424             1, _
  425             { _
  426                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
  427             } _
  428         ), _
  429         /' function fb_FloatToStr( byval num as const single ) as string '/ _
  430         ( _
  431             @FB_RTL_FLT2STR, NULL, _
  432             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  433             NULL, FB_RTL_OPT_NONE, _
  434             1, _
  435             { _
  436                 ( typeSetIsConst( FB_DATATYPE_SINGLE ), FB_PARAMMODE_BYVAL, FALSE ) _
  437             } _
  438         ), _
  439         /' function fb_FloatToStrQB( byval num as const single ) as string '/ _
  440         ( _
  441             @FB_RTL_FLT2STR_QB, NULL, _
  442             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  443             NULL, FB_RTL_OPT_QBONLY, _
  444             1, _
  445             { _
  446                 ( typeSetIsConst( FB_DATATYPE_SINGLE ), FB_PARAMMODE_BYVAL, FALSE ) _
  447             } _
  448         ), _
  449         /' function fb_FloatToWstr( byval num as const single ) as wstring '/ _
  450         ( _
  451             @FB_RTL_FLT2WSTR, NULL, _
  452             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  453             NULL, FB_RTL_OPT_NONE, _
  454             1, _
  455             { _
  456                 ( typeSetIsConst( FB_DATATYPE_SINGLE ), FB_PARAMMODE_BYVAL, FALSE ) _
  457             } _
  458         ), _
  459         /' function fb_DoubleToStr( byval num as const double ) as string '/ _
  460         ( _
  461             @FB_RTL_DBL2STR, NULL, _
  462             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  463             NULL, FB_RTL_OPT_NONE, _
  464             1, _
  465             { _
  466                 ( typeSetIsConst( FB_DATATYPE_DOUBLE ), FB_PARAMMODE_BYVAL, FALSE ) _
  467             } _
  468         ), _
  469         /' function fb_DoubleToStrQB( byval num as const double ) as string '/ _
  470         ( _
  471             @FB_RTL_DBL2STR_QB, NULL, _
  472             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  473             NULL, FB_RTL_OPT_QBONLY, _
  474             1, _
  475             { _
  476                 ( typeSetIsConst( FB_DATATYPE_DOUBLE ), FB_PARAMMODE_BYVAL, FALSE ) _
  477             } _
  478         ), _
  479         /' function fb_DoubleToWstr( byval num as const double ) as wstring '/ _
  480         ( _
  481             @FB_RTL_DBL2WSTR, NULL, _
  482             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  483             NULL, FB_RTL_OPT_NONE, _
  484             1, _
  485             { _
  486                 ( typeSetIsConst( FB_DATATYPE_DOUBLE ), FB_PARAMMODE_BYVAL, FALSE ) _
  487             } _
  488         ), _
  489         /' function fb_WstrToStr( byval str as const wstring ptr ) as string '/ _
  490         ( _
  491             @FB_RTL_WSTR2STR, NULL, _
  492             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  493             NULL, FB_RTL_OPT_NONE, _
  494             1, _
  495             { _
  496                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  497             } _
  498         ), _
  499         /' function fb_StrToWstr( byval str as const zstring ptr ) as wstring '/ _
  500         ( _
  501             @FB_RTL_STR2WSTR, NULL, _
  502             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  503             NULL, FB_RTL_OPT_NONE, _
  504             1, _
  505             { _
  506                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_CHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  507             } _
  508         ), _
  509         /' function fb_StrMid( byref str as const string, byval start as const integer, _
  510                 byval len as const integer ) as string '/ _
  511         ( _
  512             @FB_RTL_STRMID, NULL, _
  513             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  514             NULL, FB_RTL_OPT_NONE, _
  515             3, _
  516             { _
  517                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  518                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  519                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  520             } _
  521         ), _
  522         /' function fb_WstrMid( byval str as const wstring ptr, byval start as const integer, _
  523                 byval len as const integer ) as wstring '/ _
  524         ( _
  525             @FB_RTL_WSTRMID, NULL, _
  526             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  527             NULL, FB_RTL_OPT_NONE, _
  528             3, _
  529             { _
  530                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  531                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  532                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  533             } _
  534         ), _
  535         /' sub fb_StrAssignMid( byref dst as string, byval start as const integer, _
  536                 byval len as const integer, byref src as const string ) '/ _
  537         ( _
  538             @FB_RTL_STRASSIGNMID, NULL, _
  539             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
  540             NULL, FB_RTL_OPT_NONE, _
  541             4, _
  542             { _
  543                 ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
  544                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  545                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  546                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  547             } _
  548         ), _
  549         /' sub fb_WstrAssignMid ( byval dst as wstring ptr, byval dst_len as const integer, _
  550                 byval start as const integer, byval len as const integer, _
  551                 byval src as const wstring ptr ) '/ _
  552         ( _
  553             @FB_RTL_WSTRASSIGNMID, NULL, _
  554             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
  555             NULL, FB_RTL_OPT_NONE, _
  556             5, _
  557             { _
  558                 ( typeAddrOf( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
  559                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  560                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  561                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  562                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  563             } _
  564         ), _
  565         /' function fb_StrFill1( byval cnt as const integer, byval char as const long ) as string '/ _
  566         ( _
  567             @FB_RTL_STRFILL1, NULL, _
  568             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  569             NULL, FB_RTL_OPT_NONE, _
  570             2, _
  571             { _
  572                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  573                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
  574             } _
  575         ), _
  576         /' function fb_WstrFill1( byval chars as const integer, byval c as const long ) as wstring '/ _
  577         ( _
  578             @FB_RTL_WSTRFILL1, NULL, _
  579             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  580             NULL, FB_RTL_OPT_NONE, _
  581             2, _
  582             { _
  583                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  584                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
  585             } _
  586         ), _
  587         /' fb_StrFill2( byval cnt as const integer, byref src as const string ) as string '/ _
  588         ( _
  589             @FB_RTL_STRFILL2, NULL, _
  590             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  591             NULL, FB_RTL_OPT_NONE, _
  592             2, _
  593             { _
  594                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  595                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  596             } _
  597         ), _
  598         /' function fb_WstrFill2( byval cnt as const integer, byval src as const wstring ptr ) as wstring '/ _
  599         ( _
  600             @FB_RTL_WSTRFILL2, NULL, _
  601             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  602             NULL, FB_RTL_OPT_NONE, _
  603             2, _
  604             { _
  605                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  606                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  607             } _
  608         ), _
  609         /' function fb_StrLen( byref str as const any, byval str_size as const integer ) as integer '/ _
  610         ( _
  611             @FB_RTL_STRLEN, NULL, _
  612             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  613             NULL, FB_RTL_OPT_NONE, _
  614             2, _
  615             { _
  616                 ( typeSetIsConst( FB_DATATYPE_VOID ), FB_PARAMMODE_BYREF, FALSE ), _
  617                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  618             } _
  619         ), _
  620         /' function fb_WstrLen( byval str as const wstring ptr ) as integer '/ _
  621         ( _
  622             @FB_RTL_WSTRLEN, NULL, _
  623             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  624             NULL, FB_RTL_OPT_NONE, _
  625             1, _
  626             { _
  627                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  628             } _
  629         ), _
  630         /' sub fb_StrLset( byref dst as string, byref src as const string ) '/ _
  631         ( _
  632             @FB_RTL_STRLSET, NULL, _
  633             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
  634             NULL, FB_RTL_OPT_NONE, _
  635             2, _
  636             { _
  637                 ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
  638                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  639             } _
  640         ), _
  641         /' sub fb_WstrLset( byval dst as wstring ptr, byval src as const wstring ptr ) '/ _
  642         ( _
  643             @FB_RTL_WSTRLSET, NULL, _
  644             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
  645             NULL, FB_RTL_OPT_NONE, _
  646             2, _
  647             { _
  648                 ( typeAddrOf( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
  649                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  650             } _
  651         ), _
  652         /' sub fb_StrRset overload( byref dst as string, byref src as const string ) '/ _
  653         ( _
  654             @FB_RTL_STRRSET, NULL, _
  655             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
  656             NULL, FB_RTL_OPT_OVER, _
  657             2, _
  658             { _
  659                 ( FB_DATATYPE_STRING, FB_PARAMMODE_BYREF, FALSE ), _
  660                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  661             } _
  662         ), _
  663         /' sub fb_WstrRset( byval dst as wstring ptr, byval src as const wstring ptr ) '/ _
  664         ( _
  665             @FB_RTL_WSTRRSET, NULL, _
  666             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
  667             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
  668             2, _
  669             { _
  670                 ( typeAddrOf( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
  671                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  672             } _
  673         ), _
  674         /' function fb_ASC( byref str as const string, byval pos as const integer = 0 ) as ulong '/ _
  675         ( _
  676             @FB_RTL_STRASC, NULL, _
  677             FB_DATATYPE_ULONG, FB_FUNCMODE_FBCALL, _
  678             NULL, FB_RTL_OPT_NONE, _
  679             2, _
  680             { _
  681                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  682                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, TRUE, 0 ) _
  683             } _
  684         ), _
  685         /' function fb_WstrAsc( byval str as const wstring ptr, byval pos as const integer = 0 ) as ulong '/ _
  686         ( _
  687             @FB_RTL_WSTRASC, NULL, _
  688             FB_DATATYPE_ULONG, FB_FUNCMODE_FBCALL, _
  689             NULL, FB_RTL_OPT_NONE, _
  690             2, _
  691             { _
  692                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  693                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, TRUE, 0 ) _
  694             } _
  695         ), _
  696         /' function fb_CHR cdecl( byval args as const long, ... ) as string '/ _
  697         ( _
  698             @FB_RTL_STRCHR, NULL, _
  699             FB_DATATYPE_STRING, FB_FUNCMODE_CDECL, _
  700             NULL, FB_RTL_OPT_NONE, _
  701             2, _
  702             { _
  703                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ), _
  704                 ( FB_DATATYPE_INVALID, FB_PARAMMODE_VARARG, FALSE ) _
  705             } _
  706         ), _
  707         /' function fb_WstrChr cdecl( byval args as const long, ... ) as wstring '/ _
  708         ( _
  709             @FB_RTL_WSTRCHR, NULL, _
  710             FB_DATATYPE_WCHAR, FB_FUNCMODE_CDECL, _
  711             NULL, FB_RTL_OPT_NONE, _
  712             2, _
  713             { _
  714                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ), _
  715                 ( FB_DATATYPE_INVALID, FB_PARAMMODE_VARARG, FALSE ) _
  716             } _
  717         ), _
  718         /' function fb_StrInstr( byval start as const integer, byref src as const string, _
  719                 byref patt as const string ) as integer '/ _
  720         ( _
  721             @FB_RTL_STRINSTR, NULL, _
  722             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  723             NULL, FB_RTL_OPT_NONE, _
  724             3, _
  725             { _
  726                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  727                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  728                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  729             } _
  730         ), _
  731         /' function fb_WstrInstr( byval start as const integer, byval src as const wstring ptr, _
  732                 byval patt as const wstring ptr ) as integer '/ _
  733         ( _
  734             @FB_RTL_WSTRINSTR, NULL, _
  735             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  736             NULL, FB_RTL_OPT_NONE, _
  737             3, _
  738             { _
  739                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  740                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  741                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  742             } _
  743         ), _
  744         /' function fb_StrInstrAny( byval start as const integer, byref src as const string, _
  745                 byref pattern as const string ) as integer '/ _
  746         ( _
  747             @FB_RTL_STRINSTRANY, NULL, _
  748             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  749             NULL, FB_RTL_OPT_NONE, _
  750             3, _
  751             { _
  752                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  753                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  754                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  755             } _
  756         ), _
  757         /' function fb_WstrInstrAny( byval start as const integer, byval src as const wstring ptr, _
  758                 byval pattern as const wstring ptr ) as integer '/ _
  759         ( _
  760             @FB_RTL_WSTRINSTRANY, NULL, _
  761             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  762             NULL, FB_RTL_OPT_NONE, _
  763             3, _
  764             { _
  765                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
  766                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  767                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  768             } _
  769         ), _
  770         /' function fb_StrInstrRev( byref src as const string, byref patt as const string, _
  771                 byval start as const integer ) as integer '/ _
  772         ( _
  773             @FB_RTL_STRINSTRREV, NULL, _
  774             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  775             NULL, FB_RTL_OPT_NONE, _
  776             3, _
  777             { _
  778                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  779                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  780                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  781             } _
  782         ), _
  783         /' function fb_WstrInstrRev( byval src as const wstring ptr, byval patt as const wstring ptr, _
  784                 byval start as const integer ) as integer '/ _
  785         ( _
  786             @FB_RTL_WSTRINSTRREV, NULL, _
  787             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  788             NULL, FB_RTL_OPT_NONE, _
  789             3, _
  790             { _
  791                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  792                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  793                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  794             } _
  795         ), _
  796         /' function fb_StrInstrRevAny( byref src as const string, byref patt as const string, _
  797                 byval start as const integer ) as integer '/ _
  798         ( _
  799             @FB_RTL_STRINSTRREVANY, NULL, _
  800             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  801             NULL, FB_RTL_OPT_NONE, _
  802             3, _
  803             { _
  804                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  805                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  806                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  807             } _
  808         ), _
  809         /' function fb_WstrInstrRevAny( byval src as const wstring ptr, byval patt as const wstring ptr, _
  810                 byval start as const integer ) as integer '/ _
  811         ( _
  812             @FB_RTL_WSTRINSTRREVANY, NULL, _
  813             FB_DATATYPE_INTEGER, FB_FUNCMODE_FBCALL, _
  814             NULL, FB_RTL_OPT_NONE, _
  815             3, _
  816             { _
  817                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  818                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  819                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
  820             } _
  821         ), _
  822         /' function fb_TRIM( byref str as const string ) as string '/ _
  823         ( _
  824             @FB_RTL_STRTRIM, NULL, _
  825             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  826             NULL, FB_RTL_OPT_NONE, _
  827             1, _
  828             { _
  829                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  830             } _
  831         ), _
  832         /' function fb_WstrTrim( byval str as const wstring ptr ) as wstring '/ _
  833         ( _
  834             @FB_RTL_WSTRTRIM, NULL, _
  835             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  836             NULL, FB_RTL_OPT_NONE, _
  837             1, _
  838             { _
  839                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  840             } _
  841         ), _
  842         /' function fb_TrimAny( byref str as const string, byref pattern as const string ) as string '/ _
  843         ( _
  844             @FB_RTL_STRTRIMANY, NULL, _
  845             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  846             NULL, FB_RTL_OPT_NONE, _
  847             2, _
  848             { _
  849                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  850                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  851             } _
  852         ), _
  853         /' function fb_WstrTrimAny( byval str as const wstring ptr, byval pattern as const wstring ptr ) as wstring '/ _
  854         ( _
  855             @FB_RTL_WSTRTRIMANY, NULL, _
  856             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  857             NULL, FB_RTL_OPT_NONE, _
  858             2, _
  859             { _
  860                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  861                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  862             } _
  863         ), _
  864         /' function fb_TrimEx( byref str as const string, byref pattern as const string ) as string '/ _
  865         ( _
  866             @FB_RTL_STRTRIMEX, NULL, _
  867             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  868             NULL, FB_RTL_OPT_NONE, _
  869             2, _
  870             { _
  871                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  872                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  873             } _
  874         ), _
  875         /' function fb_WstrTrimEx( byval str as const wstring ptr, byval pattern as const wstring ptr ) as wstring '/ _
  876         ( _
  877             @FB_RTL_WSTRTRIMEX, NULL, _
  878             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  879             NULL, FB_RTL_OPT_NONE, _
  880             2, _
  881             { _
  882                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  883                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  884             } _
  885         ), _
  886         /' function fb_RTRIM( byref str as const string ) as string '/ _
  887         ( _
  888             @FB_RTL_STRRTRIM, NULL, _
  889             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  890             NULL, FB_RTL_OPT_NONE, _
  891             1, _
  892             { _
  893                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  894             } _
  895         ), _
  896         /' function fb_WstrRTrim( byval str as const wstring ptr ) as wstring '/ _
  897         ( _
  898             @FB_RTL_WSTRRTRIM, NULL, _
  899             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  900             NULL, FB_RTL_OPT_NONE, _
  901             1, _
  902             { _
  903                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  904             } _
  905         ), _
  906         /' function fb_RTrimAny( byref str as const string, byref pattern as const string ) as string '/ _
  907         ( _
  908             @FB_RTL_STRRTRIMANY, NULL, _
  909             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  910             NULL, FB_RTL_OPT_NONE, _
  911             2, _
  912             { _
  913                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  914                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  915             } _
  916         ), _
  917         /' function fb_WstrRTrimAny( byval str as const wstring ptr, byval pattern as const wstring ptr ) as wstring '/ _
  918         ( _
  919             @FB_RTL_WSTRRTRIMANY, NULL, _
  920             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  921             NULL, FB_RTL_OPT_NONE, _
  922             2, _
  923             { _
  924                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  925                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  926             } _
  927         ), _
  928         /' function fb_RTrimEx( byref str as const string, byref pattern as const string ) as string '/ _
  929         ( _
  930             @FB_RTL_STRRTRIMEX, NULL, _
  931             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  932             NULL, FB_RTL_OPT_NONE, _
  933             2, _
  934             { _
  935                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  936                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  937             } _
  938         ), _
  939         /' function fb_WstrRTrimEx( byval str as const wstring ptr, byval pattern as const wstring ptr ) as wstring '/ _
  940         ( _
  941             @FB_RTL_WSTRRTRIMEX, NULL, _
  942             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  943             NULL, FB_RTL_OPT_NONE, _
  944             2, _
  945             { _
  946                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  947                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  948             } _
  949         ), _
  950         /' function fb_LTRIM( byref str as const string ) as string '/ _
  951         ( _
  952             @FB_RTL_STRLTRIM, NULL, _
  953             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  954             NULL, FB_RTL_OPT_NONE, _
  955             1, _
  956             { _
  957                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  958             } _
  959         ), _
  960         /' function fb_WstrLTrim( byval str as const wstring ptr ) as wstring '/ _
  961         ( _
  962             @FB_RTL_WSTRLTRIM, NULL, _
  963             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  964             NULL, FB_RTL_OPT_NONE, _
  965             1, _
  966             { _
  967                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  968             } _
  969         ), _
  970         /' function fb_LTrimAny( byref str as const string, byref pattern as const string ) as string '/ _
  971         ( _
  972             @FB_RTL_STRLTRIMANY, NULL, _
  973             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  974             NULL, FB_RTL_OPT_NONE, _
  975             2, _
  976             { _
  977                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
  978                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
  979             } _
  980         ), _
  981         /' function fb_WstrLTrimAny( byval str as const wstring ptr, byval pattern as const wstring ptr ) as wstring '/ _
  982         ( _
  983             @FB_RTL_WSTRLTRIMANY, NULL, _
  984             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
  985             NULL, FB_RTL_OPT_NONE, _
  986             2, _
  987             { _
  988                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
  989                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
  990             } _
  991         ), _
  992         /' function fb_LTrimEx( byref str as const string, byref pattern as const string ) as string '/ _
  993         ( _
  994             @FB_RTL_STRLTRIMEX, NULL, _
  995             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
  996             NULL, FB_RTL_OPT_NONE, _
  997             2, _
  998             { _
  999                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
 1000                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1001             } _
 1002         ), _
 1003         /' function fb_WstrLTrimEx( byval str as const wstring ptr, byval pattern as const wstring ptr ) as wstring '/ _
 1004         ( _
 1005             @FB_RTL_WSTRLTRIMEX, NULL, _
 1006             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1007             NULL, FB_RTL_OPT_NONE, _
 1008             2, _
 1009             { _
 1010                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ), _
 1011                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_WCHAR ) ), FB_PARAMMODE_BYVAL, FALSE ) _
 1012             } _
 1013         ), _
 1014         /' sub fb_StrSwap( byref str1 as any, byval size1 as const integer, byval fillrem1 as const long, _
 1015                    byref str2 as any, byval size2 as const integer, byval fillrem2 as const long ) '/ _
 1016         ( _
 1017             @FB_RTL_STRSWAP, NULL, _
 1018             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
 1019             NULL, FB_RTL_OPT_NONE, _
 1020             6, _
 1021             { _
 1022                 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
 1023                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
 1024                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ), _
 1025                 ( FB_DATATYPE_VOID, FB_PARAMMODE_BYREF, FALSE ), _
 1026                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
 1027                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1028             } _
 1029         ), _
 1030         /' sub fb_WstrSwap( byval str1 as wstring ptr, byval size1 as const integer, _
 1031                     byval str2 as wstring ptr, byval size2 as const integer ) '/ _
 1032         ( _
 1033             @FB_RTL_WSTRSWAP, NULL, _
 1034             FB_DATATYPE_VOID, FB_FUNCMODE_FBCALL, _
 1035             NULL, FB_RTL_OPT_NONE, _
 1036             4, _
 1037             { _
 1038                 ( typeAddrOf( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
 1039                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ), _
 1040                 ( typeAddrOf( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYVAL, FALSE ), _
 1041                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
 1042             } _
 1043         ), _
 1044         /' function val overload( byref str as const string ) as double '/ _
 1045         ( _
 1046             @FB_RTL_STR2DBL, @"fb_VAL", _
 1047             FB_DATATYPE_DOUBLE, FB_FUNCMODE_FBCALL, _
 1048             NULL, FB_RTL_OPT_OVER, _
 1049             1, _
 1050             { _
 1051                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1052             } _
 1053         ), _
 1054         /' function val overload( byref str as const wstring ) as double '/ _
 1055         ( _
 1056             @FB_RTL_STR2DBL, @"fb_WstrVal", _
 1057             FB_DATATYPE_DOUBLE, FB_FUNCMODE_FBCALL, _
 1058             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1059             1, _
 1060             { _
 1061                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ) _
 1062             } _
 1063         ), _
 1064         /' function valbool overload( byref str as const string ) as boolean '/ _
 1065         ( _
 1066             @FB_RTL_STR2BOOL, NULL, _
 1067             FB_DATATYPE_BOOLEAN, FB_FUNCMODE_FBCALL, _
 1068             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1069             1, _
 1070             { _
 1071                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1072             } _
 1073         ), _
 1074         /' function valbool overload( byref str as const wstring ) as boolean '/ _
 1075         ( _
 1076             @FB_RTL_STR2BOOL, @"fb_WstrValBool", _
 1077             FB_DATATYPE_BOOLEAN, FB_FUNCMODE_FBCALL, _
 1078             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1079             1, _
 1080             { _
 1081                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ) _
 1082             } _
 1083         ), _
 1084         /' function valint overload( byref str as const string ) as long '/ _
 1085         ( _
 1086             @FB_RTL_STR2INT, @"fb_VALINT", _
 1087             FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
 1088             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1089             1, _
 1090             { _
 1091                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1092             } _
 1093         ), _
 1094         /' function valint overload( byref str as const wstring ) as long '/ _
 1095         ( _
 1096             @FB_RTL_STR2INT, @"fb_WstrValInt", _
 1097             FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
 1098             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1099             1, _
 1100             { _
 1101                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ) _
 1102             } _
 1103         ), _
 1104         /' function valuint overload( byref str as const string ) as ulong '/ _
 1105         ( _
 1106             @FB_RTL_STR2UINT, @"fb_VALUINT", _
 1107             FB_DATATYPE_ULONG, FB_FUNCMODE_FBCALL, _
 1108             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1109             1, _
 1110             { _
 1111                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1112             } _
 1113         ), _
 1114         /' function valuint overload( byref str as const wstring ) as ulong '/ _
 1115         ( _
 1116             @FB_RTL_STR2UINT, @"fb_WstrValUInt", _
 1117             FB_DATATYPE_ULONG, FB_FUNCMODE_FBCALL, _
 1118             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1119             1, _
 1120             { _
 1121                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ) _
 1122             } _
 1123         ), _
 1124         /' function vallng overload( byref str as const string ) as longint '/ _
 1125         ( _
 1126             @FB_RTL_STR2LNG, @"fb_VALLNG", _
 1127             FB_DATATYPE_LONGINT, FB_FUNCMODE_FBCALL, _
 1128             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1129             1, _
 1130             { _
 1131                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1132             } _
 1133         ), _
 1134         /' function vallng overload( byref str as const wstring ) as longint '/ _
 1135         ( _
 1136             @FB_RTL_STR2LNG, @"fb_WstrValLng", _
 1137             FB_DATATYPE_LONGINT, FB_FUNCMODE_FBCALL, _
 1138             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1139             1, _
 1140             { _
 1141                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ) _
 1142             } _
 1143         ), _
 1144         /' function valulng overload( byref str as const string ) as ulongint '/ _
 1145         ( _
 1146             @FB_RTL_STR2ULNG, @"fb_VALULNG", _
 1147             FB_DATATYPE_ULONGINT, FB_FUNCMODE_FBCALL, _
 1148             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1149             1, _
 1150             { _
 1151                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1152             } _
 1153         ), _
 1154         /' function valulng overload( byref str as const wstring ) as ulongint '/ _
 1155         ( _
 1156             @FB_RTL_STR2ULNG, @"fb_WstrValULng", _
 1157             FB_DATATYPE_ULONGINT, FB_FUNCMODE_FBCALL, _
 1158             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1159             1, _
 1160             { _
 1161                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ) _
 1162             } _
 1163         ), _
 1164         /' function hex overload( byval number as const ubyte ) as string '/ _
 1165         ( _
 1166             @"hex", @"fb_HEX_b", _
 1167             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1168             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1169             1, _
 1170             { _
 1171                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ) _
 1172             } _
 1173         ), _
 1174         /' function hex overload( byval number as const ushort ) as string '/ _
 1175         ( _
 1176             @"hex", @"fb_HEX_s", _
 1177             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1178             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1179             1, _
 1180             { _
 1181                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1182             } _
 1183         ), _
 1184         /' function hex overload( byval number as const ulong ) as string '/ _
 1185         ( _
 1186             @"hex", @"fb_HEX_i", _
 1187             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1188             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1189             1, _
 1190             { _
 1191                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1192             } _
 1193         ), _
 1194         /' function hex overload( byval number as const ulongint ) as string '/ _
 1195         ( _
 1196             @"hex", @"fb_HEX_l", _
 1197             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1198             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1199             1, _
 1200             { _
 1201                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1202             } _
 1203         ), _
 1204         /' function hex overload( byval number as const any ptr ) as string '/ _
 1205         ( _
 1206             @"hex", @"fb_HEX_p", _
 1207             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1208             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1209             1, _
 1210             { _
 1211                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ) _
 1212             } _
 1213         ), _
 1214         /' function hex overload( byval number as const ubyte, byval digits as const long ) as string '/ _
 1215         ( _
 1216             @"hex", @"fb_HEXEx_b", _
 1217             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1218             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1219             2, _
 1220             { _
 1221                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
 1222                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1223             } _
 1224         ), _
 1225         /' function hex overload( byval number as const ushort, byval digits as const long ) as string '/ _
 1226         ( _
 1227             @"hex", @"fb_HEXEx_s", _
 1228             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1229             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1230             2, _
 1231             { _
 1232                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1233                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1234             } _
 1235         ), _
 1236         /' function hex overload( byval number as const ulong, byval digits as const long ) as string '/ _
 1237         ( _
 1238             @"hex", @"fb_HEXEx_i", _
 1239             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1240             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1241             2, _
 1242             { _
 1243                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ), _
 1244                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1245             } _
 1246         ), _
 1247         /' function hex overload( byval number as const ulongint, byval digits as const long ) as string '/ _
 1248         ( _
 1249             @"hex", @"fb_HEXEx_l", _
 1250             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1251             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1252             2, _
 1253             { _
 1254                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1255                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1256             } _
 1257         ), _
 1258         /' function hex overload( byval number as const any ptr, byval digits as const long ) as string '/ _
 1259         ( _
 1260             @"hex", @"fb_HEXEx_p", _
 1261             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1262             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1263             2, _
 1264             { _
 1265                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ), _
 1266                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1267             } _
 1268         ), _
 1269         /' function whex overload( byval number as const ubyte ) as wstring '/ _
 1270         ( _
 1271             @"whex", @"fb_WstrHex_b", _
 1272             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1273             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1274             1, _
 1275             { _
 1276                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ) _
 1277             } _
 1278         ), _
 1279         /' function whex overload( byval number as const ushort ) as wstring '/ _
 1280         ( _
 1281             @"whex", @"fb_WstrHex_s", _
 1282             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1283             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1284             1, _
 1285             { _
 1286                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1287             } _
 1288         ), _
 1289         /' function whex overload( byval number as const ulong ) as wstring '/ _
 1290         ( _
 1291             @"whex", @"fb_WstrHex_i", _
 1292             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1293             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1294             1, _
 1295             { _
 1296                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1297             } _
 1298         ), _
 1299         /' function whex overload( byval number as const ulongint ) as wstring '/ _
 1300         ( _
 1301             @"whex", @"fb_WstrHex_l", _
 1302             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1303             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1304             1, _
 1305             { _
 1306                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1307             } _
 1308         ), _
 1309         /' function whex overload( byval number as const any ptr ) as wstring '/ _
 1310         ( _
 1311             @"whex", @"fb_WstrHex_p", _
 1312             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1313             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1314             1, _
 1315             { _
 1316                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ) _
 1317             } _
 1318         ), _
 1319         /' function whex overload( byval number as const ubyte, byval digits as const long ) as wstring '/ _
 1320         ( _
 1321             @"whex", @"fb_WstrHexEx_b", _
 1322             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1323             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1324             2, _
 1325             { _
 1326                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
 1327                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1328             } _
 1329         ), _
 1330         /' function whex overload( byval number as const ushort, byval digits as const long ) as wstring '/ _
 1331         ( _
 1332             @"whex", @"fb_WstrHexEx_s", _
 1333             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1334             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1335             2, _
 1336             { _
 1337                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1338                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1339             } _
 1340         ), _
 1341         /' function whex overload( byval number as const ulong, byval digits as const long ) as wstring '/ _
 1342         ( _
 1343             @"whex", @"fb_WstrHexEx_i", _
 1344             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1345             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1346             2, _
 1347             { _
 1348                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ), _
 1349                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1350             } _
 1351         ), _
 1352         /' function whex overload( byval number as const ulongint, byval digits as const long ) as wstring '/ _
 1353         ( _
 1354             @"whex", @"fb_WstrHexEx_l", _
 1355             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1356             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1357             2, _
 1358             { _
 1359                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1360                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1361             } _
 1362         ), _
 1363         /' function whex overload( byval number as const any ptr, byval digits as const long ) as wstring '/ _
 1364         ( _
 1365             @"whex", @"fb_WstrHexEx_p", _
 1366             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1367             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1368             2, _
 1369             { _
 1370                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ), _
 1371                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1372             } _
 1373         ), _
 1374         /' function oct overload( byval number as const ubyte ) as string '/ _
 1375         ( _
 1376             @"oct", @"fb_OCT_b", _
 1377             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1378             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1379             1, _
 1380             { _
 1381                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ) _
 1382             } _
 1383         ), _
 1384         /' function oct overload( byval number as const ushort ) as string '/ _
 1385         ( _
 1386             @"oct", @"fb_OCT_s", _
 1387             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1388             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1389             1, _
 1390             { _
 1391                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1392             } _
 1393         ), _
 1394         /' function oct overload( byval number as const ulong ) as string '/ _
 1395         ( _
 1396             @"oct", @"fb_OCT_i", _
 1397             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1398             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1399             1, _
 1400             { _
 1401                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1402             } _
 1403         ), _
 1404         /' function oct overload( byval number as const ulongint ) as string '/ _
 1405         ( _
 1406             @"oct", @"fb_OCT_l", _
 1407             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1408             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1409             1, _
 1410             { _
 1411                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1412             } _
 1413         ), _
 1414         /' function oct overload( byval number as const any ptr ) as string '/ _
 1415         ( _
 1416             @"oct", @"fb_OCT_p", _
 1417             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1418             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1419             1, _
 1420             { _
 1421                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ) _
 1422             } _
 1423         ), _
 1424         /' function oct overload( byval number as const ubyte, byval digits as const long ) as string '/ _
 1425         ( _
 1426             @"oct", @"fb_OCTEx_b", _
 1427             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1428             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1429             2, _
 1430             { _
 1431                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
 1432                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1433             } _
 1434         ), _
 1435         /' function oct overload( byval number as const ushort, byval digits as const long ) as string '/ _
 1436         ( _
 1437             @"oct", @"fb_OCTEx_s", _
 1438             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1439             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1440             2, _
 1441             { _
 1442                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1443                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1444             } _
 1445         ), _
 1446         /' function oct overload( byval number as const ulong, byval digits as const long ) as string '/ _
 1447         ( _
 1448             @"oct", @"fb_OCTEx_i", _
 1449             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1450             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1451             2, _
 1452             { _
 1453                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ), _
 1454                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1455             } _
 1456         ), _
 1457         /' function oct overload( byval number as const ulongint, byval digits as const long ) as string '/ _
 1458         ( _
 1459             @"oct", @"fb_OCTEx_l", _
 1460             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1461             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1462             2, _
 1463             { _
 1464                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1465                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1466             } _
 1467         ), _
 1468         /' function oct overload( byval number as const any ptr, byval digits as const long ) as string '/ _
 1469         ( _
 1470             @"oct", @"fb_OCTEx_p", _
 1471             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1472             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1473             2, _
 1474             { _
 1475                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ), _
 1476                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1477             } _
 1478         ), _
 1479         /' function woct overload( byval number as const ubyte ) as wstring '/ _
 1480         ( _
 1481             @"woct", @"fb_WstrOct_b", _
 1482             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1483             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1484             1, _
 1485             { _
 1486                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ) _
 1487             } _
 1488         ), _
 1489         /' function woct overload( byval number as const ushort ) as wstring '/ _
 1490         ( _
 1491             @"woct", @"fb_WstrOct_s", _
 1492             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1493             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1494             1, _
 1495             { _
 1496                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1497             } _
 1498         ), _
 1499         /' function woct overload( byval number as const ulong ) as wstring '/ _
 1500         ( _
 1501             @"woct", @"fb_WstrOct_i", _
 1502             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1503             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1504             1, _
 1505             { _
 1506                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1507             } _
 1508         ), _
 1509         /' function woct overload( byval number as const ulongint ) as wstring '/ _
 1510         ( _
 1511             @"woct", @"fb_WstrOct_l", _
 1512             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1513             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1514             1, _
 1515             { _
 1516                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1517             } _
 1518         ), _
 1519         /' function woct overload( byval number as const any ptr ) as wstring '/ _
 1520         ( _
 1521             @"woct", @"fb_WstrOct_p", _
 1522             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1523             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1524             1, _
 1525             { _
 1526                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ) _
 1527             } _
 1528         ), _
 1529         /' function woct overload( byval number as const ubyte, byval digits as const long ) as wstring '/ _
 1530         ( _
 1531             @"woct", @"fb_WstrOctEx_b", _
 1532             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1533             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1534             2, _
 1535             { _
 1536                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
 1537                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1538             } _
 1539         ), _
 1540         /' function woct overload( byval number as const ushort, byval digits as const long ) as wstring '/ _
 1541         ( _
 1542             @"woct", @"fb_WstrOctEx_s", _
 1543             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1544             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1545             2, _
 1546             { _
 1547                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1548                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1549             } _
 1550         ), _
 1551         /' function woct overload( byval number as const ulong, byval digits as const long ) as wstring '/ _
 1552         ( _
 1553             @"woct", @"fb_WstrOctEx_i", _
 1554             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1555             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1556             2, _
 1557             { _
 1558                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ), _
 1559                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1560             } _
 1561         ), _
 1562         /' function woct overload( byval number as const ulongint, byval digits as const long ) as wstring '/ _
 1563         ( _
 1564             @"woct", @"fb_WstrOctEx_l", _
 1565             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1566             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1567             2, _
 1568             { _
 1569                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1570                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1571             } _
 1572         ), _
 1573         /' function woct overload( byval number as const any ptr, byval digits as const long ) as wstring '/ _
 1574         ( _
 1575             @"woct", @"fb_WstrOctEx_p", _
 1576             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1577             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1578             2, _
 1579             { _
 1580                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ), _
 1581                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1582             } _
 1583         ), _
 1584         /' function bin overload( byval number as const ubyte ) as string '/ _
 1585         ( _
 1586             @"bin", @"fb_BIN_b", _
 1587             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1588             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1589             1, _
 1590             { _
 1591                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ) _
 1592             } _
 1593         ), _
 1594         /' function bin overload( byval number as const ushort ) as string '/ _
 1595         ( _
 1596             @"bin", @"fb_BIN_s", _
 1597             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1598             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1599             1, _
 1600             { _
 1601                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1602             } _
 1603         ), _
 1604         /' function bin overload( byval number as const ulong ) as string '/ _
 1605         ( _
 1606             @"bin", @"fb_BIN_i", _
 1607             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1608             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1609             1, _
 1610             { _
 1611                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1612             } _
 1613         ), _
 1614         /' function bin overload( byval number as const ulongint ) as string '/ _
 1615         ( _
 1616             @"bin", @"fb_BIN_l", _
 1617             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1618             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1619             1, _
 1620             { _
 1621                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1622             } _
 1623         ), _
 1624         /' function bin overload( byval number as const any ptr ) as string '/ _
 1625         ( _
 1626             @"bin", @"fb_BIN_p", _
 1627             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1628             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1629             1, _
 1630             { _
 1631                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ) _
 1632             } _
 1633         ), _
 1634         /' function bin overload( byval number as const ubyte, byval digits as const long ) as string '/ _
 1635         ( _
 1636             @"bin", @"fb_BINEx_b", _
 1637             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1638             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1639             2, _
 1640             { _
 1641                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
 1642                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1643             } _
 1644         ), _
 1645         /' function bin overload( byval number as const ushort, byval digits as const long ) as string '/ _
 1646         ( _
 1647             @"bin", @"fb_BINEx_s", _
 1648             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1649             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1650             2, _
 1651             { _
 1652                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1653                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1654             } _
 1655         ), _
 1656         /' function bin overload( byval number as const ulong, byval digits as const long ) as string '/ _
 1657         ( _
 1658             @"bin", @"fb_BINEx_i", _
 1659             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1660             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1661             2, _
 1662             { _
 1663                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ), _
 1664                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1665             } _
 1666         ), _
 1667         /' function bin overload( byval number as const ulongint, byval digits as const long ) as string '/ _
 1668         ( _
 1669             @"bin", @"fb_BINEx_l", _
 1670             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1671             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1672             2, _
 1673             { _
 1674                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1675                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1676             } _
 1677         ), _
 1678         /' function bin overload( byval number as const any ptr, byval digits as const long ) as string '/ _
 1679         ( _
 1680             @"bin", @"fb_BINEx_p", _
 1681             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1682             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1683             2, _
 1684             { _
 1685                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ), _
 1686                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1687             } _
 1688         ), _
 1689         /' function wbin overload( byval number as const ubyte ) as wstring '/ _
 1690         ( _
 1691             @"wbin", @"fb_WstrBin_b", _
 1692             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1693             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1694             1, _
 1695             { _
 1696                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ) _
 1697             } _
 1698         ), _
 1699         /' function wbin overload( byval number as const ushort ) as wstring '/ _
 1700         ( _
 1701             @"wbin", @"fb_WstrBin_s", _
 1702             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1703             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1704             1, _
 1705             { _
 1706                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1707             } _
 1708         ), _
 1709         /' function wbin overload( byval number as const ulong ) as wstring '/ _
 1710         ( _
 1711             @"wbin", @"fb_WstrBin_i", _
 1712             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1713             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1714             1, _
 1715             { _
 1716                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1717             } _
 1718         ), _
 1719         /' function wbin overload( byval number as const ulongint ) as wstring '/ _
 1720         ( _
 1721             @"wbin", @"fb_WstrBin_l", _
 1722             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1723             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1724             1, _
 1725             { _
 1726                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1727             } _
 1728         ), _
 1729         /' function wbin overload( byval number as const any ptr ) as wstring '/ _
 1730         ( _
 1731             @"wbin", @"fb_WstrBin_p", _
 1732             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1733             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1734             1, _
 1735             { _
 1736                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ) _
 1737             } _
 1738         ), _
 1739         /' function wbin overload( byval number as const ubyte, byval digits as const long ) as wstring '/ _
 1740         ( _
 1741             @"wbin", @"fb_WstrBinEx_b", _
 1742             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1743             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1744             2, _
 1745             { _
 1746                 ( typeSetIsConst( FB_DATATYPE_UBYTE ), FB_PARAMMODE_BYVAL, FALSE ), _
 1747                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1748             } _
 1749         ), _
 1750         /' function wbin overload( byval number as const ushort, byval digits as const long ) as wstring '/ _
 1751         ( _
 1752             @"wbin", @"fb_WstrBinEx_s", _
 1753             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1754             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1755             2, _
 1756             { _
 1757                 ( typeSetIsConst( FB_DATATYPE_USHORT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1758                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1759             } _
 1760         ), _
 1761         /' function wbin overload( byval number as const ulong, byval digits as const long ) as wstring '/ _
 1762         ( _
 1763             @"wbin", @"fb_WstrBinEx_i", _
 1764             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1765             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1766             2, _
 1767             { _
 1768                 ( typeSetIsConst( FB_DATATYPE_ULONG ), FB_PARAMMODE_BYVAL, FALSE ), _
 1769                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1770             } _
 1771         ), _
 1772         /' function wbin overload( byval number as const ulongint, byval digits as const long ) as wstring '/ _
 1773         ( _
 1774             @"wbin", @"fb_WstrBinEx_l", _
 1775             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1776             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1777             2, _
 1778             { _
 1779                 ( typeSetIsConst( FB_DATATYPE_ULONGINT ), FB_PARAMMODE_BYVAL, FALSE ), _
 1780                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1781             } _
 1782         ), _
 1783         /' function wbin overload( byval number as const any ptr, byval digits as const long ) as wstring '/ _
 1784         ( _
 1785             @"wbin", @"fb_WstrBinEx_p", _
 1786             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1787             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1788             2, _
 1789             { _
 1790                 ( typeAddrOf( typeSetIsConst( FB_DATATYPE_VOID ) ), FB_PARAMMODE_BYVAL, FALSE, 0, TRUE ), _
 1791                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1792             } _
 1793         ), _
 1794         /' function fb_MKD( byval number as const double ) as string '/ _
 1795         ( _
 1796             @FB_RTL_MKD, NULL, _
 1797             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1798             NULL, FB_RTL_OPT_NONE, _
 1799             1, _
 1800             { _
 1801                 ( typeSetIsConst( FB_DATATYPE_DOUBLE ), FB_PARAMMODE_BYVAL, FALSE ) _
 1802             } _
 1803         ), _
 1804         /' function fb_MKS( byval number as const single ) as string '/ _
 1805         ( _
 1806             @FB_RTL_MKS, NULL, _
 1807             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1808             NULL, FB_RTL_OPT_NONE, _
 1809             1, _
 1810             { _
 1811                 ( typeSetIsConst( FB_DATATYPE_SINGLE ), FB_PARAMMODE_BYVAL, FALSE ) _
 1812             } _
 1813         ), _
 1814         /' function fb_MKSHORT( byval number as const short ) as string '/ _
 1815         ( _
 1816             @FB_RTL_MKSHORT, NULL, _
 1817             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1818             NULL, FB_RTL_OPT_NOQB, _
 1819             1, _
 1820             { _
 1821                 ( typeSetIsConst( FB_DATATYPE_SHORT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1822             } _
 1823         ), _
 1824         /' function fb_MKI( byval number as const integer ) as string '/ _
 1825         ( _
 1826             @FB_RTL_MKI, NULL, _
 1827             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1828             NULL, FB_RTL_OPT_NONE, _
 1829             1, _
 1830             { _
 1831                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
 1832             } _
 1833         ), _
 1834         /' function fb_MKL( byval number as const long ) as string '/ _
 1835         ( _
 1836             @FB_RTL_MKL, NULL, _
 1837             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1838             NULL, FB_RTL_OPT_NONE, _
 1839             1, _
 1840             { _
 1841                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 1842             } _
 1843         ), _
 1844         /' function fb_MKLONGINT( byval number as const longint ) as string '/ _
 1845         ( _
 1846             @FB_RTL_MKLONGINT, NULL, _
 1847             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1848             NULL, FB_RTL_OPT_NOQB, _
 1849             1, _
 1850             { _
 1851                 ( typeSetIsConst( FB_DATATYPE_LONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
 1852             } _
 1853         ), _
 1854         /' function left overload( byref str as const string, byval chars as const integer ) as string '/ _
 1855         ( _
 1856             @"left", @"fb_LEFT", _
 1857             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1858             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1859             2, _
 1860             { _
 1861                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
 1862                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
 1863             } _
 1864         ), _
 1865         /' function left overload( byref str as const wstring, byval chars as const integer ) as wstring '/ _
 1866         ( _
 1867             @"left", @"fb_WstrLeft", _
 1868             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1869             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1870             2, _
 1871             { _
 1872                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ), _
 1873                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
 1874             } _
 1875         ), _
 1876         /' function right overload( byref str as const string, byval chars as const integer ) as string '/ _
 1877         ( _
 1878             @"right", @"fb_RIGHT", _
 1879             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1880             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_STRSUFFIX, _
 1881             2, _
 1882             { _
 1883                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
 1884                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
 1885             } _
 1886         ), _
 1887         /' function right overload( byref str as const wstring, byval chars as const integer ) as wstring '/ _
 1888         ( _
 1889             @"right", @"fb_WstrRight", _
 1890             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1891             NULL, FB_RTL_OPT_OVER or FB_RTL_OPT_NOQB, _
 1892             2, _
 1893             { _
 1894                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ), _
 1895                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
 1896             } _
 1897         ), _
 1898         /' function space( byval chars as const integer ) as string '/ _
 1899         ( _
 1900             @"space", @"fb_SPACE", _
 1901             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1902             NULL, FB_RTL_OPT_STRSUFFIX, _
 1903             1, _
 1904             { _
 1905                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
 1906             } _
 1907         ), _
 1908         /' function wspace( byval chars as const integer ) as wstring '/ _
 1909         ( _
 1910             @"wspace", @"fb_WstrSpace", _
 1911             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1912             NULL, FB_RTL_OPT_NOQB, _
 1913             1, _
 1914             { _
 1915                 ( typeSetIsConst( FB_DATATYPE_INTEGER ), FB_PARAMMODE_BYVAL, FALSE ) _
 1916             } _
 1917         ), _
 1918         /' function fb_StrLcase2( byref src as const string, byval mode as const long = 0 ) as string '/ _
 1919         ( _
 1920             @FB_RTL_STRLCASE2, NULL, _
 1921             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1922             NULL, FB_RTL_OPT_NONE, _
 1923             2, _
 1924             { _
 1925                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
 1926                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, TRUE, 0 ) _
 1927             } _
 1928         ), _
 1929         /' function fb_WstrLcase2( byref str as const wstring, byval mode as const long = 0 ) as wstring '/ _
 1930         ( _
 1931             @FB_RTL_WSTRLCASE2, NULL, _
 1932             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1933             NULL, FB_RTL_OPT_NONE, _
 1934             2, _
 1935             { _
 1936                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ), _
 1937                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, TRUE, 0 ) _
 1938             } _
 1939         ), _
 1940         /' function fb_StrUcase2( byref src as const string, byval mode as const long = 0 ) as string '/ _
 1941         ( _
 1942             @FB_RTL_STRUCASE2, NULL, _
 1943             FB_DATATYPE_STRING, FB_FUNCMODE_FBCALL, _
 1944             NULL, FB_RTL_OPT_NONE, _
 1945             2, _
 1946             { _
 1947                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ), _
 1948                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, TRUE, 0 ) _
 1949             } _
 1950         ), _
 1951         /' function fb_WstrUcase2( byref str as const wstring, byval mode as const long = 0 ) as wstring '/ _
 1952         ( _
 1953             @FB_RTL_WSTRUCASE2, NULL, _
 1954             FB_DATATYPE_WCHAR, FB_FUNCMODE_FBCALL, _
 1955             NULL, FB_RTL_OPT_NONE, _
 1956             2, _
 1957             { _
 1958                 ( typeSetIsConst( FB_DATATYPE_WCHAR ), FB_PARAMMODE_BYREF, FALSE ), _
 1959                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, TRUE, 0 ) _
 1960             } _
 1961         ), _
 1962         /' function fb_CVD( byref str as const string ) as double '/ _
 1963         ( _
 1964             @FB_RTL_CVD, @"fb_CVD", _
 1965             FB_DATATYPE_DOUBLE, FB_FUNCMODE_FBCALL, _
 1966             NULL, FB_RTL_OPT_NONE, _
 1967             1, _
 1968             { _
 1969                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1970             } _
 1971         ), _
 1972         /' function fb_CVS( byref str as const string ) as single '/ _
 1973         ( _
 1974             @FB_RTL_CVS, @"fb_CVS", _
 1975             FB_DATATYPE_SINGLE, FB_FUNCMODE_FBCALL, _
 1976             NULL, FB_RTL_OPT_NONE, _
 1977             1, _
 1978             { _
 1979                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1980             } _
 1981         ), _
 1982         /' function fb_CVSHORT( byref str as const string ) as short '/ _
 1983         ( _
 1984             @FB_RTL_CVSHORT, @"fb_CVSHORT", _
 1985             FB_DATATYPE_SHORT, FB_FUNCMODE_FBCALL, _
 1986             NULL, FB_RTL_OPT_NOQB, _
 1987             1, _
 1988             { _
 1989                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 1990             } _
 1991         ), _
 1992         /' function fb_CVL( byref str as const string ) as long '/ _
 1993         ( _
 1994             @FB_RTL_CVL, NULL, _
 1995             FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
 1996             NULL, FB_RTL_OPT_NONE, _
 1997             1, _
 1998             { _
 1999                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 2000             } _
 2001         ), _
 2002         /' function fb_CVLONGINT( byref str as const string ) as longint '/ _
 2003         ( _
 2004             @FB_RTL_CVLONGINT, @"fb_CVLONGINT", _
 2005             FB_DATATYPE_LONGINT, FB_FUNCMODE_FBCALL, _
 2006             NULL, FB_RTL_OPT_NOQB, _
 2007             1, _
 2008             { _
 2009                 ( typeSetIsConst( FB_DATATYPE_STRING ), FB_PARAMMODE_BYREF, FALSE ) _
 2010             } _
 2011         ), _
 2012         /' function fb_CVDFROMLONGINT( byval num as const longint ) as double '/ _
 2013         ( _
 2014             @FB_RTL_CVDFROMLONGINT, @"fb_CVDFROMLONGINT", _
 2015             FB_DATATYPE_DOUBLE, FB_FUNCMODE_FBCALL, _
 2016             NULL, FB_RTL_OPT_NOQB, _
 2017             1, _
 2018             { _
 2019                 ( typeSetIsConst( FB_DATATYPE_LONGINT ), FB_PARAMMODE_BYVAL, FALSE ) _
 2020             } _
 2021         ), _
 2022         /' function fb_CVSFROML( byref num as const long ) as single '/ _
 2023         ( _
 2024             @FB_RTL_CVSFROML, @"fb_CVSFROML", _
 2025             FB_DATATYPE_SINGLE, FB_FUNCMODE_FBCALL, _
 2026             NULL, FB_RTL_OPT_NOQB, _
 2027             1, _
 2028             { _
 2029                 ( typeSetIsConst( FB_DATATYPE_LONG ), FB_PARAMMODE_BYVAL, FALSE ) _
 2030             } _
 2031         ), _
 2032         /' function fb_CVLFROMS( byval num as const single ) as long '/ _
 2033         ( _
 2034             @FB_RTL_CVLFROMS, @"fb_CVLFROMS", _
 2035             FB_DATATYPE_LONG, FB_FUNCMODE_FBCALL, _
 2036             NULL, FB_RTL_OPT_NOQB, _
 2037             1, _
 2038             { _
 2039                 ( typeSetIsConst( FB_DATATYPE_SINGLE ), FB_PARAMMODE_BYVAL, FALSE ) _
 2040             } _
 2041         ), _
 2042         /' function fb_CVLONGINTFROMD( byval num as const double ) as longint '/ _
 2043         ( _
 2044             @FB_RTL_CVLONGINTFROMD, @"fb_CVLONGINTFROMD", _
 2045             FB_DATATYPE_LONGINT, FB_FUNCMODE_FBCALL, _
 2046             NULL, FB_RTL_OPT_NOQB, _
 2047             1, _
 2048             { _
 2049                 ( typeSetIsConst( FB_DATATYPE_DOUBLE ), FB_PARAMMODE_BYVAL, FALSE ) _
 2050             } _
 2051         ), _
 2052         /' EOL '/ _
 2053         ( _
 2054             NULL _
 2055         ) _
 2056      }
 2057 
 2058 '':::::
 2059 sub rtlStringModInit( )
 2060 
 2061     rtlAddIntrinsicProcs( @funcdata(0) )
 2062 
 2063 end sub
 2064 
 2065 '':::::
 2066 sub rtlStringModEnd( )
 2067 
 2068     '' procs will be deleted when symbEnd is called
 2069 
 2070 end sub
 2071 
 2072 '':::::
 2073 function rtlStrCompare _
 2074     ( _
 2075         byval str1 as ASTNODE ptr, _
 2076         byval sdtype1 as integer, _
 2077         byval str2 as ASTNODE ptr, _
 2078         byval sdtype2 as integer _
 2079     ) as ASTNODE ptr
 2080 
 2081     dim as ASTNODE ptr proc = any
 2082     dim as longint str1len = any, str2len = any
 2083 
 2084     function = NULL
 2085 
 2086     ''
 2087     proc = astNewCALL( PROCLOOKUP( STRCOMPARE ) )
 2088 
 2089     '' always calc len before pushing the param
 2090     str1len = rtlCalcStrLen( str1, sdtype1 )
 2091     str2len = rtlCalcStrLen( str2, sdtype2 )
 2092 
 2093     '' byref str1 as any
 2094     if( astNewARG( proc, str1, sdtype1 ) = NULL ) then
 2095         exit function
 2096     end if
 2097 
 2098     '' byval str1_len as integer
 2099     if( astNewARG( proc, astNewCONSTi( str1len ) ) = NULL ) then
 2100         exit function
 2101     end if
 2102 
 2103     '' byref str2 as any
 2104     if( astNewARG( proc, str2, sdtype2 ) = NULL ) then
 2105         exit function
 2106     end if
 2107 
 2108     '' byval str2_len as integer
 2109     if( astNewARG( proc, astNewCONSTi( str2len ) ) = NULL ) then
 2110         exit function
 2111     end if
 2112 
 2113     function = proc
 2114 
 2115 end function
 2116 
 2117 '':::::
 2118 function rtlWstrCompare _
 2119     ( _
 2120         byval str1 as ASTNODE ptr, _
 2121         byval str2 as ASTNODE ptr _
 2122     ) as ASTNODE ptr
 2123 
 2124     dim as ASTNODE ptr proc = any
 2125 
 2126     function = NULL
 2127 
 2128     ''
 2129     proc = astNewCALL( PROCLOOKUP( WSTRCOMPARE ) )
 2130 
 2131     '' byval str1 as wstring ptr
 2132     if( astNewARG( proc, str1 ) = NULL ) then
 2133         exit function
 2134     end if
 2135 
 2136     '' byval str2 as wstring ptr
 2137     if( astNewARG( proc, str2 ) = NULL ) then
 2138         exit function
 2139     end if
 2140 
 2141     function = proc
 2142 
 2143 end function
 2144 
 2145 '':::::
 2146 function rtlStrConcat _
 2147     ( _
 2148         byval str1 as ASTNODE ptr, _
 2149         byval sdtype1 as integer, _
 2150         byval str2 as ASTNODE ptr, _
 2151         byval sdtype2 as integer _
 2152     ) as ASTNODE ptr
 2153 
 2154     dim as ASTNODE ptr proc = any
 2155     dim as longint str1len = any, str2len = any
 2156     dim as FBSYMBOL ptr tmp = any
 2157 
 2158     function = NULL
 2159 
 2160     proc = astNewCALL( PROCLOOKUP( STRCONCAT ) )
 2161 
 2162     '' byref dst as string (must be cleaned up due the rtlib assumptions about destine)
 2163     tmp = symbAddTempVar( FB_DATATYPE_STRING )
 2164 
 2165     if( astNewARG( proc, _
 2166         astNewLINK( astBuildTempVarClear( tmp ), _
 2167             astNewVAR( tmp ), _
 2168             FALSE ) ) = NULL ) then
 2169         exit function
 2170     end if
 2171 
 2172     '' always calc len before pushing the param
 2173     str1len = rtlCalcStrLen( str1, sdtype1 )
 2174     str2len = rtlCalcStrLen( str2, sdtype2 )
 2175 
 2176     '' byref str1 as any
 2177     if( astNewARG( proc, str1, sdtype1 ) = NULL ) then
 2178         exit function
 2179     end if
 2180 
 2181     '' byval str1_len as integer
 2182     if( astNewARG( proc, astNewCONSTi( str1len ) ) = NULL ) then
 2183         exit function
 2184     end if
 2185 
 2186     '' byref str2 as any
 2187     if( astNewARG( proc, str2, sdtype2 ) = NULL ) then
 2188         exit function
 2189     end if
 2190 
 2191     '' byval str2_len as integer
 2192     if( astNewARG( proc, astNewCONSTi( str2len ) ) = NULL ) then
 2193         exit function
 2194     end if
 2195 
 2196     function = proc
 2197 end function
 2198 
 2199 '':::::
 2200 function rtlWstrConcatWA _
 2201     ( _
 2202         byval str1 as ASTNODE ptr, _
 2203         byval str2 as ASTNODE ptr, _
 2204         byval sdtype2 as integer _
 2205     ) as ASTNODE ptr
 2206 
 2207     dim as ASTNODE ptr proc = any
 2208     dim as longint str2len = any
 2209 
 2210     function = NULL
 2211 
 2212     proc = astNewCALL( PROCLOOKUP( WSTRCONCATWA ) )
 2213 
 2214     '' byval str1 as wstring ptr
 2215     if( astNewARG( proc, str1 ) = NULL ) then
 2216         exit function
 2217     end if
 2218 
 2219     '' always calc len before pushing the param
 2220     str2len = rtlCalcStrLen( str2, sdtype2 )
 2221 
 2222     '' byref str2 as any
 2223     if( astNewARG( proc, str2, sdtype2 ) = NULL ) then
 2224         exit function
 2225     end if
 2226 
 2227     '' byval str2_len as integer
 2228     if( astNewARG( proc, astNewCONSTi( str2len ) ) = NULL ) then
 2229         exit function
 2230     end if
 2231 
 2232     function = proc
 2233 
 2234 end function
 2235 
 2236 '':::::
 2237 function rtlWstrConcatAW _
 2238     ( _
 2239         byval str1 as ASTNODE ptr, _
 2240         byval sdtype1 as integer, _
 2241         byval str2 as ASTNODE ptr _
 2242     ) as ASTNODE ptr
 2243 
 2244     dim as ASTNODE ptr proc = any
 2245     dim as longint str1len = any
 2246 
 2247     function = NULL
 2248 
 2249     proc = astNewCALL( PROCLOOKUP( WSTRCONCATAW ) )
 2250 
 2251     '' always calc len before pushing the param
 2252     str1len = rtlCalcStrLen( str1, sdtype1 )
 2253 
 2254     '' byref str1 as any
 2255     if( astNewARG( proc, str1, sdtype1 ) = NULL ) then
 2256         exit function
 2257     end if
 2258 
 2259     '' byval str1_len as integer
 2260     if( astNewARG( proc, astNewCONSTi( str1len ) ) = NULL ) then
 2261         exit function
 2262     end if
 2263 
 2264     '' byval str2 as wstring ptr
 2265     if( astNewARG( proc, str2 ) = NULL ) then
 2266         exit function
 2267     end if
 2268 
 2269     function = proc
 2270 
 2271 end function
 2272 
 2273 '':::::
 2274 function rtlWstrConcat _
 2275     ( _
 2276         byval str1 as ASTNODE ptr, _
 2277         byval sdtype1 as integer, _
 2278         byval str2 as ASTNODE ptr, _
 2279         byval sdtype2 as integer _
 2280     ) as ASTNODE ptr
 2281 
 2282     dim as ASTNODE ptr proc = any
 2283 
 2284     function = NULL
 2285 
 2286     '' both not wstrings?
 2287     if( typeGetDtAndPtrOnly( sdtype1 ) <> typeGetDtAndPtrOnly( sdtype2 ) ) then
 2288         '' left ?
 2289         if( typeGet( sdtype1 ) = FB_DATATYPE_WCHAR ) then
 2290             return rtlWstrConcatWA( str1, str2, sdtype2 )
 2291 
 2292         '' right..
 2293         else
 2294             return rtlWstrConcatAW( str1, sdtype1, str2 )
 2295         end if
 2296     end if
 2297 
 2298     '' both wstrings..
 2299     proc = astNewCALL( PROCLOOKUP( WSTRCONCAT ) )
 2300 
 2301     '' byval str1 as wstring ptr
 2302     if( astNewARG( proc, str1 ) = NULL ) then
 2303         exit function
 2304     end if
 2305 
 2306     '' byval str2 as wstring ptr
 2307     if( astNewARG( proc, str2 ) = NULL ) then
 2308         exit function
 2309     end if
 2310 
 2311     function = proc
 2312 
 2313 end function
 2314 
 2315 '':::::
 2316 function rtlStrConcatAssign _
 2317     ( _
 2318         byval dst as ASTNODE ptr, _
 2319         byval src as ASTNODE ptr _
 2320     ) as ASTNODE ptr
 2321 
 2322     dim as ASTNODE ptr proc = any
 2323     dim as integer ddtype = any, sdtype = any
 2324     dim as longint lgt = any
 2325 
 2326     function = NULL
 2327 
 2328     proc = astNewCALL( PROCLOOKUP( STRCONCATASSIGN ) )
 2329 
 2330     ddtype = astGetDataType( dst )
 2331 
 2332     '' always calc len before pushing the param
 2333     lgt = rtlCalcStrLen( dst, ddtype )
 2334 
 2335     '' dst as any
 2336     if( astNewARG( proc, dst, ddtype ) = NULL ) then
 2337         exit function
 2338     end if
 2339 
 2340     '' byval dstlen as integer
 2341     if( astNewARG( proc, astNewCONSTi( lgt ) ) = NULL ) then
 2342         exit function
 2343     end if
 2344 
 2345     '' always calc len before pushing the param
 2346     sdtype = astGetDataType( src )
 2347     lgt = rtlCalcStrLen( src, sdtype )
 2348 
 2349     '' src as any
 2350     if( astNewARG( proc, src, sdtype ) = NULL ) then
 2351         exit function
 2352     end if
 2353 
 2354     '' byval srclen as integer
 2355     if( astNewARG( proc, astNewCONSTi( lgt ) ) = NULL ) then
 2356         exit function
 2357     end if
 2358 
 2359     '' byval fillrem as integer
 2360     if( astNewARG( proc, astNewCONSTi( ddtype = FB_DATATYPE_FIXSTR ) ) = NULL ) then
 2361         exit function
 2362     end if
 2363 
 2364     ''
 2365     function = proc
 2366 
 2367 end function
 2368 
 2369 '':::::
 2370 function rtlWstrConcatAssign _
 2371     ( _
 2372         byval dst as ASTNODE ptr, _
 2373         byval src as ASTNODE ptr _
 2374     ) as ASTNODE ptr static
 2375 
 2376     dim as ASTNODE ptr proc
 2377     dim as longint lgt = any
 2378 
 2379     function = NULL
 2380 
 2381     proc = astNewCALL( PROCLOOKUP( WSTRCONCATASSIGN ) )
 2382 
 2383     '' always calc len before pushing the param
 2384     lgt = rtlCalcStrLen( dst, FB_DATATYPE_WCHAR )
 2385 
 2386     '' byval dst as wstring ptr
 2387     if( astNewARG( proc, dst ) = NULL ) then
 2388         exit function
 2389     end if
 2390 
 2391     '' byval dstlen as integer
 2392     if( astNewARG( proc, astNewCONSTi( lgt ) ) = NULL ) then
 2393         exit function
 2394     end if
 2395 
 2396     '' byval src as wstring ptr
 2397     if( astNewARG( proc, src ) = NULL ) then
 2398         exit function
 2399     end if
 2400 
 2401     ''
 2402     function = proc
 2403 
 2404 end function
 2405 
 2406 '':::::
 2407 function rtlWstrAssignWA _
 2408     ( _
 2409         byval dst as ASTNODE ptr, _
 2410         byval src as ASTNODE ptr, _
 2411         byval sdtype as integer _
 2412     ) as ASTNODE ptr
 2413 
 2414     dim as ASTNODE ptr proc = any
 2415     dim as longint dstlen = any, srclen = any
 2416 
 2417     function = NULL
 2418 
 2419     proc = astNewCALL( PROCLOOKUP( WSTRASSIGNWA ) )
 2420 
 2421     '' always calc len before pushing the param
 2422     dstlen = rtlCalcStrLen( dst, FB_DATATYPE_WCHAR )
 2423     srclen = rtlCalcStrLen( src, sdtype )
 2424 
 2425     '' byval dst as wstring ptr
 2426     if( astNewARG( proc, dst ) = NULL ) then
 2427         exit function
 2428     end if
 2429 
 2430     '' byval dstlen as integer
 2431     if( astNewARG( proc, astNewCONSTi( dstlen ) ) = NULL ) then
 2432         exit function
 2433     end if
 2434 
 2435     '' byref src as any
 2436     if( astNewARG( proc, src ) = NULL ) then
 2437         exit function
 2438     end if
 2439 
 2440     '' byval srclen as integer
 2441     if( astNewARG( proc, astNewCONSTi( srclen ) ) = NULL ) then
 2442         exit function
 2443     end if
 2444 
 2445     function = proc
 2446 
 2447 end function
 2448 
 2449 '':::::
 2450 function rtlWstrAssignAW _
 2451     ( _
 2452         byval dst as ASTNODE ptr, _
 2453         byval ddtype as integer, _
 2454         byval src as ASTNODE ptr, _
 2455         byval is_ini as integer _
 2456     ) as ASTNODE ptr
 2457 
 2458     dim as ASTNODE ptr proc = any
 2459     dim as longint lgt = any
 2460 
 2461     function = NULL
 2462 
 2463     proc = astNewCALL( iif( is_ini, _
 2464                 PROCLOOKUP( WSTRASSIGNAW_INIT ), _
 2465                 PROCLOOKUP(  WSTRASSIGNAW ) ) )
 2466 
 2467     '' always calc len before pushing the param
 2468     lgt = rtlCalcStrLen( dst, ddtype )
 2469 
 2470     '' byref dst as any
 2471     if( astNewARG( proc, dst ) = NULL ) then
 2472         exit function
 2473     end if
 2474 
 2475     '' byval dstlen as integer
 2476     if( astNewARG( proc, astNewCONSTi( lgt ) ) = NULL ) then
 2477         exit function
 2478     end if
 2479 
 2480     '' byval src as wstring ptr
 2481     if( astNewARG( proc, src ) = NULL ) then
 2482         exit function
 2483     end if
 2484 
 2485     '' byval fillrem as integer
 2486     if( astNewARG( proc, astNewCONSTi( ddtype = FB_DATATYPE_FIXSTR ) ) = NULL ) then
 2487         exit function
 2488     end if
 2489 
 2490     function = proc
 2491 
 2492 end function
 2493 
 2494 '':::::
 2495 function rtlStrAssign _
 2496     ( _
 2497         byval dst as ASTNODE ptr, _
 2498         byval src as ASTNODE ptr, _
 2499         byval is_ini as integer _
 2500     ) as ASTNODE ptr
 2501 
 2502     dim as ASTNODE ptr proc = any
 2503     dim as integer ddtype = any, sdtype = any
 2504     dim as longint lgt = any
 2505 
 2506     function = NULL
 2507 
 2508     ddtype = astGetDataType( dst )
 2509     sdtype = astGetDataType( src )
 2510 
 2511     '' wstring source?
 2512     if( sdtype = FB_DATATYPE_WCHAR ) then
 2513         return rtlWstrAssignAW( dst, ddtype, src, is_ini )
 2514 
 2515     '' destine?
 2516     elseif( ddtype = FB_DATATYPE_WCHAR ) then
 2517         return rtlWstrAssignWA( dst, src, sdtype )
 2518     end if
 2519 
 2520     '' both strings
 2521     proc = astNewCALL( iif( is_ini, _
 2522                 PROCLOOKUP( STRINIT ), _
 2523                 PROCLOOKUP( STRASSIGN ) ) )
 2524 
 2525     '' always calc len before pushing the param
 2526 
 2527     lgt = rtlCalcStrLen( dst, ddtype )
 2528 
 2529     '' dst as any
 2530     if( astNewARG( proc, dst, astGetDataType( dst ) ) = NULL ) then
 2531         exit function
 2532     end if
 2533 
 2534     '' byval dstlen as integer
 2535     if( astNewARG( proc, astNewCONSTi( lgt ) ) = NULL ) then
 2536         exit function
 2537     end if
 2538 
 2539     '' always calc len before pushing the param
 2540     lgt = rtlCalcStrLen( src, sdtype )
 2541 
 2542     '' src as const any
 2543     if( astNewARG( proc, src ) = NULL ) then
 2544         exit function
 2545     end if
 2546 
 2547     '' byval srclen as integer
 2548     if( astNewARG( proc, astNewCONSTi( lgt ) ) = NULL ) then
 2549         exit function
 2550     end if
 2551 
 2552     '' byval fillrem as integer
 2553     if( astNewARG( proc, astNewCONSTi( ddtype = FB_DATATYPE_FIXSTR ) ) = NULL ) then
 2554         exit function
 2555     end if
 2556 
 2557     ''
 2558     function = proc
 2559 
 2560 end function
 2561 
 2562 '':::::
 2563 function rtlWstrAssign _
 2564     ( _
 2565         byval dst as ASTNODE ptr, _
 2566         byval src as ASTNODE ptr, _
 2567         byval is_ini as integer _
 2568     ) as ASTNODE ptr
 2569 
 2570     dim as ASTNODE ptr proc = any
 2571     dim as integer ddtype = any, sdtype = any
 2572     dim as longint lgt = any
 2573 
 2574     function = NULL
 2575 
 2576     ddtype = astGetDataType( dst )
 2577     sdtype = astGetDataType( src )
 2578 
 2579     '' both not wstrings?
 2580     if( ddtype <> sdtype ) then
 2581         '' left ?
 2582         if( ddtype = FB_DATATYPE_WCHAR ) then
 2583             return rtlWstrAssignWA( dst, src, sdtype )
 2584         '' right..
 2585         else
 2586             return rtlWstrAssignAW( dst, ddtype, src, is_ini )
 2587         end if
 2588     end if
 2589 
 2590     '' both wstrings..
 2591     proc = astNewCALL( PROCLOOKUP( WSTRASSIGN ) )
 2592 
 2593     '' always calc len before pushing the param
 2594     lgt = rtlCalcStrLen( dst, ddtype )
 2595 
 2596     '' byval dst as wstring ptr
 2597     if( astNewARG( proc, dst ) = NULL ) then
 2598         exit function
 2599     end if
 2600 
 2601     '' byval dstlen as integer
 2602     if( astNewARG( proc, astNewCONSTi( lgt ) ) = NULL ) then
 2603         exit function
 2604     end if
 2605 
 2606     '' byval src as wstring ptr
 2607     if( astNewARG( proc, src ) = NULL ) then
 2608         exit function
 2609     end if
 2610 
 2611     function = proc
 2612 
 2613 end function
 2614 
 2615 function rtlStrDelete( byval expr as ASTNODE ptr ) as ASTNODE ptr
 2616     dim as FBSYMBOL ptr proc = any
 2617     dim as ASTNODE ptr call_ = any
 2618     dim as integer dtype = any
 2619 
 2620     function = NULL
 2621 
 2622     dtype = astGetDataType( expr )
 2623 
 2624     '' Handling WCHAR PTR because that's what we use for fake dynamic
 2625     '' wstrings, and it's also the real type of functions returning dynamic
 2626     '' wstrings. All wstring types should have been remapped to WCHAR PTR.
 2627     assert( dtype <> FB_DATATYPE_WCHAR )
 2628     if( dtype = typeAddrOf( FB_DATATYPE_WCHAR ) ) then
 2629         proc = PROCLOOKUP( WSTRDELETE )
 2630     else
 2631         assert( dtype = FB_DATATYPE_STRING )
 2632         if( astIsCALL( expr ) ) then
 2633             '' Temporary string function result
 2634             proc = PROCLOOKUP( HSTRDELTEMP )
 2635         else
 2636             '' Normal string variable
 2637             proc = PROCLOOKUP( STRDELETE )
 2638         end if
 2639     end if
 2640 
 2641     call_ = astNewCALL( proc )
 2642 
 2643     '' byref str as string|wstring
 2644     if( astNewARG( call_, expr, dtype ) = NULL ) then
 2645         exit function
 2646     end if
 2647 
 2648     function = call_
 2649 end function
 2650 
 2651 '':::::
 2652 function rtlStrAllocTmpResult _
 2653     ( _
 2654         byval strg as ASTNODE ptr _
 2655     ) as ASTNODE ptr static
 2656 
 2657     dim as ASTNODE ptr proc
 2658 
 2659     function = NULL
 2660 
 2661     ''
 2662     proc = astNewCALL( PROCLOOKUP( STRALLOCTMPRES ), NULL )
 2663 
 2664     '' src as string
 2665     if( astNewARG( proc, strg, FB_DATATYPE_STRING ) = NULL ) then
 2666         exit function
 2667     end if
 2668 
 2669     function = proc
 2670 
 2671 end function
 2672 
 2673 '':::::
 2674 function rtlStrAllocTmpDesc _
 2675     ( _
 2676         byval strexpr as ASTNODE ptr _
 2677     ) as ASTNODE ptr
 2678 
 2679     dim as ASTNODE ptr proc = any
 2680     dim as integer dtype = any
 2681     dim as longint lgt = any
 2682     dim as FBSYMBOL ptr litsym = any
 2683 
 2684     function = NULL
 2685 
 2686     ''
 2687     dtype = astGetDataType( strexpr )
 2688 
 2689     select case as const dtype
 2690     case FB_DATATYPE_CHAR
 2691 
 2692         '' literal?
 2693         litsym = astGetStrLitSymbol( strexpr )
 2694         if( litsym = NULL ) then
 2695             proc = astNewCALL( PROCLOOKUP( STRALLOCTMPDESCZ ) )
 2696         else
 2697             proc = astNewCALL( PROCLOOKUP( STRALLOCTMPDESCZEX ) )
 2698         end if
 2699 
 2700         '' byval str as zstring ptr
 2701         if( astNewARG( proc, strexpr ) = NULL ) then
 2702             exit function
 2703         end if
 2704 
 2705         '' length is known at compile-time
 2706         if( litsym <> NULL ) then
 2707             lgt = symbGetStrLen( litsym ) - 1   '' less the null-term
 2708 
 2709             '' byval len as integer
 2710             if( astNewARG( proc, astNewCONSTi( lgt ) ) = NULL ) then
 2711                 exit function
 2712             end if
 2713         end if
 2714 
 2715     case FB_DATATYPE_FIXSTR
 2716         proc = astNewCALL( PROCLOOKUP( STRALLOCTMPDESCF ) )
 2717 
 2718         '' always calc len before pushing the param
 2719         lgt = rtlCalcStrLen( strexpr, dtype )
 2720 
 2721         '' str as any
 2722         if( astNewARG( proc, strexpr ) = NULL ) then
 2723             exit function
 2724         end if
 2725 
 2726         '' byval strlen as integer
 2727         if( astNewARG( proc, astNewCONSTi( lgt ) ) = NULL ) then
 2728             exit function
 2729         end if
 2730 
 2731     end select
 2732 
 2733     ''
 2734     function = proc
 2735 
 2736 end function
 2737 
 2738 '':::::
 2739 function rtlWstrAlloc _
 2740     ( _
 2741         byval lenexpr as ASTNODE ptr _
 2742     ) as ASTNODE ptr
 2743 
 2744     dim as ASTNODE ptr proc = any
 2745 
 2746     function = NULL
 2747 
 2748     proc = astNewCALL( PROCLOOKUP( WSTRALLOC ) )
 2749 
 2750     '' byval len as integer
 2751     if( astNewARG( proc, lenexpr ) = NULL ) then
 2752         exit function
 2753     end if
 2754 
 2755     function = proc
 2756 
 2757 end function
 2758 
 2759 '':::::
 2760 function rtlWstrToA _
 2761     ( _
 2762         byval expr as ASTNODE ptr _
 2763     ) as ASTNODE ptr
 2764 
 2765     dim as ASTNODE ptr proc = any
 2766 
 2767     function = NULL
 2768 
 2769     proc = astNewCALL( PROCLOOKUP( WSTR2STR ) )
 2770 
 2771     '' byval str as wstring ptr
 2772     if( astNewARG( proc, expr ) = NULL ) then
 2773         exit function
 2774     end if
 2775 
 2776     function = proc
 2777 
 2778 end function
 2779 
 2780 '':::::
 2781 function rtlAToWstr _
 2782     ( _
 2783         byval expr as ASTNODE ptr _
 2784     ) as ASTNODE ptr
 2785 
 2786     dim as ASTNODE ptr proc = any
 2787 
 2788     function = NULL
 2789 
 2790     proc = astNewCALL( PROCLOOKUP( STR2WSTR ) )
 2791 
 2792     '' byval str as zstring ptr
 2793     if( astNewARG( proc, expr ) = NULL ) then
 2794         exit function
 2795     end if
 2796 
 2797     function = proc
 2798 
 2799 end function
 2800 
 2801 '':::::
 2802 function rtlToStr _
 2803     ( _
 2804         byval expr as ASTNODE ptr, _
 2805         byval pad as integer _
 2806     ) as ASTNODE ptr
 2807 
 2808     dim as ASTNODE ptr proc = any
 2809     dim as FBSYMBOL ptr f = any, litsym = any
 2810     dim as integer dtype = any
 2811 
 2812     function = NULL
 2813 
 2814     dtype = astGetDatatype( expr )
 2815 
 2816     '' constant? evaluate
 2817     if( astIsCONST( expr ) ) then
 2818         dim s As String
 2819         if( astGetDataType( expr ) = FB_DATATYPE_BOOLEAN ) then
 2820 
 2821         else
 2822             if( pad ) then
 2823                 if( typeIsSigned( astGetDataType( expr ) ) ) then
 2824                     if astConstGetAsDouble( expr ) >= 0 then
 2825                         s = " "
 2826                     end if
 2827                 else
 2828                     s = " "
 2829                 end if
 2830             end if
 2831         end if
 2832         s += astConstFlushToStr( expr )
 2833         return astNewCONSTstr( s )
 2834     end if
 2835 
 2836     '' wstring literal? convert from unicode at compile-time
 2837     if( dtype = FB_DATATYPE_WCHAR ) then
 2838         litsym = astGetStrLitSymbol( expr )
 2839         if( litsym <> NULL ) then
 2840             if( env.wchar_doconv ) then
 2841                 litsym = symbAllocStrConst( str( *symbGetVarLitTextW( litsym ) ), _
 2842                                             symbGetWstrLen( litsym ) - 1 )
 2843 
 2844                 return astNewVAR( litsym )
 2845             end if
 2846         end if
 2847     end if
 2848 
 2849     astTryOvlStringCONV( expr )
 2850 
 2851     dtype = astGetDataType( expr )
 2852 
 2853     ''
 2854     select case as const astGetDataClass( expr )
 2855     case FB_DATACLASS_INTEGER
 2856 
 2857         '' Convert pointer to uinteger
 2858         if( typeIsPtr( dtype ) ) then
 2859             expr = astNewCONV( FB_DATATYPE_UINT, NULL, expr )
 2860             dtype = astGetDatatype( expr )
 2861         end if
 2862 
 2863         select case( dtype )
 2864         '' zstring? do nothing
 2865         case FB_DATATYPE_CHAR
 2866             return expr
 2867         '' wstring? convert..
 2868         case FB_DATATYPE_WCHAR
 2869             return rtlWStrToA( expr )
 2870         '' boolean?
 2871         case FB_DATATYPE_BOOLEAN
 2872             f = PROCLOOKUP( BOOL2STR )
 2873         case else
 2874             select case as const( typeGetSizeType( dtype ) )
 2875             case FB_SIZETYPE_INT64
 2876                 f = iif( pad = FALSE, PROCLOOKUP( LONGINT2STR ), PROCLOOKUP( LONGINT2STR_QB ) )
 2877             case FB_SIZETYPE_UINT64
 2878                 f = iif( pad = FALSE, PROCLOOKUP( ULONGINT2STR ), PROCLOOKUP( ULONGINT2STR_QB ) )
 2879             case FB_SIZETYPE_UINT8, FB_SIZETYPE_UINT16, FB_SIZETYPE_UINT32
 2880                 f = iif( pad = FALSE, PROCLOOKUP( UINT2STR ), PROCLOOKUP( UINT2STR_QB ) )
 2881             case else
 2882                 f = iif( pad = FALSE, PROCLOOKUP( INT2STR ), PROCLOOKUP( INT2STR_QB ) )
 2883             end select
 2884         end select
 2885 
 2886     case FB_DATACLASS_FPOINT
 2887         if( astGetDataType( expr ) = FB_DATATYPE_SINGLE ) then
 2888             f = iif( pad = FALSE, _
 2889                      PROCLOOKUP( FLT2STR ), _
 2890                      PROCLOOKUP( FLT2STR_QB ) )
 2891         else
 2892             f = iif( pad = FALSE, _
 2893                      PROCLOOKUP( DBL2STR ), _
 2894                      PROCLOOKUP( DBL2STR_QB ) )
 2895         end if
 2896 
 2897     case FB_DATACLASS_STRING
 2898         '' do nothing
 2899         return expr
 2900 
 2901     '' UDT's, classes: try cast(string) op overloading
 2902     case FB_DATACLASS_UDT
 2903         return astNewCONV( FB_DATATYPE_STRING, NULL, expr )
 2904 
 2905     '' anything else, can't convert
 2906     case else
 2907         return NULL
 2908     end select
 2909 
 2910     ''
 2911     proc = astNewCALL( f )
 2912 
 2913     ''
 2914     if( astNewARG( proc, expr ) = NULL ) then
 2915         exit function
 2916     end if
 2917 
 2918     function = proc
 2919 
 2920 end function
 2921 
 2922 '':::::
 2923 function rtlToWstr _
 2924     ( _
 2925         byval expr as ASTNODE ptr _
 2926     ) as ASTNODE ptr
 2927 
 2928     dim as ASTNODE ptr proc = any
 2929     dim as FBSYMBOL ptr f = any, litsym = any
 2930     dim as integer dtype
 2931 
 2932     function = NULL
 2933 
 2934     dtype = astGetDataType( expr )
 2935 
 2936     '' constant? evaluate
 2937     if( astIsCONST( expr ) ) then
 2938         return astNewCONSTwstr( astConstFlushToWstr( expr ) )
 2939     end if
 2940 
 2941     '' string literal? convert to unicode at compile-time
 2942     if( dtype = FB_DATATYPE_CHAR ) then
 2943         litsym = astGetStrLitSymbol( expr )
 2944         if( litsym <> NULL ) then
 2945             if( env.wchar_doconv ) then
 2946                 litsym = symbAllocWstrConst( wstr( *symbGetVarLitText( litsym ) ), _
 2947                                              symbGetStrLen( litsym ) - 1 )
 2948                 return astNewVAR( litsym )
 2949             end if
 2950         end if
 2951     end if
 2952 
 2953     astTryOvlStringCONV( expr )
 2954 
 2955     dtype = astGetDataType( expr )
 2956 
 2957     select case as const astGetDataClass( expr )
 2958     case FB_DATACLASS_INTEGER
 2959         '' Convert pointer to uinteger
 2960         if( typeIsPtr( dtype ) ) then
 2961             expr = astNewCONV( FB_DATATYPE_UINT, NULL, expr )
 2962             dtype = astGetDatatype( expr )
 2963         end if
 2964 
 2965         select case( dtype )
 2966         '' wstring? do nothing
 2967         case FB_DATATYPE_WCHAR
 2968             return expr
 2969         '' zstring? convert..
 2970         case FB_DATATYPE_CHAR
 2971             return rtlAToWstr( expr )
 2972         '' boolean?
 2973         case FB_DATATYPE_BOOLEAN
 2974             f = PROCLOOKUP( BOOL2WSTR )
 2975         case else
 2976             select case as const( typeGetSizeType( dtype ) )
 2977             case FB_SIZETYPE_INT64
 2978                 f = PROCLOOKUP( LONGINT2WSTR )
 2979             case FB_SIZETYPE_UINT64
 2980                 f = PROCLOOKUP( ULONGINT2WSTR )
 2981             case FB_SIZETYPE_UINT8, FB_SIZETYPE_UINT16, FB_SIZETYPE_UINT32
 2982                 f = PROCLOOKUP( UINT2WSTR )
 2983             case else
 2984                 f = PROCLOOKUP( INT2WSTR )
 2985             end select
 2986         end select
 2987     case FB_DATACLASS_FPOINT
 2988         if( astGetDataType( expr ) = FB_DATATYPE_SINGLE ) then
 2989             f = PROCLOOKUP( FLT2WSTR )
 2990         else
 2991             f = PROCLOOKUP( DBL2WSTR )
 2992         end if
 2993 
 2994     case FB_DATACLASS_STRING
 2995         '' convert
 2996         return rtlAToWstr( expr )
 2997 
 2998     '' UDT's, classes: try cast(wstring ptr) op overloading
 2999     case FB_DATACLASS_UDT
 3000         return astNewCONV( typeAddrOf( FB_DATATYPE_WCHAR ), NULL, expr )
 3001 
 3002     '' anything else: can't convert
 3003     case else
 3004         return NULL
 3005     end select
 3006 
 3007     ''
 3008     proc = astNewCALL( f )
 3009 
 3010     ''
 3011     if( astNewARG( proc, expr ) = NULL ) then
 3012         exit function
 3013     end if
 3014 
 3015     function = proc
 3016 
 3017 end function
 3018 
 3019 '':::::
 3020 function rtlStrToVal _
 3021     ( _
 3022         byval expr as ASTNODE ptr, _
 3023         byval to_dtype as integer _
 3024     ) as ASTNODE ptr
 3025 
 3026     dim as ASTNODE ptr proc = any
 3027     dim as FBSYMBOL ptr f = any, s = any
 3028     dim as FB_CALL_ARG arg = any
 3029     dim as FB_ERRMSG err_num = any
 3030 
 3031     function = NULL
 3032 
 3033     '' Convert pointer to uinteger
 3034     if( typeIsPtr( to_dtype ) ) then
 3035         expr = astNewCONV( FB_DATATYPE_UINT, NULL, expr )
 3036     end if
 3037 
 3038     select case as const typeGet( to_dtype )
 3039     case FB_DATATYPE_SINGLE, FB_DATATYPE_DOUBLE
 3040         f = PROCLOOKUP( STR2DBL )
 3041 
 3042     case FB_DATATYPE_BOOLEAN
 3043         f = PROCLOOKUP( STR2BOOL )
 3044 
 3045     case FB_DATATYPE_BYTE, FB_DATATYPE_UBYTE, _
 3046          FB_DATATYPE_SHORT, FB_DATATYPE_USHORT, _
 3047          FB_DATATYPE_INTEGER, FB_DATATYPE_ENUM, FB_DATATYPE_UINT, _
 3048          FB_DATATYPE_LONG, FB_DATATYPE_ULONG, FB_DATATYPE_POINTER, _
 3049          FB_DATATYPE_LONGINT, FB_DATATYPE_ULONGINT
 3050 
 3051         select case as const( typeGetSizeType( to_dtype ) )
 3052         case FB_SIZETYPE_INT64
 3053             f = PROCLOOKUP( STR2LNG )
 3054         case FB_SIZETYPE_UINT64
 3055             f = PROCLOOKUP( STR2ULNG )
 3056         case FB_SIZETYPE_INT8, FB_SIZETYPE_INT16, FB_SIZETYPE_INT32
 3057             f = PROCLOOKUP( STR2INT )
 3058         case FB_SIZETYPE_UINT8, FB_SIZETYPE_UINT16, FB_SIZETYPE_UINT32
 3059             f = PROCLOOKUP( STR2UINT )
 3060         end select
 3061 
 3062     '' UDT's, classes: try cast(to_dtype) op overloading
 3063     case FB_DATATYPE_STRUCT ', FB_DATATYPE_CLASS
 3064         return astNewCONV( to_dtype, NULL, expr )
 3065 
 3066     case else
 3067         '' anything else..
 3068         exit function
 3069     end select
 3070 
 3071     '' resolve zstring or wstring
 3072     arg.expr = expr
 3073     arg.mode = INVALID
 3074     arg.next = NULL
 3075     f = symbFindClosestOvlProc( f, 1, @arg, @err_num )
 3076     if( f = NULL ) then
 3077         exit function
 3078     end if
 3079 
 3080     proc = astNewCALL( f )
 3081 
 3082     ''
 3083     if( astNewARG( proc, expr ) = NULL ) then
 3084         exit function
 3085     end if
 3086 
 3087     function = astNewCONV( to_dtype, NULL, proc )
 3088 
 3089 end function
 3090 
 3091 '':::::
 3092 function rtlStrMid _
 3093     ( _
 3094         byval expr1 as ASTNODE ptr, _
 3095         byval expr2 as ASTNODE ptr, _
 3096         byval expr3 as ASTNODE ptr _
 3097     ) as ASTNODE ptr
 3098 
 3099     dim as ASTNODE ptr proc = any
 3100 
 3101     function = NULL
 3102 
 3103     astTryOvlStringCONV( expr1 )
 3104 
 3105     if( astGetDataType( expr1 ) <> FB_DATATYPE_WCHAR ) then
 3106         proc = astNewCALL( PROCLOOKUP( STRMID ) )
 3107     else
 3108         proc = astNewCALL( PROCLOOKUP( WSTRMID ) )
 3109     end if
 3110 
 3111     ''
 3112     if( astNewARG( proc, expr1 ) = NULL ) then
 3113         exit function
 3114     end if
 3115 
 3116     if( astNewARG( proc, expr2 ) = NULL ) then
 3117         exit function
 3118     end if
 3119 
 3120     if( astNewARG( proc, expr3 ) = NULL ) then
 3121         exit function
 3122     end if
 3123 
 3124     function = proc
 3125 
 3126 end function
 3127 
 3128 '':::::
 3129 function rtlStrAssignMid _
 3130     ( _
 3131         byval expr1 as ASTNODE ptr, _
 3132         byval expr2 as ASTNODE ptr, _
 3133         byval expr3 as ASTNODE ptr, _
 3134         byval expr4 as ASTNODE ptr _
 3135     ) as ASTNODE ptr
 3136 
 3137     dim as ASTNODE ptr proc = any
 3138     dim as longint dst_len = any
 3139 
 3140     function = NULL
 3141 
 3142     astTryOvlStringCONV( expr1 )
 3143 
 3144     ''
 3145     if( astGetDataType( expr1 ) <> FB_DATATYPE_WCHAR ) then
 3146         proc = astNewCALL( PROCLOOKUP( STRASSIGNMID ) )
 3147         dst_len = -1
 3148     else
 3149         proc = astNewCALL( PROCLOOKUP( WSTRASSIGNMID ) )
 3150         '' always calc len before pushing the param
 3151         dst_len = rtlCalcStrLen( expr1, FB_DATATYPE_WCHAR )
 3152     end if
 3153 
 3154     ''
 3155     if( astNewARG( proc, expr1 ) = NULL ) then
 3156         exit function
 3157     end if
 3158 
 3159     ''
 3160     if( dst_len <> -1 ) then
 3161         if( astNewARG( proc, astNewCONSTi( dst_len ) ) = NULL ) then
 3162             exit function
 3163         end if
 3164     end if
 3165 
 3166     if( astNewARG( proc, expr2 ) = NULL ) then
 3167         exit function
 3168     end if
 3169 
 3170     if( astNewARG( proc, expr3 ) = NULL ) then
 3171         exit function
 3172     end if
 3173 
 3174     if( astNewARG( proc, expr4 ) = NULL ) then
 3175         exit function
 3176     end if
 3177 
 3178     ''
 3179     astAdd( proc )
 3180 
 3181     function = proc
 3182 
 3183 end function
 3184 
 3185 '':::::
 3186 function rtlStrLRSet _
 3187     ( _
 3188         byval dstexpr as ASTNODE ptr, _
 3189         byval srcexpr as ASTNODE ptr, _
 3190         byval is_rset as integer _
 3191     ) as integer
 3192 
 3193     dim as ASTNODE ptr proc = any
 3194 
 3195     function = FALSE
 3196 
 3197     ''
 3198     if( astGetDataType( dstexpr ) <> FB_DATATYPE_WCHAR ) then
 3199         proc = astNewCALL( iif( is_rset, _
 3200                                 PROCLOOKUP( STRRSET ), _
 3201                                 PROCLOOKUP( STRLSET ) ) )
 3202     else
 3203         proc = astNewCALL( iif( is_rset, _
 3204                                 PROCLOOKUP( WSTRRSET ), _
 3205                                 PROCLOOKUP( WSTRLSET ) ) )
 3206     end if
 3207 
 3208     '' dst as string
 3209     if( astNewARG( proc, dstexpr ) = NULL ) then
 3210         exit function
 3211     end if
 3212 
 3213     '' src as string
 3214     if( astNewARG( proc, srcexpr ) = NULL ) then
 3215         exit function
 3216     end if
 3217 
 3218     ''
 3219     astAdd( proc )
 3220 
 3221     function = TRUE
 3222 
 3223 end function
 3224 
 3225 '':::::
 3226 function rtlStrFill _
 3227     ( _
 3228         byval expr1 as ASTNODE ptr, _
 3229         byval expr2 as ASTNODE ptr _
 3230     ) as ASTNODE ptr
 3231 
 3232     dim as ASTNODE ptr proc = any
 3233     dim as FBSYMBOL ptr f = any
 3234 
 3235     function = NULL
 3236 
 3237     select case astGetDataType( expr2 )
 3238     case FB_DATATYPE_STRING, FB_DATATYPE_FIXSTR, FB_DATATYPE_CHAR
 3239         f = PROCLOOKUP( STRFILL2 )
 3240     case else
 3241         f = PROCLOOKUP( STRFILL1 )
 3242     end select
 3243 
 3244     proc = astNewCALL( f )
 3245 
 3246     ''
 3247     if( astNewARG( proc, expr1 ) = NULL ) then
 3248         exit function
 3249     end if
 3250 
 3251     if( astNewARG( proc, expr2 ) = NULL ) then
 3252         exit function
 3253     end if
 3254 
 3255     function = proc
 3256 
 3257 end function
 3258 
 3259 '':::::
 3260 function rtlWstrFill _
 3261     ( _
 3262         byval expr1 as ASTNODE ptr, _
 3263         byval expr2 as ASTNODE ptr _
 3264     ) as ASTNODE ptr
 3265 
 3266     dim as ASTNODE ptr proc = any
 3267     dim as FBSYMBOL ptr f = any
 3268 
 3269     function = NULL
 3270 
 3271     if( astGetDataType( expr2 ) = FB_DATATYPE_WCHAR ) then
 3272         f = PROCLOOKUP( WSTRFILL2 )
 3273     else
 3274         f = PROCLOOKUP( WSTRFILL1 )
 3275     end if
 3276 
 3277     proc = astNewCALL( f )
 3278 
 3279     ''
 3280     if( astNewARG( proc, expr1 ) = NULL ) then
 3281         exit function
 3282     end if
 3283 
 3284     if( astNewARG( proc, expr2 ) = NULL ) then
 3285         exit function
 3286     end if
 3287 
 3288     function = proc
 3289 
 3290 end function
 3291 
 3292 function rtlStrLen( byval expr as ASTNODE ptr ) as ASTNODE ptr
 3293     dim as ASTNODE ptr proc = any
 3294     dim as longint length = any
 3295 
 3296     function = NULL
 3297 
 3298     proc = astNewCALL( PROCLOOKUP( STRLEN ) )
 3299 
 3300     '' always calc len before pushing the param
 3301     length = rtlCalcStrLen( expr, astGetDataType( expr ) )
 3302 
 3303     '' str as any
 3304     if( astNewARG( proc, expr, FB_DATATYPE_STRING ) = NULL ) then
 3305         exit function
 3306     end if
 3307 
 3308     '' byval strlen as integer
 3309     if( astNewARG( proc, astNewCONSTi( length ) ) = NULL ) then
 3310         exit function
 3311     end if
 3312 
 3313     function = proc
 3314 end function
 3315 
 3316 function rtlWstrLen( byval expr as ASTNODE ptr ) as ASTNODE ptr
 3317     dim as ASTNODE ptr proc = any
 3318 
 3319     function = NULL
 3320 
 3321     proc = astNewCALL( PROCLOOKUP( WSTRLEN ) )
 3322 
 3323     '' byval str as wchar ptr
 3324     if( astNewARG( proc, expr ) = NULL ) then
 3325         exit function
 3326     end if
 3327 
 3328     function = proc
 3329 end function
 3330 
 3331 '':::::
 3332 function rtlStrAsc _
 3333     ( _
 3334         byval expr as ASTNODE ptr, _
 3335         byval posexpr as ASTNODE ptr _
 3336     ) as ASTNODE ptr
 3337 
 3338     dim as ASTNODE ptr proc = any
 3339 
 3340     function = NULL
 3341 
 3342     astTryOvlStringCONV( expr )
 3343 
 3344     ''
 3345     if( astGetDataType( expr ) <> FB_DATATYPE_WCHAR ) then
 3346         proc = astNewCALL( PROCLOOKUP( STRASC ) )
 3347     else
 3348         proc = astNewCALL( PROCLOOKUP( WSTRASC ) )
 3349     end if
 3350 
 3351     '' src as string
 3352     if( astNewARG( proc, expr ) = NULL ) then
 3353         exit function
 3354     end if
 3355 
 3356     '' byval pos as integer
 3357     if( posexpr = NULL ) then
 3358         posexpr = astNewCONSTi( 1 )
 3359     end if
 3360 
 3361     if( astNewARG( proc, posexpr ) = NULL ) then
 3362         exit function
 3363     end if
 3364 
 3365     function = proc
 3366 
 3367 end function
 3368 
 3369 '':::::
 3370 function rtlStrChr _
 3371     ( _
 3372         byval args as integer, _
 3373         exprtb() as ASTNODE ptr, _
 3374         byval is_wstr as integer _
 3375     ) as ASTNODE ptr
 3376 
 3377     dim as ASTNODE ptr proc = any, expr = any
 3378     dim as integer dtype = any
 3379 
 3380     function = NULL
 3381 
 3382     if( is_wstr = FALSE ) then
 3383         proc = astNewCALL( PROCLOOKUP( STRCHR ) )
 3384     else
 3385         proc = astNewCALL( PROCLOOKUP( WSTRCHR ) )
 3386     end if
 3387 
 3388     '' byval args as integer
 3389     if( astNewARG( proc, astNewCONSTi( args ) ) = NULL ) then
 3390         exit function
 3391     end if
 3392 
 3393     '' ...
 3394     for i as integer = 0 to args-1
 3395         expr = exprtb(i)
 3396         dtype = astGetDatatype( expr )
 3397 
 3398         '' check if non-numeric
 3399         if( astGetDataClass( expr ) >= FB_DATACLASS_STRING ) then
 3400             errReportEx( FB_ERRMSG_PARAMTYPEMISMATCHAT, "at parameter: " + str( i+1 ) )
 3401             exit function
 3402         end if
 3403 
 3404         '' don't allow w|zstring's either..
 3405         select case as const dtype
 3406         case FB_DATATYPE_CHAR, FB_DATATYPE_WCHAR
 3407             errReportEx( FB_ERRMSG_PARAMTYPEMISMATCHAT, "at parameter: " + str( i+1 ) )
 3408             exit function
 3409 
 3410         case FB_DATATYPE_INTEGER
 3411 
 3412         '' convert to int as chr() is a varargs function
 3413         case else
 3414             expr = astNewCONV( FB_DATATYPE_INTEGER, NULL, expr )
 3415         end select
 3416 
 3417         if( astNewARG( proc, expr, FB_DATATYPE_INTEGER ) = NULL ) then
 3418             exit function
 3419         end if
 3420     next
 3421 
 3422     function = proc
 3423 
 3424 end function
 3425 
 3426 '':::::
 3427 function rtlStrInstr _
 3428     ( _
 3429         byval nd_start as ASTNODE ptr, _
 3430         byval nd_text as ASTNODE ptr, _
 3431         byval nd_pattern as ASTNODE ptr, _
 3432         byval search_any as integer _
 3433     ) as ASTNODE ptr
 3434 
 3435     dim as ASTNODE ptr proc = any
 3436     dim as FBSYMBOL ptr f = any
 3437     dim as integer dtype = any
 3438 
 3439     function = NULL
 3440 
 3441     astTryOvlStringCONV( nd_text )
 3442     if( nd_pattern ) then
 3443         astTryOvlStringCONV( nd_pattern )
 3444     end if
 3445 
 3446     dtype = astGetDataType( nd_text )
 3447 
 3448     ''
 3449     if( search_any ) then
 3450         if( dtype <> FB_DATATYPE_WCHAR ) then
 3451             f = PROCLOOKUP( STRINSTRANY )
 3452         else
 3453             f = PROCLOOKUP( WSTRINSTRANY )
 3454         end if
 3455     else
 3456         if( dtype <> FB_DATATYPE_WCHAR ) then
 3457             f = PROCLOOKUP( STRINSTR )
 3458         else
 3459             f = PROCLOOKUP( WSTRINSTR )
 3460         end if
 3461     end if
 3462 
 3463     proc = astNewCALL( f )
 3464 
 3465     ''
 3466     if( astNewARG( proc, nd_start ) = NULL ) then
 3467         exit function
 3468     end if
 3469 
 3470     if( astNewARG( proc, nd_text ) = NULL ) then
 3471         exit function
 3472     end if
 3473 
 3474     if( astNewARG( proc, nd_pattern ) = NULL ) then
 3475         exit function
 3476     end if
 3477 
 3478     function = proc
 3479 
 3480 end function
 3481 
 3482 '':::::
 3483 function rtlStrInstrRev _
 3484     ( _
 3485         byval nd_start as ASTNODE ptr, _
 3486         byval nd_text as ASTNODE ptr, _
 3487         byval nd_pattern as ASTNODE ptr, _
 3488         byval search_any as integer _
 3489     ) as ASTNODE ptr
 3490 
 3491     dim as ASTNODE ptr proc = any
 3492     dim as FBSYMBOL ptr f = any
 3493     dim as integer dtype = any
 3494 
 3495     function = NULL
 3496 
 3497     astTryOvlStringCONV( nd_text )
 3498     if( nd_pattern ) then
 3499         astTryOvlStringCONV( nd_pattern )
 3500     end if
 3501 
 3502     dtype = astGetDataType( nd_text )
 3503 
 3504     ''
 3505     if( search_any ) then
 3506         if( dtype <> FB_DATATYPE_WCHAR ) then
 3507             f = PROCLOOKUP( STRINSTRREVANY )
 3508         else
 3509             f = PROCLOOKUP( WSTRINSTRREVANY )
 3510         end if
 3511     else
 3512         if( dtype <> FB_DATATYPE_WCHAR ) then
 3513             f = PROCLOOKUP( STRINSTRREV )
 3514         else
 3515             f = PROCLOOKUP( WSTRINSTRREV )
 3516         end if
 3517     end if
 3518 
 3519     proc = astNewCALL( f )
 3520 
 3521     if( astNewARG( proc, nd_text ) = NULL ) then
 3522         exit function
 3523     end if
 3524 
 3525     if( astNewARG( proc, nd_pattern ) = NULL ) then
 3526         exit function
 3527     end if
 3528 
 3529     ''
 3530     if( astNewARG( proc, nd_start ) = NULL ) then
 3531         exit function
 3532     end if
 3533 
 3534     function = proc
 3535 
 3536 end function
 3537 
 3538 '':::::
 3539 function rtlStrTrim _
 3540     ( _
 3541         byval nd_text as ASTNODE ptr, _
 3542         byval nd_pattern as ASTNODE ptr, _
 3543         byval is_any as integer _
 3544     ) as ASTNODE ptr
 3545 
 3546     dim as ASTNODE ptr proc = any
 3547     dim as FBSYMBOL ptr f = any
 3548     dim as integer dtype = any
 3549 
 3550     function = NULL
 3551 
 3552     astTryOvlStringCONV( nd_text )
 3553     if( nd_pattern ) then
 3554         astTryOvlStringCONV( nd_pattern )
 3555     end if
 3556 
 3557     dtype = astGetDataType( nd_text )
 3558 
 3559     ''
 3560     if( is_any ) then
 3561         if( dtype <> FB_DATATYPE_WCHAR ) then
 3562             f = PROCLOOKUP( STRTRIMANY )
 3563         else
 3564             f = PROCLOOKUP( WSTRTRIMANY )
 3565         end if
 3566     elseif( nd_pattern <> NULL ) then
 3567         if( dtype <> FB_DATATYPE_WCHAR ) then
 3568             f = PROCLOOKUP( STRTRIMEX )
 3569         else
 3570             f = PROCLOOKUP( WSTRTRIMEX )
 3571         end if
 3572     else
 3573         if( dtype <> FB_DATATYPE_WCHAR ) then
 3574             f = PROCLOOKUP( STRTRIM )
 3575         else
 3576             f = PROCLOOKUP( WSTRTRIM )
 3577         end if
 3578     end if
 3579     proc = astNewCALL( f )
 3580 
 3581     ''
 3582     if( astNewARG( proc, nd_text ) = NULL ) then
 3583         exit function
 3584     end if
 3585 
 3586     if( nd_pattern<>NULL or is_any ) then
 3587         if( astNewARG( proc, nd_pattern ) = NULL ) then
 3588             exit function
 3589         end if
 3590     end if
 3591 
 3592     function = proc
 3593 
 3594 end function
 3595 
 3596 '':::::
 3597 function rtlStrRTrim _
 3598     ( _
 3599         byval nd_text as ASTNODE ptr, _
 3600         byval nd_pattern as ASTNODE ptr, _
 3601         byval is_any as integer _
 3602     ) as ASTNODE ptr
 3603 
 3604     dim as ASTNODE ptr proc = any
 3605     dim as FBSYMBOL ptr f = any
 3606     dim as integer dtype = any
 3607 
 3608     function = NULL
 3609 
 3610     astTryOvlStringCONV( nd_text )
 3611     if( nd_pattern ) then
 3612         astTryOvlStringCONV( nd_pattern )
 3613     end if
 3614 
 3615     dtype = astGetDataType( nd_text )
 3616 
 3617     ''
 3618     if( is_any ) then
 3619         if( dtype <> FB_DATATYPE_WCHAR ) then
 3620             f = PROCLOOKUP( STRRTRIMANY )
 3621         else
 3622             f = PROCLOOKUP( WSTRRTRIMANY )
 3623         end if
 3624     elseif( nd_pattern <> NULL ) then
 3625         if( dtype <> FB_DATATYPE_WCHAR ) then
 3626             f = PROCLOOKUP( STRRTRIMEX )
 3627         else
 3628             f = PROCLOOKUP( WSTRRTRIMEX )
 3629         end if
 3630     else
 3631         if( dtype <> FB_DATATYPE_WCHAR ) then
 3632             f = PROCLOOKUP( STRRTRIM )
 3633         else
 3634             f = PROCLOOKUP( WSTRRTRIM )
 3635         end if
 3636     end if
 3637     proc = astNewCALL( f )
 3638 
 3639     ''
 3640     if( astNewARG( proc, nd_text ) = NULL ) then
 3641         exit function
 3642     end if
 3643 
 3644     if( nd_pattern<>NULL or is_any ) then
 3645         if( astNewARG( proc, nd_pattern ) = NULL ) then
 3646             exit function
 3647         end if
 3648     end if
 3649 
 3650     function = proc
 3651 
 3652 end function
 3653 
 3654 '':::::
 3655 function rtlStrLTrim _
 3656     ( _
 3657         byval nd_text as ASTNODE ptr, _
 3658         byval nd_pattern as ASTNODE ptr, _
 3659         byval is_any as integer _
 3660     ) as ASTNODE ptr
 3661 
 3662     dim as ASTNODE ptr proc = any
 3663     dim as FBSYMBOL ptr f = any
 3664     dim as integer dtype = any
 3665 
 3666     function = NULL
 3667 
 3668     astTryOvlStringCONV( nd_text )
 3669     if( nd_pattern ) then
 3670         astTryOvlStringCONV( nd_pattern )
 3671     end if
 3672 
 3673     dtype = astGetDataType( nd_text )
 3674 
 3675     ''
 3676     if( is_any ) then
 3677         if( dtype <> FB_DATATYPE_WCHAR ) then
 3678             f = PROCLOOKUP( STRLTRIMANY )
 3679         else
 3680             f = PROCLOOKUP( WSTRLTRIMANY )
 3681         end if
 3682     elseif( nd_pattern <> NULL ) then
 3683         if( dtype <> FB_DATATYPE_WCHAR ) then
 3684             f = PROCLOOKUP( STRLTRIMEX )
 3685         else
 3686             f = PROCLOOKUP( WSTRLTRIMEX )
 3687         end if
 3688     else
 3689         if( dtype <> FB_DATATYPE_WCHAR ) then
 3690             f = PROCLOOKUP( STRLTRIM )
 3691         else
 3692             f = PROCLOOKUP( WSTRLTRIM )
 3693         end if
 3694     end if
 3695     proc = astNewCALL( f )
 3696 
 3697     ''
 3698     if( astNewARG( proc, nd_text ) = NULL ) then
 3699         exit function
 3700     end if
 3701 
 3702     if( nd_pattern<>NULL or is_any ) then
 3703         if( astNewARG( proc, nd_pattern ) = NULL ) then
 3704             exit function
 3705         end if
 3706     end if
 3707 
 3708     function = proc
 3709 
 3710 end function
 3711 
 3712 '' Takes the text from a string literal symbol and performs ASCII-only
 3713 '' Lcase/Ucase on it. The result is a new literal symbol holding the
 3714 '' lcased/ucased text.
 3715 private function hEvalAscCase _
 3716     ( _
 3717         byval literal as FBSYMBOL ptr, _
 3718         byval is_lcase as integer _
 3719     ) as FBSYMBOL ptr
 3720 
 3721     dim as wstring ptr w = any
 3722     dim as zstring ptr z = any
 3723     dim as integer reallength = any, internallength = any
 3724     dim as integer char = any, chara = any, charz = any, chardiff = any
 3725 
 3726     function = NULL
 3727 
 3728     '' Convert to lower case?
 3729     if( is_lcase ) then
 3730         chara = asc( "A" )
 3731         charz = asc( "Z" )
 3732         chardiff = asc( "a" ) - asc( "A" )
 3733     else
 3734         chara = asc( "a" )
 3735         charz = asc( "z" )
 3736         chardiff = cint( asc( "A" ) ) - cint( asc( "a" ) )
 3737     end if
 3738 
 3739     if( symbGetType( literal ) = FB_DATATYPE_WCHAR ) then
 3740         w = symbGetVarLitTextW( literal )
 3741         internallength = len( *w )
 3742         w = hUnescapeW( w )
 3743         reallength = symbGetWstrLen( literal ) - 1
 3744 
 3745         if( internallength <> reallength ) then
 3746             exit function
 3747         end if
 3748 
 3749         for i as integer = 0 to reallength - 1
 3750             char = (*w)[i]
 3751             if( (char >= chara) and (char <= charz) ) then
 3752                 char += chardiff
 3753             end if
 3754             (*w)[i] = char
 3755         next
 3756 
 3757         function = symbAllocWstrConst( w, reallength )
 3758     else
 3759         z = symbGetVarLitText( literal )
 3760         internallength = len( *z )
 3761         z = hUnescape( z )
 3762         reallength = symbGetStrLen( literal ) - 1
 3763 
 3764         '' Don't do it if it includes internal escape sequences,
 3765         '' handling these here would be quite hard... (TODO)
 3766         '' On one hand we should handle "A" disguised as !"\&h41" which
 3767         '' internally is something involving FB_INTSCAPECHAR; on the
 3768         '' other hand to do that we'd have to solve the internal escape
 3769         '' sequences, do the lcase/ucase, and then re-create internal
 3770         '' escape sequences where needed.
 3771         if( internallength <> reallength ) then
 3772             exit function
 3773         end if
 3774 
 3775         for i as integer = 0 to reallength - 1
 3776             char = (*z)[i]
 3777             if( (char >= chara) and (char <= charz) ) then
 3778                 char += chardiff
 3779             end if
 3780             (*z)[i] = char
 3781         next
 3782 
 3783         function = symbAllocStrConst( z, reallength )
 3784     end if
 3785 end function
 3786 
 3787 function rtlStrCase _
 3788     ( _
 3789         byval expr as ASTNODE ptr, _
 3790         byval mode as ASTNODE ptr, _
 3791         byval is_lcase as integer _
 3792     ) as ASTNODE ptr
 3793 
 3794     dim as ASTNODE ptr proc = any
 3795     dim as FBSYMBOL ptr f = any, literal = any
 3796 
 3797     '' Evalute ASCII-only Lcase/Ucase at compile-time if possible.
 3798 
 3799     '' Mode given?
 3800     if( mode ) then
 3801         '' Constant string?
 3802         literal = astGetStrLitSymbol( expr )
 3803         if( literal ) then
 3804             '' Constant mode?
 3805             if( astIsCONST( mode ) ) then
 3806                 '' ASCII-only mode (1)?
 3807                 if( astConstGetAsInt64( mode ) = 1 ) then
 3808                     literal = hEvalAscCase( literal, is_lcase )
 3809                     if( literal ) then
 3810                         return astNewVAR( literal )
 3811                     end if
 3812                 end if
 3813             end if
 3814         end if
 3815     end if
 3816 
 3817     astTryOvlStringCONV( expr )
 3818 
 3819     if( is_lcase ) then
 3820         if( astGetDataType( expr ) = FB_DATATYPE_WCHAR ) then
 3821             f = PROCLOOKUP( WSTRLCASE2 )
 3822         else
 3823             f = PROCLOOKUP( STRLCASE2 )
 3824         end if
 3825     else
 3826         if( astGetDataType( expr ) = FB_DATATYPE_WCHAR ) then
 3827             f = PROCLOOKUP( WSTRUCASE2 )
 3828         else
 3829             f = PROCLOOKUP( STRUCASE2 )
 3830         end if
 3831     end if
 3832 
 3833     proc = astNewCALL( f )
 3834 
 3835     if( astNewARG( proc, expr ) = NULL ) then
 3836         exit function
 3837     end if
 3838 
 3839     '' mode can be NULL, in which case the param's default arg will be used
 3840     if( astNewARG( proc, mode ) = NULL ) then
 3841         exit function
 3842     end if
 3843 
 3844     function = proc
 3845 end function
 3846 
 3847 '':::::
 3848 function rtlStrSwap _
 3849     ( _
 3850         byval str1 as ASTNODE ptr, _
 3851         byval str2 as ASTNODE ptr _
 3852     ) as integer
 3853 
 3854     function = FALSE
 3855 
 3856     var proc = astNewCALL( PROCLOOKUP( STRSWAP ) )
 3857 
 3858     '' always calc len before pushing the param
 3859     var dtype1 = astGetDataType( str1 )
 3860     var length1 = rtlCalcStrLen( str1, dtype1 )
 3861 
 3862     '' always calc len before pushing the param
 3863     var dtype2 = astGetDataType( str2 )
 3864     var length2 = rtlCalcStrLen( str2, dtype2 )
 3865 
 3866     '' byref str1 as any
 3867     if( astNewARG( proc, str1, FB_DATATYPE_STRING ) = NULL ) then
 3868         exit function
 3869     end if
 3870 
 3871     '' byval len1 as integer
 3872     if( astNewARG( proc, astNewCONSTi( length1 ) ) = NULL ) then
 3873         exit function
 3874     end if
 3875 
 3876     '' byval fillrem1 as integer = 1
 3877     if( astNewARG( proc, astNewCONSTi( (dtype1 = FB_DATATYPE_FIXSTR) ) ) = NULL ) then
 3878         exit function
 3879     end if
 3880 
 3881     '' byref str2 as any
 3882     if( astNewARG( proc, str2, FB_DATATYPE_STRING ) = NULL ) then
 3883         exit function
 3884     end if
 3885 
 3886     '' byval len2 as integer
 3887     if( astNewARG( proc, astNewCONSTi( length2 ) ) = NULL ) then
 3888         exit function
 3889     end if
 3890 
 3891     '' byval fillrem2 as integer = 1
 3892     if( astNewARG( proc, astNewCONSTi( (dtype2 = FB_DATATYPE_FIXSTR) ) ) = NULL ) then
 3893         exit function
 3894     end if
 3895 
 3896     astAdd( proc )
 3897 
 3898     function = TRUE
 3899 end function
 3900 
 3901 '':::::
 3902 function rtlWstrSwap _
 3903     ( _
 3904         byval str1 as ASTNODE ptr, _
 3905         byval str2 as ASTNODE ptr _
 3906     ) as integer
 3907 
 3908     function = FALSE
 3909 
 3910     var proc = astNewCALL( PROCLOOKUP( WSTRSWAP ) )
 3911 
 3912     '' always calc len before pushing the param
 3913     var length = rtlCalcStrLen( str1, astGetDataType( str1 ) )
 3914 
 3915     '' byval str1 as wstring ptr
 3916     if( astNewARG( proc, str1 ) = NULL ) then
 3917         exit function
 3918     end if
 3919 
 3920     '' byval len1 as integer
 3921     if( astNewARG( proc, astNewCONSTi( length ) ) = NULL ) then
 3922         exit function
 3923     end if
 3924 
 3925     '' always calc len before pushing the param
 3926     length = rtlCalcStrLen( str2, astGetDataType( str2 ) )
 3927 
 3928     '' byval str2 as wstring ptr
 3929     if( astNewARG( proc, str2 ) = NULL ) then
 3930         exit function
 3931     end if
 3932 
 3933     '' byval len2 as integer
 3934     if( astNewARG( proc, astNewCONSTi( length ) ) = NULL ) then
 3935         exit function
 3936     end if
 3937 
 3938     astAdd( proc )
 3939 
 3940     function = TRUE
 3941 end function