stage4/generate_c/search_type_code.c
changeset 181 38d6eb056260
parent 180 64334c5a00b1
child 182 231633d1d2e4
equal deleted inserted replaced
180:64334c5a00b1 181:38d6eb056260
     1 /*
       
     2  * (c) 2008 Edouard TISSERANT
       
     3  *
       
     4  * Offered to the public under the terms of the GNU General Public License
       
     5  * as published by the Free Software Foundation; either version 2 of the
       
     6  * License, or (at your option) any later version.
       
     7  *
       
     8  * This program is distributed in the hope that it will be useful, but
       
     9  * WITHOUT ANY WARRANTY; without even the implied warranty of
       
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
       
    11  * Public License for more details.
       
    12  *
       
    13  * This code is made available on the understanding that it will not be
       
    14  * used in safety-critical situations without a full and competent review.
       
    15  */
       
    16 
       
    17 /*
       
    18  * An IEC 61131-3 IL and ST compiler.
       
    19  *
       
    20  * Based on the
       
    21  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
       
    22  *
       
    23  */
       
    24 
       
    25 /****
       
    26  * IEC 61131-3 standard function library
       
    27  * generated code, do not edit by hand
       
    28  */
       
    29  
       
    30  
       
    31 
       
    32 void *compute_standard_function_default(function_invocation_c *st_symbol = NULL, il_formal_funct_call_c *il_symbol = NULL) {
       
    33   function_type_t current_function_type;
       
    34   function_call_param_iterator_c *tmp_function_call_param_iterator;
       
    35   if (st_symbol != NULL && il_symbol == NULL) {
       
    36     current_function_type = get_function_type((identifier_c *)st_symbol->function_name);
       
    37     tmp_function_call_param_iterator = new function_call_param_iterator_c(st_symbol);
       
    38   }
       
    39   else if (st_symbol == NULL && il_symbol != NULL) {
       
    40     current_function_type = get_function_type((identifier_c *)il_symbol->function_name);
       
    41     tmp_function_call_param_iterator = new function_call_param_iterator_c(il_symbol);
       
    42   }
       
    43   else
       
    44     ERROR;
       
    45   function_call_param_iterator_c function_call_param_iterator(*tmp_function_call_param_iterator);
       
    46   search_expression_type_c* search_expression_type = this;
       
    47 
       
    48   switch(current_function_type){
       
    49 
       
    50 /****
       
    51  *REAL_TO_SINT
       
    52  */
       
    53     case function_real_to_sint :
       
    54     {
       
    55         symbol_c *last_type_symbol = NULL;
       
    56 
       
    57         {
       
    58             identifier_c param_name("IN");
       
    59             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    60             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    61             symbol_c *IN_type_symbol = NULL;
       
    62             
       
    63             /* Get the value from a foo(<param_value>) style call */
       
    64             if (IN_param_value == NULL)
       
    65               IN_param_value = function_call_param_iterator.next();
       
    66             if (IN_param_value != NULL) {
       
    67               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    68               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    69             }
       
    70             
       
    71             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
    72             {
       
    73         
       
    74                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
    75                 return return_type_symbol;
       
    76                 
       
    77             }
       
    78             
       
    79             
       
    80             ERROR;
       
    81         }
       
    82         
       
    83     }/*function_real_to_sint*/
       
    84     break;
       
    85 
       
    86 /****
       
    87  *REAL_TO_LINT
       
    88  */
       
    89     case function_real_to_lint :
       
    90     {
       
    91         symbol_c *last_type_symbol = NULL;
       
    92 
       
    93         {
       
    94             identifier_c param_name("IN");
       
    95             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    96             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    97             symbol_c *IN_type_symbol = NULL;
       
    98             
       
    99             /* Get the value from a foo(<param_value>) style call */
       
   100             if (IN_param_value == NULL)
       
   101               IN_param_value = function_call_param_iterator.next();
       
   102             if (IN_param_value != NULL) {
       
   103               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   104               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   105             }
       
   106             
       
   107             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   108             {
       
   109         
       
   110                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   111                 return return_type_symbol;
       
   112                 
       
   113             }
       
   114             
       
   115             
       
   116             ERROR;
       
   117         }
       
   118         
       
   119     }/*function_real_to_lint*/
       
   120     break;
       
   121 
       
   122 /****
       
   123  *REAL_TO_DINT
       
   124  */
       
   125     case function_real_to_dint :
       
   126     {
       
   127         symbol_c *last_type_symbol = NULL;
       
   128 
       
   129         {
       
   130             identifier_c param_name("IN");
       
   131             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   132             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   133             symbol_c *IN_type_symbol = NULL;
       
   134             
       
   135             /* Get the value from a foo(<param_value>) style call */
       
   136             if (IN_param_value == NULL)
       
   137               IN_param_value = function_call_param_iterator.next();
       
   138             if (IN_param_value != NULL) {
       
   139               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   140               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   141             }
       
   142             
       
   143             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   144             {
       
   145         
       
   146                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   147                 return return_type_symbol;
       
   148                 
       
   149             }
       
   150             
       
   151             
       
   152             ERROR;
       
   153         }
       
   154         
       
   155     }/*function_real_to_dint*/
       
   156     break;
       
   157 
       
   158 /****
       
   159  *REAL_TO_DATE
       
   160  */
       
   161     case function_real_to_date :
       
   162     {
       
   163         symbol_c *last_type_symbol = NULL;
       
   164 
       
   165         {
       
   166             identifier_c param_name("IN");
       
   167             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   168             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   169             symbol_c *IN_type_symbol = NULL;
       
   170             
       
   171             /* Get the value from a foo(<param_value>) style call */
       
   172             if (IN_param_value == NULL)
       
   173               IN_param_value = function_call_param_iterator.next();
       
   174             if (IN_param_value != NULL) {
       
   175               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   176               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   177             }
       
   178             
       
   179             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   180             {
       
   181         
       
   182                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   183                 return return_type_symbol;
       
   184                 
       
   185             }
       
   186             
       
   187             
       
   188             ERROR;
       
   189         }
       
   190         
       
   191     }/*function_real_to_date*/
       
   192     break;
       
   193 
       
   194 /****
       
   195  *REAL_TO_DWORD
       
   196  */
       
   197     case function_real_to_dword :
       
   198     {
       
   199         symbol_c *last_type_symbol = NULL;
       
   200 
       
   201         {
       
   202             identifier_c param_name("IN");
       
   203             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   204             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   205             symbol_c *IN_type_symbol = NULL;
       
   206             
       
   207             /* Get the value from a foo(<param_value>) style call */
       
   208             if (IN_param_value == NULL)
       
   209               IN_param_value = function_call_param_iterator.next();
       
   210             if (IN_param_value != NULL) {
       
   211               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   212               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   213             }
       
   214             
       
   215             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   216             {
       
   217         
       
   218                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   219                 return return_type_symbol;
       
   220                 
       
   221             }
       
   222             
       
   223             
       
   224             ERROR;
       
   225         }
       
   226         
       
   227     }/*function_real_to_dword*/
       
   228     break;
       
   229 
       
   230 /****
       
   231  *REAL_TO_DT
       
   232  */
       
   233     case function_real_to_dt :
       
   234     {
       
   235         symbol_c *last_type_symbol = NULL;
       
   236 
       
   237         {
       
   238             identifier_c param_name("IN");
       
   239             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   240             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   241             symbol_c *IN_type_symbol = NULL;
       
   242             
       
   243             /* Get the value from a foo(<param_value>) style call */
       
   244             if (IN_param_value == NULL)
       
   245               IN_param_value = function_call_param_iterator.next();
       
   246             if (IN_param_value != NULL) {
       
   247               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   248               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   249             }
       
   250             
       
   251             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   252             {
       
   253         
       
   254                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   255                 return return_type_symbol;
       
   256                 
       
   257             }
       
   258             
       
   259             
       
   260             ERROR;
       
   261         }
       
   262         
       
   263     }/*function_real_to_dt*/
       
   264     break;
       
   265 
       
   266 /****
       
   267  *REAL_TO_TOD
       
   268  */
       
   269     case function_real_to_tod :
       
   270     {
       
   271         symbol_c *last_type_symbol = NULL;
       
   272 
       
   273         {
       
   274             identifier_c param_name("IN");
       
   275             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   276             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   277             symbol_c *IN_type_symbol = NULL;
       
   278             
       
   279             /* Get the value from a foo(<param_value>) style call */
       
   280             if (IN_param_value == NULL)
       
   281               IN_param_value = function_call_param_iterator.next();
       
   282             if (IN_param_value != NULL) {
       
   283               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   284               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   285             }
       
   286             
       
   287             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   288             {
       
   289         
       
   290                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   291                 return return_type_symbol;
       
   292                 
       
   293             }
       
   294             
       
   295             
       
   296             ERROR;
       
   297         }
       
   298         
       
   299     }/*function_real_to_tod*/
       
   300     break;
       
   301 
       
   302 /****
       
   303  *REAL_TO_UDINT
       
   304  */
       
   305     case function_real_to_udint :
       
   306     {
       
   307         symbol_c *last_type_symbol = NULL;
       
   308 
       
   309         {
       
   310             identifier_c param_name("IN");
       
   311             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   312             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   313             symbol_c *IN_type_symbol = NULL;
       
   314             
       
   315             /* Get the value from a foo(<param_value>) style call */
       
   316             if (IN_param_value == NULL)
       
   317               IN_param_value = function_call_param_iterator.next();
       
   318             if (IN_param_value != NULL) {
       
   319               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   320               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   321             }
       
   322             
       
   323             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   324             {
       
   325         
       
   326                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   327                 return return_type_symbol;
       
   328                 
       
   329             }
       
   330             
       
   331             
       
   332             ERROR;
       
   333         }
       
   334         
       
   335     }/*function_real_to_udint*/
       
   336     break;
       
   337 
       
   338 /****
       
   339  *REAL_TO_WORD
       
   340  */
       
   341     case function_real_to_word :
       
   342     {
       
   343         symbol_c *last_type_symbol = NULL;
       
   344 
       
   345         {
       
   346             identifier_c param_name("IN");
       
   347             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   348             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   349             symbol_c *IN_type_symbol = NULL;
       
   350             
       
   351             /* Get the value from a foo(<param_value>) style call */
       
   352             if (IN_param_value == NULL)
       
   353               IN_param_value = function_call_param_iterator.next();
       
   354             if (IN_param_value != NULL) {
       
   355               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   356               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   357             }
       
   358             
       
   359             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   360             {
       
   361         
       
   362                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   363                 return return_type_symbol;
       
   364                 
       
   365             }
       
   366             
       
   367             
       
   368             ERROR;
       
   369         }
       
   370         
       
   371     }/*function_real_to_word*/
       
   372     break;
       
   373 
       
   374 /****
       
   375  *REAL_TO_STRING
       
   376  */
       
   377     case function_real_to_string :
       
   378     {
       
   379         symbol_c *last_type_symbol = NULL;
       
   380 
       
   381         {
       
   382             identifier_c param_name("IN");
       
   383             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   384             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   385             symbol_c *IN_type_symbol = NULL;
       
   386             
       
   387             /* Get the value from a foo(<param_value>) style call */
       
   388             if (IN_param_value == NULL)
       
   389               IN_param_value = function_call_param_iterator.next();
       
   390             if (IN_param_value != NULL) {
       
   391               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   392               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   393             }
       
   394             
       
   395             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   396             {
       
   397         
       
   398                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   399                 return return_type_symbol;
       
   400                 
       
   401             }
       
   402             
       
   403             
       
   404             ERROR;
       
   405         }
       
   406         
       
   407     }/*function_real_to_string*/
       
   408     break;
       
   409 
       
   410 /****
       
   411  *REAL_TO_LWORD
       
   412  */
       
   413     case function_real_to_lword :
       
   414     {
       
   415         symbol_c *last_type_symbol = NULL;
       
   416 
       
   417         {
       
   418             identifier_c param_name("IN");
       
   419             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   420             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   421             symbol_c *IN_type_symbol = NULL;
       
   422             
       
   423             /* Get the value from a foo(<param_value>) style call */
       
   424             if (IN_param_value == NULL)
       
   425               IN_param_value = function_call_param_iterator.next();
       
   426             if (IN_param_value != NULL) {
       
   427               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   428               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   429             }
       
   430             
       
   431             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   432             {
       
   433         
       
   434                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
   435                 return return_type_symbol;
       
   436                 
       
   437             }
       
   438             
       
   439             
       
   440             ERROR;
       
   441         }
       
   442         
       
   443     }/*function_real_to_lword*/
       
   444     break;
       
   445 
       
   446 /****
       
   447  *REAL_TO_UINT
       
   448  */
       
   449     case function_real_to_uint :
       
   450     {
       
   451         symbol_c *last_type_symbol = NULL;
       
   452 
       
   453         {
       
   454             identifier_c param_name("IN");
       
   455             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   456             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   457             symbol_c *IN_type_symbol = NULL;
       
   458             
       
   459             /* Get the value from a foo(<param_value>) style call */
       
   460             if (IN_param_value == NULL)
       
   461               IN_param_value = function_call_param_iterator.next();
       
   462             if (IN_param_value != NULL) {
       
   463               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   464               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   465             }
       
   466             
       
   467             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   468             {
       
   469         
       
   470                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   471                 return return_type_symbol;
       
   472                 
       
   473             }
       
   474             
       
   475             
       
   476             ERROR;
       
   477         }
       
   478         
       
   479     }/*function_real_to_uint*/
       
   480     break;
       
   481 
       
   482 /****
       
   483  *REAL_TO_LREAL
       
   484  */
       
   485     case function_real_to_lreal :
       
   486     {
       
   487         symbol_c *last_type_symbol = NULL;
       
   488 
       
   489         {
       
   490             identifier_c param_name("IN");
       
   491             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   492             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   493             symbol_c *IN_type_symbol = NULL;
       
   494             
       
   495             /* Get the value from a foo(<param_value>) style call */
       
   496             if (IN_param_value == NULL)
       
   497               IN_param_value = function_call_param_iterator.next();
       
   498             if (IN_param_value != NULL) {
       
   499               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   500               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   501             }
       
   502             
       
   503             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   504             {
       
   505         
       
   506                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
   507                 return return_type_symbol;
       
   508                 
       
   509             }
       
   510             
       
   511             
       
   512             ERROR;
       
   513         }
       
   514         
       
   515     }/*function_real_to_lreal*/
       
   516     break;
       
   517 
       
   518 /****
       
   519  *REAL_TO_BYTE
       
   520  */
       
   521     case function_real_to_byte :
       
   522     {
       
   523         symbol_c *last_type_symbol = NULL;
       
   524 
       
   525         {
       
   526             identifier_c param_name("IN");
       
   527             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   528             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   529             symbol_c *IN_type_symbol = NULL;
       
   530             
       
   531             /* Get the value from a foo(<param_value>) style call */
       
   532             if (IN_param_value == NULL)
       
   533               IN_param_value = function_call_param_iterator.next();
       
   534             if (IN_param_value != NULL) {
       
   535               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   536               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   537             }
       
   538             
       
   539             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   540             {
       
   541         
       
   542                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   543                 return return_type_symbol;
       
   544                 
       
   545             }
       
   546             
       
   547             
       
   548             ERROR;
       
   549         }
       
   550         
       
   551     }/*function_real_to_byte*/
       
   552     break;
       
   553 
       
   554 /****
       
   555  *REAL_TO_USINT
       
   556  */
       
   557     case function_real_to_usint :
       
   558     {
       
   559         symbol_c *last_type_symbol = NULL;
       
   560 
       
   561         {
       
   562             identifier_c param_name("IN");
       
   563             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   564             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   565             symbol_c *IN_type_symbol = NULL;
       
   566             
       
   567             /* Get the value from a foo(<param_value>) style call */
       
   568             if (IN_param_value == NULL)
       
   569               IN_param_value = function_call_param_iterator.next();
       
   570             if (IN_param_value != NULL) {
       
   571               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   572               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   573             }
       
   574             
       
   575             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   576             {
       
   577         
       
   578                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   579                 return return_type_symbol;
       
   580                 
       
   581             }
       
   582             
       
   583             
       
   584             ERROR;
       
   585         }
       
   586         
       
   587     }/*function_real_to_usint*/
       
   588     break;
       
   589 
       
   590 /****
       
   591  *REAL_TO_ULINT
       
   592  */
       
   593     case function_real_to_ulint :
       
   594     {
       
   595         symbol_c *last_type_symbol = NULL;
       
   596 
       
   597         {
       
   598             identifier_c param_name("IN");
       
   599             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   600             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   601             symbol_c *IN_type_symbol = NULL;
       
   602             
       
   603             /* Get the value from a foo(<param_value>) style call */
       
   604             if (IN_param_value == NULL)
       
   605               IN_param_value = function_call_param_iterator.next();
       
   606             if (IN_param_value != NULL) {
       
   607               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   608               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   609             }
       
   610             
       
   611             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   612             {
       
   613         
       
   614                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   615                 return return_type_symbol;
       
   616                 
       
   617             }
       
   618             
       
   619             
       
   620             ERROR;
       
   621         }
       
   622         
       
   623     }/*function_real_to_ulint*/
       
   624     break;
       
   625 
       
   626 /****
       
   627  *REAL_TO_BOOL
       
   628  */
       
   629     case function_real_to_bool :
       
   630     {
       
   631         symbol_c *last_type_symbol = NULL;
       
   632 
       
   633         {
       
   634             identifier_c param_name("IN");
       
   635             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   636             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   637             symbol_c *IN_type_symbol = NULL;
       
   638             
       
   639             /* Get the value from a foo(<param_value>) style call */
       
   640             if (IN_param_value == NULL)
       
   641               IN_param_value = function_call_param_iterator.next();
       
   642             if (IN_param_value != NULL) {
       
   643               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   644               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   645             }
       
   646             
       
   647             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   648             {
       
   649         
       
   650                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   651                 return return_type_symbol;
       
   652                 
       
   653             }
       
   654             
       
   655             
       
   656             ERROR;
       
   657         }
       
   658         
       
   659     }/*function_real_to_bool*/
       
   660     break;
       
   661 
       
   662 /****
       
   663  *REAL_TO_TIME
       
   664  */
       
   665     case function_real_to_time :
       
   666     {
       
   667         symbol_c *last_type_symbol = NULL;
       
   668 
       
   669         {
       
   670             identifier_c param_name("IN");
       
   671             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   672             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   673             symbol_c *IN_type_symbol = NULL;
       
   674             
       
   675             /* Get the value from a foo(<param_value>) style call */
       
   676             if (IN_param_value == NULL)
       
   677               IN_param_value = function_call_param_iterator.next();
       
   678             if (IN_param_value != NULL) {
       
   679               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   680               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   681             }
       
   682             
       
   683             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   684             {
       
   685         
       
   686                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   687                 return return_type_symbol;
       
   688                 
       
   689             }
       
   690             
       
   691             
       
   692             ERROR;
       
   693         }
       
   694         
       
   695     }/*function_real_to_time*/
       
   696     break;
       
   697 
       
   698 /****
       
   699  *REAL_TO_INT
       
   700  */
       
   701     case function_real_to_int :
       
   702     {
       
   703         symbol_c *last_type_symbol = NULL;
       
   704 
       
   705         {
       
   706             identifier_c param_name("IN");
       
   707             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   708             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   709             symbol_c *IN_type_symbol = NULL;
       
   710             
       
   711             /* Get the value from a foo(<param_value>) style call */
       
   712             if (IN_param_value == NULL)
       
   713               IN_param_value = function_call_param_iterator.next();
       
   714             if (IN_param_value != NULL) {
       
   715               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   716               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   717             }
       
   718             
       
   719             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   720             {
       
   721         
       
   722                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   723                 return return_type_symbol;
       
   724                 
       
   725             }
       
   726             
       
   727             
       
   728             ERROR;
       
   729         }
       
   730         
       
   731     }/*function_real_to_int*/
       
   732     break;
       
   733 
       
   734 /****
       
   735  *SINT_TO_REAL
       
   736  */
       
   737     case function_sint_to_real :
       
   738     {
       
   739         symbol_c *last_type_symbol = NULL;
       
   740 
       
   741         {
       
   742             identifier_c param_name("IN");
       
   743             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   744             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   745             symbol_c *IN_type_symbol = NULL;
       
   746             
       
   747             /* Get the value from a foo(<param_value>) style call */
       
   748             if (IN_param_value == NULL)
       
   749               IN_param_value = function_call_param_iterator.next();
       
   750             if (IN_param_value != NULL) {
       
   751               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   752               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   753             }
       
   754             
       
   755             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   756             {
       
   757         
       
   758                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   759                 return return_type_symbol;
       
   760                 
       
   761             }
       
   762             
       
   763             
       
   764             ERROR;
       
   765         }
       
   766         
       
   767     }/*function_sint_to_real*/
       
   768     break;
       
   769 
       
   770 /****
       
   771  *SINT_TO_LINT
       
   772  */
       
   773     case function_sint_to_lint :
       
   774     {
       
   775         symbol_c *last_type_symbol = NULL;
       
   776 
       
   777         {
       
   778             identifier_c param_name("IN");
       
   779             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   780             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   781             symbol_c *IN_type_symbol = NULL;
       
   782             
       
   783             /* Get the value from a foo(<param_value>) style call */
       
   784             if (IN_param_value == NULL)
       
   785               IN_param_value = function_call_param_iterator.next();
       
   786             if (IN_param_value != NULL) {
       
   787               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   788               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   789             }
       
   790             
       
   791             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   792             {
       
   793         
       
   794                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   795                 return return_type_symbol;
       
   796                 
       
   797             }
       
   798             
       
   799             
       
   800             ERROR;
       
   801         }
       
   802         
       
   803     }/*function_sint_to_lint*/
       
   804     break;
       
   805 
       
   806 /****
       
   807  *SINT_TO_DINT
       
   808  */
       
   809     case function_sint_to_dint :
       
   810     {
       
   811         symbol_c *last_type_symbol = NULL;
       
   812 
       
   813         {
       
   814             identifier_c param_name("IN");
       
   815             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   816             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   817             symbol_c *IN_type_symbol = NULL;
       
   818             
       
   819             /* Get the value from a foo(<param_value>) style call */
       
   820             if (IN_param_value == NULL)
       
   821               IN_param_value = function_call_param_iterator.next();
       
   822             if (IN_param_value != NULL) {
       
   823               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   824               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   825             }
       
   826             
       
   827             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   828             {
       
   829         
       
   830                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   831                 return return_type_symbol;
       
   832                 
       
   833             }
       
   834             
       
   835             
       
   836             ERROR;
       
   837         }
       
   838         
       
   839     }/*function_sint_to_dint*/
       
   840     break;
       
   841 
       
   842 /****
       
   843  *SINT_TO_DATE
       
   844  */
       
   845     case function_sint_to_date :
       
   846     {
       
   847         symbol_c *last_type_symbol = NULL;
       
   848 
       
   849         {
       
   850             identifier_c param_name("IN");
       
   851             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   852             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   853             symbol_c *IN_type_symbol = NULL;
       
   854             
       
   855             /* Get the value from a foo(<param_value>) style call */
       
   856             if (IN_param_value == NULL)
       
   857               IN_param_value = function_call_param_iterator.next();
       
   858             if (IN_param_value != NULL) {
       
   859               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   860               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   861             }
       
   862             
       
   863             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   864             {
       
   865         
       
   866                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   867                 return return_type_symbol;
       
   868                 
       
   869             }
       
   870             
       
   871             
       
   872             ERROR;
       
   873         }
       
   874         
       
   875     }/*function_sint_to_date*/
       
   876     break;
       
   877 
       
   878 /****
       
   879  *SINT_TO_DWORD
       
   880  */
       
   881     case function_sint_to_dword :
       
   882     {
       
   883         symbol_c *last_type_symbol = NULL;
       
   884 
       
   885         {
       
   886             identifier_c param_name("IN");
       
   887             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   888             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   889             symbol_c *IN_type_symbol = NULL;
       
   890             
       
   891             /* Get the value from a foo(<param_value>) style call */
       
   892             if (IN_param_value == NULL)
       
   893               IN_param_value = function_call_param_iterator.next();
       
   894             if (IN_param_value != NULL) {
       
   895               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   896               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   897             }
       
   898             
       
   899             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   900             {
       
   901         
       
   902                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   903                 return return_type_symbol;
       
   904                 
       
   905             }
       
   906             
       
   907             
       
   908             ERROR;
       
   909         }
       
   910         
       
   911     }/*function_sint_to_dword*/
       
   912     break;
       
   913 
       
   914 /****
       
   915  *SINT_TO_DT
       
   916  */
       
   917     case function_sint_to_dt :
       
   918     {
       
   919         symbol_c *last_type_symbol = NULL;
       
   920 
       
   921         {
       
   922             identifier_c param_name("IN");
       
   923             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   924             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   925             symbol_c *IN_type_symbol = NULL;
       
   926             
       
   927             /* Get the value from a foo(<param_value>) style call */
       
   928             if (IN_param_value == NULL)
       
   929               IN_param_value = function_call_param_iterator.next();
       
   930             if (IN_param_value != NULL) {
       
   931               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   932               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   933             }
       
   934             
       
   935             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   936             {
       
   937         
       
   938                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   939                 return return_type_symbol;
       
   940                 
       
   941             }
       
   942             
       
   943             
       
   944             ERROR;
       
   945         }
       
   946         
       
   947     }/*function_sint_to_dt*/
       
   948     break;
       
   949 
       
   950 /****
       
   951  *SINT_TO_TOD
       
   952  */
       
   953     case function_sint_to_tod :
       
   954     {
       
   955         symbol_c *last_type_symbol = NULL;
       
   956 
       
   957         {
       
   958             identifier_c param_name("IN");
       
   959             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   960             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   961             symbol_c *IN_type_symbol = NULL;
       
   962             
       
   963             /* Get the value from a foo(<param_value>) style call */
       
   964             if (IN_param_value == NULL)
       
   965               IN_param_value = function_call_param_iterator.next();
       
   966             if (IN_param_value != NULL) {
       
   967               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   968               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   969             }
       
   970             
       
   971             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   972             {
       
   973         
       
   974                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   975                 return return_type_symbol;
       
   976                 
       
   977             }
       
   978             
       
   979             
       
   980             ERROR;
       
   981         }
       
   982         
       
   983     }/*function_sint_to_tod*/
       
   984     break;
       
   985 
       
   986 /****
       
   987  *SINT_TO_UDINT
       
   988  */
       
   989     case function_sint_to_udint :
       
   990     {
       
   991         symbol_c *last_type_symbol = NULL;
       
   992 
       
   993         {
       
   994             identifier_c param_name("IN");
       
   995             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   996             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   997             symbol_c *IN_type_symbol = NULL;
       
   998             
       
   999             /* Get the value from a foo(<param_value>) style call */
       
  1000             if (IN_param_value == NULL)
       
  1001               IN_param_value = function_call_param_iterator.next();
       
  1002             if (IN_param_value != NULL) {
       
  1003               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1004               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1005             }
       
  1006             
       
  1007             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1008             {
       
  1009         
       
  1010                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1011                 return return_type_symbol;
       
  1012                 
       
  1013             }
       
  1014             
       
  1015             
       
  1016             ERROR;
       
  1017         }
       
  1018         
       
  1019     }/*function_sint_to_udint*/
       
  1020     break;
       
  1021 
       
  1022 /****
       
  1023  *SINT_TO_WORD
       
  1024  */
       
  1025     case function_sint_to_word :
       
  1026     {
       
  1027         symbol_c *last_type_symbol = NULL;
       
  1028 
       
  1029         {
       
  1030             identifier_c param_name("IN");
       
  1031             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1032             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1033             symbol_c *IN_type_symbol = NULL;
       
  1034             
       
  1035             /* Get the value from a foo(<param_value>) style call */
       
  1036             if (IN_param_value == NULL)
       
  1037               IN_param_value = function_call_param_iterator.next();
       
  1038             if (IN_param_value != NULL) {
       
  1039               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1040               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1041             }
       
  1042             
       
  1043             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1044             {
       
  1045         
       
  1046                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1047                 return return_type_symbol;
       
  1048                 
       
  1049             }
       
  1050             
       
  1051             
       
  1052             ERROR;
       
  1053         }
       
  1054         
       
  1055     }/*function_sint_to_word*/
       
  1056     break;
       
  1057 
       
  1058 /****
       
  1059  *SINT_TO_STRING
       
  1060  */
       
  1061     case function_sint_to_string :
       
  1062     {
       
  1063         symbol_c *last_type_symbol = NULL;
       
  1064 
       
  1065         {
       
  1066             identifier_c param_name("IN");
       
  1067             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1068             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1069             symbol_c *IN_type_symbol = NULL;
       
  1070             
       
  1071             /* Get the value from a foo(<param_value>) style call */
       
  1072             if (IN_param_value == NULL)
       
  1073               IN_param_value = function_call_param_iterator.next();
       
  1074             if (IN_param_value != NULL) {
       
  1075               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1076               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1077             }
       
  1078             
       
  1079             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1080             {
       
  1081         
       
  1082                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1083                 return return_type_symbol;
       
  1084                 
       
  1085             }
       
  1086             
       
  1087             
       
  1088             ERROR;
       
  1089         }
       
  1090         
       
  1091     }/*function_sint_to_string*/
       
  1092     break;
       
  1093 
       
  1094 /****
       
  1095  *SINT_TO_LWORD
       
  1096  */
       
  1097     case function_sint_to_lword :
       
  1098     {
       
  1099         symbol_c *last_type_symbol = NULL;
       
  1100 
       
  1101         {
       
  1102             identifier_c param_name("IN");
       
  1103             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1104             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1105             symbol_c *IN_type_symbol = NULL;
       
  1106             
       
  1107             /* Get the value from a foo(<param_value>) style call */
       
  1108             if (IN_param_value == NULL)
       
  1109               IN_param_value = function_call_param_iterator.next();
       
  1110             if (IN_param_value != NULL) {
       
  1111               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1112               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1113             }
       
  1114             
       
  1115             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1116             {
       
  1117         
       
  1118                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1119                 return return_type_symbol;
       
  1120                 
       
  1121             }
       
  1122             
       
  1123             
       
  1124             ERROR;
       
  1125         }
       
  1126         
       
  1127     }/*function_sint_to_lword*/
       
  1128     break;
       
  1129 
       
  1130 /****
       
  1131  *SINT_TO_UINT
       
  1132  */
       
  1133     case function_sint_to_uint :
       
  1134     {
       
  1135         symbol_c *last_type_symbol = NULL;
       
  1136 
       
  1137         {
       
  1138             identifier_c param_name("IN");
       
  1139             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1140             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1141             symbol_c *IN_type_symbol = NULL;
       
  1142             
       
  1143             /* Get the value from a foo(<param_value>) style call */
       
  1144             if (IN_param_value == NULL)
       
  1145               IN_param_value = function_call_param_iterator.next();
       
  1146             if (IN_param_value != NULL) {
       
  1147               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1148               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1149             }
       
  1150             
       
  1151             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1152             {
       
  1153         
       
  1154                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1155                 return return_type_symbol;
       
  1156                 
       
  1157             }
       
  1158             
       
  1159             
       
  1160             ERROR;
       
  1161         }
       
  1162         
       
  1163     }/*function_sint_to_uint*/
       
  1164     break;
       
  1165 
       
  1166 /****
       
  1167  *SINT_TO_LREAL
       
  1168  */
       
  1169     case function_sint_to_lreal :
       
  1170     {
       
  1171         symbol_c *last_type_symbol = NULL;
       
  1172 
       
  1173         {
       
  1174             identifier_c param_name("IN");
       
  1175             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1176             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1177             symbol_c *IN_type_symbol = NULL;
       
  1178             
       
  1179             /* Get the value from a foo(<param_value>) style call */
       
  1180             if (IN_param_value == NULL)
       
  1181               IN_param_value = function_call_param_iterator.next();
       
  1182             if (IN_param_value != NULL) {
       
  1183               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1184               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1185             }
       
  1186             
       
  1187             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1188             {
       
  1189         
       
  1190                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1191                 return return_type_symbol;
       
  1192                 
       
  1193             }
       
  1194             
       
  1195             
       
  1196             ERROR;
       
  1197         }
       
  1198         
       
  1199     }/*function_sint_to_lreal*/
       
  1200     break;
       
  1201 
       
  1202 /****
       
  1203  *SINT_TO_BYTE
       
  1204  */
       
  1205     case function_sint_to_byte :
       
  1206     {
       
  1207         symbol_c *last_type_symbol = NULL;
       
  1208 
       
  1209         {
       
  1210             identifier_c param_name("IN");
       
  1211             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1212             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1213             symbol_c *IN_type_symbol = NULL;
       
  1214             
       
  1215             /* Get the value from a foo(<param_value>) style call */
       
  1216             if (IN_param_value == NULL)
       
  1217               IN_param_value = function_call_param_iterator.next();
       
  1218             if (IN_param_value != NULL) {
       
  1219               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1220               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1221             }
       
  1222             
       
  1223             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1224             {
       
  1225         
       
  1226                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1227                 return return_type_symbol;
       
  1228                 
       
  1229             }
       
  1230             
       
  1231             
       
  1232             ERROR;
       
  1233         }
       
  1234         
       
  1235     }/*function_sint_to_byte*/
       
  1236     break;
       
  1237 
       
  1238 /****
       
  1239  *SINT_TO_USINT
       
  1240  */
       
  1241     case function_sint_to_usint :
       
  1242     {
       
  1243         symbol_c *last_type_symbol = NULL;
       
  1244 
       
  1245         {
       
  1246             identifier_c param_name("IN");
       
  1247             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1248             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1249             symbol_c *IN_type_symbol = NULL;
       
  1250             
       
  1251             /* Get the value from a foo(<param_value>) style call */
       
  1252             if (IN_param_value == NULL)
       
  1253               IN_param_value = function_call_param_iterator.next();
       
  1254             if (IN_param_value != NULL) {
       
  1255               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1256               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1257             }
       
  1258             
       
  1259             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1260             {
       
  1261         
       
  1262                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1263                 return return_type_symbol;
       
  1264                 
       
  1265             }
       
  1266             
       
  1267             
       
  1268             ERROR;
       
  1269         }
       
  1270         
       
  1271     }/*function_sint_to_usint*/
       
  1272     break;
       
  1273 
       
  1274 /****
       
  1275  *SINT_TO_ULINT
       
  1276  */
       
  1277     case function_sint_to_ulint :
       
  1278     {
       
  1279         symbol_c *last_type_symbol = NULL;
       
  1280 
       
  1281         {
       
  1282             identifier_c param_name("IN");
       
  1283             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1284             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1285             symbol_c *IN_type_symbol = NULL;
       
  1286             
       
  1287             /* Get the value from a foo(<param_value>) style call */
       
  1288             if (IN_param_value == NULL)
       
  1289               IN_param_value = function_call_param_iterator.next();
       
  1290             if (IN_param_value != NULL) {
       
  1291               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1292               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1293             }
       
  1294             
       
  1295             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1296             {
       
  1297         
       
  1298                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1299                 return return_type_symbol;
       
  1300                 
       
  1301             }
       
  1302             
       
  1303             
       
  1304             ERROR;
       
  1305         }
       
  1306         
       
  1307     }/*function_sint_to_ulint*/
       
  1308     break;
       
  1309 
       
  1310 /****
       
  1311  *SINT_TO_BOOL
       
  1312  */
       
  1313     case function_sint_to_bool :
       
  1314     {
       
  1315         symbol_c *last_type_symbol = NULL;
       
  1316 
       
  1317         {
       
  1318             identifier_c param_name("IN");
       
  1319             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1320             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1321             symbol_c *IN_type_symbol = NULL;
       
  1322             
       
  1323             /* Get the value from a foo(<param_value>) style call */
       
  1324             if (IN_param_value == NULL)
       
  1325               IN_param_value = function_call_param_iterator.next();
       
  1326             if (IN_param_value != NULL) {
       
  1327               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1328               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1329             }
       
  1330             
       
  1331             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1332             {
       
  1333         
       
  1334                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1335                 return return_type_symbol;
       
  1336                 
       
  1337             }
       
  1338             
       
  1339             
       
  1340             ERROR;
       
  1341         }
       
  1342         
       
  1343     }/*function_sint_to_bool*/
       
  1344     break;
       
  1345 
       
  1346 /****
       
  1347  *SINT_TO_TIME
       
  1348  */
       
  1349     case function_sint_to_time :
       
  1350     {
       
  1351         symbol_c *last_type_symbol = NULL;
       
  1352 
       
  1353         {
       
  1354             identifier_c param_name("IN");
       
  1355             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1356             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1357             symbol_c *IN_type_symbol = NULL;
       
  1358             
       
  1359             /* Get the value from a foo(<param_value>) style call */
       
  1360             if (IN_param_value == NULL)
       
  1361               IN_param_value = function_call_param_iterator.next();
       
  1362             if (IN_param_value != NULL) {
       
  1363               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1364               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1365             }
       
  1366             
       
  1367             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1368             {
       
  1369         
       
  1370                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1371                 return return_type_symbol;
       
  1372                 
       
  1373             }
       
  1374             
       
  1375             
       
  1376             ERROR;
       
  1377         }
       
  1378         
       
  1379     }/*function_sint_to_time*/
       
  1380     break;
       
  1381 
       
  1382 /****
       
  1383  *SINT_TO_INT
       
  1384  */
       
  1385     case function_sint_to_int :
       
  1386     {
       
  1387         symbol_c *last_type_symbol = NULL;
       
  1388 
       
  1389         {
       
  1390             identifier_c param_name("IN");
       
  1391             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1392             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1393             symbol_c *IN_type_symbol = NULL;
       
  1394             
       
  1395             /* Get the value from a foo(<param_value>) style call */
       
  1396             if (IN_param_value == NULL)
       
  1397               IN_param_value = function_call_param_iterator.next();
       
  1398             if (IN_param_value != NULL) {
       
  1399               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1400               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1401             }
       
  1402             
       
  1403             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1404             {
       
  1405         
       
  1406                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1407                 return return_type_symbol;
       
  1408                 
       
  1409             }
       
  1410             
       
  1411             
       
  1412             ERROR;
       
  1413         }
       
  1414         
       
  1415     }/*function_sint_to_int*/
       
  1416     break;
       
  1417 
       
  1418 /****
       
  1419  *LINT_TO_REAL
       
  1420  */
       
  1421     case function_lint_to_real :
       
  1422     {
       
  1423         symbol_c *last_type_symbol = NULL;
       
  1424 
       
  1425         {
       
  1426             identifier_c param_name("IN");
       
  1427             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1428             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1429             symbol_c *IN_type_symbol = NULL;
       
  1430             
       
  1431             /* Get the value from a foo(<param_value>) style call */
       
  1432             if (IN_param_value == NULL)
       
  1433               IN_param_value = function_call_param_iterator.next();
       
  1434             if (IN_param_value != NULL) {
       
  1435               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1436               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1437             }
       
  1438             
       
  1439             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1440             {
       
  1441         
       
  1442                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1443                 return return_type_symbol;
       
  1444                 
       
  1445             }
       
  1446             
       
  1447             
       
  1448             ERROR;
       
  1449         }
       
  1450         
       
  1451     }/*function_lint_to_real*/
       
  1452     break;
       
  1453 
       
  1454 /****
       
  1455  *LINT_TO_SINT
       
  1456  */
       
  1457     case function_lint_to_sint :
       
  1458     {
       
  1459         symbol_c *last_type_symbol = NULL;
       
  1460 
       
  1461         {
       
  1462             identifier_c param_name("IN");
       
  1463             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1464             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1465             symbol_c *IN_type_symbol = NULL;
       
  1466             
       
  1467             /* Get the value from a foo(<param_value>) style call */
       
  1468             if (IN_param_value == NULL)
       
  1469               IN_param_value = function_call_param_iterator.next();
       
  1470             if (IN_param_value != NULL) {
       
  1471               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1472               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1473             }
       
  1474             
       
  1475             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1476             {
       
  1477         
       
  1478                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  1479                 return return_type_symbol;
       
  1480                 
       
  1481             }
       
  1482             
       
  1483             
       
  1484             ERROR;
       
  1485         }
       
  1486         
       
  1487     }/*function_lint_to_sint*/
       
  1488     break;
       
  1489 
       
  1490 /****
       
  1491  *LINT_TO_DINT
       
  1492  */
       
  1493     case function_lint_to_dint :
       
  1494     {
       
  1495         symbol_c *last_type_symbol = NULL;
       
  1496 
       
  1497         {
       
  1498             identifier_c param_name("IN");
       
  1499             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1500             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1501             symbol_c *IN_type_symbol = NULL;
       
  1502             
       
  1503             /* Get the value from a foo(<param_value>) style call */
       
  1504             if (IN_param_value == NULL)
       
  1505               IN_param_value = function_call_param_iterator.next();
       
  1506             if (IN_param_value != NULL) {
       
  1507               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1508               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1509             }
       
  1510             
       
  1511             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1512             {
       
  1513         
       
  1514                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1515                 return return_type_symbol;
       
  1516                 
       
  1517             }
       
  1518             
       
  1519             
       
  1520             ERROR;
       
  1521         }
       
  1522         
       
  1523     }/*function_lint_to_dint*/
       
  1524     break;
       
  1525 
       
  1526 /****
       
  1527  *LINT_TO_DATE
       
  1528  */
       
  1529     case function_lint_to_date :
       
  1530     {
       
  1531         symbol_c *last_type_symbol = NULL;
       
  1532 
       
  1533         {
       
  1534             identifier_c param_name("IN");
       
  1535             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1536             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1537             symbol_c *IN_type_symbol = NULL;
       
  1538             
       
  1539             /* Get the value from a foo(<param_value>) style call */
       
  1540             if (IN_param_value == NULL)
       
  1541               IN_param_value = function_call_param_iterator.next();
       
  1542             if (IN_param_value != NULL) {
       
  1543               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1544               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1545             }
       
  1546             
       
  1547             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1548             {
       
  1549         
       
  1550                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1551                 return return_type_symbol;
       
  1552                 
       
  1553             }
       
  1554             
       
  1555             
       
  1556             ERROR;
       
  1557         }
       
  1558         
       
  1559     }/*function_lint_to_date*/
       
  1560     break;
       
  1561 
       
  1562 /****
       
  1563  *LINT_TO_DWORD
       
  1564  */
       
  1565     case function_lint_to_dword :
       
  1566     {
       
  1567         symbol_c *last_type_symbol = NULL;
       
  1568 
       
  1569         {
       
  1570             identifier_c param_name("IN");
       
  1571             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1572             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1573             symbol_c *IN_type_symbol = NULL;
       
  1574             
       
  1575             /* Get the value from a foo(<param_value>) style call */
       
  1576             if (IN_param_value == NULL)
       
  1577               IN_param_value = function_call_param_iterator.next();
       
  1578             if (IN_param_value != NULL) {
       
  1579               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1580               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1581             }
       
  1582             
       
  1583             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1584             {
       
  1585         
       
  1586                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1587                 return return_type_symbol;
       
  1588                 
       
  1589             }
       
  1590             
       
  1591             
       
  1592             ERROR;
       
  1593         }
       
  1594         
       
  1595     }/*function_lint_to_dword*/
       
  1596     break;
       
  1597 
       
  1598 /****
       
  1599  *LINT_TO_DT
       
  1600  */
       
  1601     case function_lint_to_dt :
       
  1602     {
       
  1603         symbol_c *last_type_symbol = NULL;
       
  1604 
       
  1605         {
       
  1606             identifier_c param_name("IN");
       
  1607             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1608             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1609             symbol_c *IN_type_symbol = NULL;
       
  1610             
       
  1611             /* Get the value from a foo(<param_value>) style call */
       
  1612             if (IN_param_value == NULL)
       
  1613               IN_param_value = function_call_param_iterator.next();
       
  1614             if (IN_param_value != NULL) {
       
  1615               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1616               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1617             }
       
  1618             
       
  1619             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1620             {
       
  1621         
       
  1622                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1623                 return return_type_symbol;
       
  1624                 
       
  1625             }
       
  1626             
       
  1627             
       
  1628             ERROR;
       
  1629         }
       
  1630         
       
  1631     }/*function_lint_to_dt*/
       
  1632     break;
       
  1633 
       
  1634 /****
       
  1635  *LINT_TO_TOD
       
  1636  */
       
  1637     case function_lint_to_tod :
       
  1638     {
       
  1639         symbol_c *last_type_symbol = NULL;
       
  1640 
       
  1641         {
       
  1642             identifier_c param_name("IN");
       
  1643             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1644             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1645             symbol_c *IN_type_symbol = NULL;
       
  1646             
       
  1647             /* Get the value from a foo(<param_value>) style call */
       
  1648             if (IN_param_value == NULL)
       
  1649               IN_param_value = function_call_param_iterator.next();
       
  1650             if (IN_param_value != NULL) {
       
  1651               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1652               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1653             }
       
  1654             
       
  1655             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1656             {
       
  1657         
       
  1658                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1659                 return return_type_symbol;
       
  1660                 
       
  1661             }
       
  1662             
       
  1663             
       
  1664             ERROR;
       
  1665         }
       
  1666         
       
  1667     }/*function_lint_to_tod*/
       
  1668     break;
       
  1669 
       
  1670 /****
       
  1671  *LINT_TO_UDINT
       
  1672  */
       
  1673     case function_lint_to_udint :
       
  1674     {
       
  1675         symbol_c *last_type_symbol = NULL;
       
  1676 
       
  1677         {
       
  1678             identifier_c param_name("IN");
       
  1679             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1680             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1681             symbol_c *IN_type_symbol = NULL;
       
  1682             
       
  1683             /* Get the value from a foo(<param_value>) style call */
       
  1684             if (IN_param_value == NULL)
       
  1685               IN_param_value = function_call_param_iterator.next();
       
  1686             if (IN_param_value != NULL) {
       
  1687               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1688               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1689             }
       
  1690             
       
  1691             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1692             {
       
  1693         
       
  1694                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1695                 return return_type_symbol;
       
  1696                 
       
  1697             }
       
  1698             
       
  1699             
       
  1700             ERROR;
       
  1701         }
       
  1702         
       
  1703     }/*function_lint_to_udint*/
       
  1704     break;
       
  1705 
       
  1706 /****
       
  1707  *LINT_TO_WORD
       
  1708  */
       
  1709     case function_lint_to_word :
       
  1710     {
       
  1711         symbol_c *last_type_symbol = NULL;
       
  1712 
       
  1713         {
       
  1714             identifier_c param_name("IN");
       
  1715             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1716             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1717             symbol_c *IN_type_symbol = NULL;
       
  1718             
       
  1719             /* Get the value from a foo(<param_value>) style call */
       
  1720             if (IN_param_value == NULL)
       
  1721               IN_param_value = function_call_param_iterator.next();
       
  1722             if (IN_param_value != NULL) {
       
  1723               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1724               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1725             }
       
  1726             
       
  1727             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1728             {
       
  1729         
       
  1730                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1731                 return return_type_symbol;
       
  1732                 
       
  1733             }
       
  1734             
       
  1735             
       
  1736             ERROR;
       
  1737         }
       
  1738         
       
  1739     }/*function_lint_to_word*/
       
  1740     break;
       
  1741 
       
  1742 /****
       
  1743  *LINT_TO_STRING
       
  1744  */
       
  1745     case function_lint_to_string :
       
  1746     {
       
  1747         symbol_c *last_type_symbol = NULL;
       
  1748 
       
  1749         {
       
  1750             identifier_c param_name("IN");
       
  1751             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1752             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1753             symbol_c *IN_type_symbol = NULL;
       
  1754             
       
  1755             /* Get the value from a foo(<param_value>) style call */
       
  1756             if (IN_param_value == NULL)
       
  1757               IN_param_value = function_call_param_iterator.next();
       
  1758             if (IN_param_value != NULL) {
       
  1759               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1760               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1761             }
       
  1762             
       
  1763             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1764             {
       
  1765         
       
  1766                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1767                 return return_type_symbol;
       
  1768                 
       
  1769             }
       
  1770             
       
  1771             
       
  1772             ERROR;
       
  1773         }
       
  1774         
       
  1775     }/*function_lint_to_string*/
       
  1776     break;
       
  1777 
       
  1778 /****
       
  1779  *LINT_TO_LWORD
       
  1780  */
       
  1781     case function_lint_to_lword :
       
  1782     {
       
  1783         symbol_c *last_type_symbol = NULL;
       
  1784 
       
  1785         {
       
  1786             identifier_c param_name("IN");
       
  1787             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1788             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1789             symbol_c *IN_type_symbol = NULL;
       
  1790             
       
  1791             /* Get the value from a foo(<param_value>) style call */
       
  1792             if (IN_param_value == NULL)
       
  1793               IN_param_value = function_call_param_iterator.next();
       
  1794             if (IN_param_value != NULL) {
       
  1795               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1796               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1797             }
       
  1798             
       
  1799             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1800             {
       
  1801         
       
  1802                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1803                 return return_type_symbol;
       
  1804                 
       
  1805             }
       
  1806             
       
  1807             
       
  1808             ERROR;
       
  1809         }
       
  1810         
       
  1811     }/*function_lint_to_lword*/
       
  1812     break;
       
  1813 
       
  1814 /****
       
  1815  *LINT_TO_UINT
       
  1816  */
       
  1817     case function_lint_to_uint :
       
  1818     {
       
  1819         symbol_c *last_type_symbol = NULL;
       
  1820 
       
  1821         {
       
  1822             identifier_c param_name("IN");
       
  1823             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1824             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1825             symbol_c *IN_type_symbol = NULL;
       
  1826             
       
  1827             /* Get the value from a foo(<param_value>) style call */
       
  1828             if (IN_param_value == NULL)
       
  1829               IN_param_value = function_call_param_iterator.next();
       
  1830             if (IN_param_value != NULL) {
       
  1831               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1832               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1833             }
       
  1834             
       
  1835             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1836             {
       
  1837         
       
  1838                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1839                 return return_type_symbol;
       
  1840                 
       
  1841             }
       
  1842             
       
  1843             
       
  1844             ERROR;
       
  1845         }
       
  1846         
       
  1847     }/*function_lint_to_uint*/
       
  1848     break;
       
  1849 
       
  1850 /****
       
  1851  *LINT_TO_LREAL
       
  1852  */
       
  1853     case function_lint_to_lreal :
       
  1854     {
       
  1855         symbol_c *last_type_symbol = NULL;
       
  1856 
       
  1857         {
       
  1858             identifier_c param_name("IN");
       
  1859             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1860             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1861             symbol_c *IN_type_symbol = NULL;
       
  1862             
       
  1863             /* Get the value from a foo(<param_value>) style call */
       
  1864             if (IN_param_value == NULL)
       
  1865               IN_param_value = function_call_param_iterator.next();
       
  1866             if (IN_param_value != NULL) {
       
  1867               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1868               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1869             }
       
  1870             
       
  1871             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1872             {
       
  1873         
       
  1874                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1875                 return return_type_symbol;
       
  1876                 
       
  1877             }
       
  1878             
       
  1879             
       
  1880             ERROR;
       
  1881         }
       
  1882         
       
  1883     }/*function_lint_to_lreal*/
       
  1884     break;
       
  1885 
       
  1886 /****
       
  1887  *LINT_TO_BYTE
       
  1888  */
       
  1889     case function_lint_to_byte :
       
  1890     {
       
  1891         symbol_c *last_type_symbol = NULL;
       
  1892 
       
  1893         {
       
  1894             identifier_c param_name("IN");
       
  1895             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1896             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1897             symbol_c *IN_type_symbol = NULL;
       
  1898             
       
  1899             /* Get the value from a foo(<param_value>) style call */
       
  1900             if (IN_param_value == NULL)
       
  1901               IN_param_value = function_call_param_iterator.next();
       
  1902             if (IN_param_value != NULL) {
       
  1903               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1904               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1905             }
       
  1906             
       
  1907             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1908             {
       
  1909         
       
  1910                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1911                 return return_type_symbol;
       
  1912                 
       
  1913             }
       
  1914             
       
  1915             
       
  1916             ERROR;
       
  1917         }
       
  1918         
       
  1919     }/*function_lint_to_byte*/
       
  1920     break;
       
  1921 
       
  1922 /****
       
  1923  *LINT_TO_USINT
       
  1924  */
       
  1925     case function_lint_to_usint :
       
  1926     {
       
  1927         symbol_c *last_type_symbol = NULL;
       
  1928 
       
  1929         {
       
  1930             identifier_c param_name("IN");
       
  1931             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1932             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1933             symbol_c *IN_type_symbol = NULL;
       
  1934             
       
  1935             /* Get the value from a foo(<param_value>) style call */
       
  1936             if (IN_param_value == NULL)
       
  1937               IN_param_value = function_call_param_iterator.next();
       
  1938             if (IN_param_value != NULL) {
       
  1939               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1940               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1941             }
       
  1942             
       
  1943             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1944             {
       
  1945         
       
  1946                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1947                 return return_type_symbol;
       
  1948                 
       
  1949             }
       
  1950             
       
  1951             
       
  1952             ERROR;
       
  1953         }
       
  1954         
       
  1955     }/*function_lint_to_usint*/
       
  1956     break;
       
  1957 
       
  1958 /****
       
  1959  *LINT_TO_ULINT
       
  1960  */
       
  1961     case function_lint_to_ulint :
       
  1962     {
       
  1963         symbol_c *last_type_symbol = NULL;
       
  1964 
       
  1965         {
       
  1966             identifier_c param_name("IN");
       
  1967             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1968             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1969             symbol_c *IN_type_symbol = NULL;
       
  1970             
       
  1971             /* Get the value from a foo(<param_value>) style call */
       
  1972             if (IN_param_value == NULL)
       
  1973               IN_param_value = function_call_param_iterator.next();
       
  1974             if (IN_param_value != NULL) {
       
  1975               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1976               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1977             }
       
  1978             
       
  1979             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1980             {
       
  1981         
       
  1982                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1983                 return return_type_symbol;
       
  1984                 
       
  1985             }
       
  1986             
       
  1987             
       
  1988             ERROR;
       
  1989         }
       
  1990         
       
  1991     }/*function_lint_to_ulint*/
       
  1992     break;
       
  1993 
       
  1994 /****
       
  1995  *LINT_TO_BOOL
       
  1996  */
       
  1997     case function_lint_to_bool :
       
  1998     {
       
  1999         symbol_c *last_type_symbol = NULL;
       
  2000 
       
  2001         {
       
  2002             identifier_c param_name("IN");
       
  2003             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2004             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2005             symbol_c *IN_type_symbol = NULL;
       
  2006             
       
  2007             /* Get the value from a foo(<param_value>) style call */
       
  2008             if (IN_param_value == NULL)
       
  2009               IN_param_value = function_call_param_iterator.next();
       
  2010             if (IN_param_value != NULL) {
       
  2011               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2012               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2013             }
       
  2014             
       
  2015             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2016             {
       
  2017         
       
  2018                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2019                 return return_type_symbol;
       
  2020                 
       
  2021             }
       
  2022             
       
  2023             
       
  2024             ERROR;
       
  2025         }
       
  2026         
       
  2027     }/*function_lint_to_bool*/
       
  2028     break;
       
  2029 
       
  2030 /****
       
  2031  *LINT_TO_TIME
       
  2032  */
       
  2033     case function_lint_to_time :
       
  2034     {
       
  2035         symbol_c *last_type_symbol = NULL;
       
  2036 
       
  2037         {
       
  2038             identifier_c param_name("IN");
       
  2039             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2040             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2041             symbol_c *IN_type_symbol = NULL;
       
  2042             
       
  2043             /* Get the value from a foo(<param_value>) style call */
       
  2044             if (IN_param_value == NULL)
       
  2045               IN_param_value = function_call_param_iterator.next();
       
  2046             if (IN_param_value != NULL) {
       
  2047               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2048               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2049             }
       
  2050             
       
  2051             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2052             {
       
  2053         
       
  2054                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2055                 return return_type_symbol;
       
  2056                 
       
  2057             }
       
  2058             
       
  2059             
       
  2060             ERROR;
       
  2061         }
       
  2062         
       
  2063     }/*function_lint_to_time*/
       
  2064     break;
       
  2065 
       
  2066 /****
       
  2067  *LINT_TO_INT
       
  2068  */
       
  2069     case function_lint_to_int :
       
  2070     {
       
  2071         symbol_c *last_type_symbol = NULL;
       
  2072 
       
  2073         {
       
  2074             identifier_c param_name("IN");
       
  2075             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2076             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2077             symbol_c *IN_type_symbol = NULL;
       
  2078             
       
  2079             /* Get the value from a foo(<param_value>) style call */
       
  2080             if (IN_param_value == NULL)
       
  2081               IN_param_value = function_call_param_iterator.next();
       
  2082             if (IN_param_value != NULL) {
       
  2083               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2084               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2085             }
       
  2086             
       
  2087             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2088             {
       
  2089         
       
  2090                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2091                 return return_type_symbol;
       
  2092                 
       
  2093             }
       
  2094             
       
  2095             
       
  2096             ERROR;
       
  2097         }
       
  2098         
       
  2099     }/*function_lint_to_int*/
       
  2100     break;
       
  2101 
       
  2102 /****
       
  2103  *DINT_TO_REAL
       
  2104  */
       
  2105     case function_dint_to_real :
       
  2106     {
       
  2107         symbol_c *last_type_symbol = NULL;
       
  2108 
       
  2109         {
       
  2110             identifier_c param_name("IN");
       
  2111             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2112             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2113             symbol_c *IN_type_symbol = NULL;
       
  2114             
       
  2115             /* Get the value from a foo(<param_value>) style call */
       
  2116             if (IN_param_value == NULL)
       
  2117               IN_param_value = function_call_param_iterator.next();
       
  2118             if (IN_param_value != NULL) {
       
  2119               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2120               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2121             }
       
  2122             
       
  2123             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2124             {
       
  2125         
       
  2126                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2127                 return return_type_symbol;
       
  2128                 
       
  2129             }
       
  2130             
       
  2131             
       
  2132             ERROR;
       
  2133         }
       
  2134         
       
  2135     }/*function_dint_to_real*/
       
  2136     break;
       
  2137 
       
  2138 /****
       
  2139  *DINT_TO_SINT
       
  2140  */
       
  2141     case function_dint_to_sint :
       
  2142     {
       
  2143         symbol_c *last_type_symbol = NULL;
       
  2144 
       
  2145         {
       
  2146             identifier_c param_name("IN");
       
  2147             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2148             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2149             symbol_c *IN_type_symbol = NULL;
       
  2150             
       
  2151             /* Get the value from a foo(<param_value>) style call */
       
  2152             if (IN_param_value == NULL)
       
  2153               IN_param_value = function_call_param_iterator.next();
       
  2154             if (IN_param_value != NULL) {
       
  2155               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2156               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2157             }
       
  2158             
       
  2159             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2160             {
       
  2161         
       
  2162                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2163                 return return_type_symbol;
       
  2164                 
       
  2165             }
       
  2166             
       
  2167             
       
  2168             ERROR;
       
  2169         }
       
  2170         
       
  2171     }/*function_dint_to_sint*/
       
  2172     break;
       
  2173 
       
  2174 /****
       
  2175  *DINT_TO_LINT
       
  2176  */
       
  2177     case function_dint_to_lint :
       
  2178     {
       
  2179         symbol_c *last_type_symbol = NULL;
       
  2180 
       
  2181         {
       
  2182             identifier_c param_name("IN");
       
  2183             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2184             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2185             symbol_c *IN_type_symbol = NULL;
       
  2186             
       
  2187             /* Get the value from a foo(<param_value>) style call */
       
  2188             if (IN_param_value == NULL)
       
  2189               IN_param_value = function_call_param_iterator.next();
       
  2190             if (IN_param_value != NULL) {
       
  2191               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2192               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2193             }
       
  2194             
       
  2195             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2196             {
       
  2197         
       
  2198                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2199                 return return_type_symbol;
       
  2200                 
       
  2201             }
       
  2202             
       
  2203             
       
  2204             ERROR;
       
  2205         }
       
  2206         
       
  2207     }/*function_dint_to_lint*/
       
  2208     break;
       
  2209 
       
  2210 /****
       
  2211  *DINT_TO_DATE
       
  2212  */
       
  2213     case function_dint_to_date :
       
  2214     {
       
  2215         symbol_c *last_type_symbol = NULL;
       
  2216 
       
  2217         {
       
  2218             identifier_c param_name("IN");
       
  2219             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2220             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2221             symbol_c *IN_type_symbol = NULL;
       
  2222             
       
  2223             /* Get the value from a foo(<param_value>) style call */
       
  2224             if (IN_param_value == NULL)
       
  2225               IN_param_value = function_call_param_iterator.next();
       
  2226             if (IN_param_value != NULL) {
       
  2227               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2228               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2229             }
       
  2230             
       
  2231             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2232             {
       
  2233         
       
  2234                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2235                 return return_type_symbol;
       
  2236                 
       
  2237             }
       
  2238             
       
  2239             
       
  2240             ERROR;
       
  2241         }
       
  2242         
       
  2243     }/*function_dint_to_date*/
       
  2244     break;
       
  2245 
       
  2246 /****
       
  2247  *DINT_TO_DWORD
       
  2248  */
       
  2249     case function_dint_to_dword :
       
  2250     {
       
  2251         symbol_c *last_type_symbol = NULL;
       
  2252 
       
  2253         {
       
  2254             identifier_c param_name("IN");
       
  2255             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2256             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2257             symbol_c *IN_type_symbol = NULL;
       
  2258             
       
  2259             /* Get the value from a foo(<param_value>) style call */
       
  2260             if (IN_param_value == NULL)
       
  2261               IN_param_value = function_call_param_iterator.next();
       
  2262             if (IN_param_value != NULL) {
       
  2263               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2264               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2265             }
       
  2266             
       
  2267             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2268             {
       
  2269         
       
  2270                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2271                 return return_type_symbol;
       
  2272                 
       
  2273             }
       
  2274             
       
  2275             
       
  2276             ERROR;
       
  2277         }
       
  2278         
       
  2279     }/*function_dint_to_dword*/
       
  2280     break;
       
  2281 
       
  2282 /****
       
  2283  *DINT_TO_DT
       
  2284  */
       
  2285     case function_dint_to_dt :
       
  2286     {
       
  2287         symbol_c *last_type_symbol = NULL;
       
  2288 
       
  2289         {
       
  2290             identifier_c param_name("IN");
       
  2291             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2292             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2293             symbol_c *IN_type_symbol = NULL;
       
  2294             
       
  2295             /* Get the value from a foo(<param_value>) style call */
       
  2296             if (IN_param_value == NULL)
       
  2297               IN_param_value = function_call_param_iterator.next();
       
  2298             if (IN_param_value != NULL) {
       
  2299               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2300               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2301             }
       
  2302             
       
  2303             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2304             {
       
  2305         
       
  2306                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2307                 return return_type_symbol;
       
  2308                 
       
  2309             }
       
  2310             
       
  2311             
       
  2312             ERROR;
       
  2313         }
       
  2314         
       
  2315     }/*function_dint_to_dt*/
       
  2316     break;
       
  2317 
       
  2318 /****
       
  2319  *DINT_TO_TOD
       
  2320  */
       
  2321     case function_dint_to_tod :
       
  2322     {
       
  2323         symbol_c *last_type_symbol = NULL;
       
  2324 
       
  2325         {
       
  2326             identifier_c param_name("IN");
       
  2327             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2328             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2329             symbol_c *IN_type_symbol = NULL;
       
  2330             
       
  2331             /* Get the value from a foo(<param_value>) style call */
       
  2332             if (IN_param_value == NULL)
       
  2333               IN_param_value = function_call_param_iterator.next();
       
  2334             if (IN_param_value != NULL) {
       
  2335               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2336               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2337             }
       
  2338             
       
  2339             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2340             {
       
  2341         
       
  2342                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2343                 return return_type_symbol;
       
  2344                 
       
  2345             }
       
  2346             
       
  2347             
       
  2348             ERROR;
       
  2349         }
       
  2350         
       
  2351     }/*function_dint_to_tod*/
       
  2352     break;
       
  2353 
       
  2354 /****
       
  2355  *DINT_TO_UDINT
       
  2356  */
       
  2357     case function_dint_to_udint :
       
  2358     {
       
  2359         symbol_c *last_type_symbol = NULL;
       
  2360 
       
  2361         {
       
  2362             identifier_c param_name("IN");
       
  2363             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2364             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2365             symbol_c *IN_type_symbol = NULL;
       
  2366             
       
  2367             /* Get the value from a foo(<param_value>) style call */
       
  2368             if (IN_param_value == NULL)
       
  2369               IN_param_value = function_call_param_iterator.next();
       
  2370             if (IN_param_value != NULL) {
       
  2371               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2372               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2373             }
       
  2374             
       
  2375             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2376             {
       
  2377         
       
  2378                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2379                 return return_type_symbol;
       
  2380                 
       
  2381             }
       
  2382             
       
  2383             
       
  2384             ERROR;
       
  2385         }
       
  2386         
       
  2387     }/*function_dint_to_udint*/
       
  2388     break;
       
  2389 
       
  2390 /****
       
  2391  *DINT_TO_WORD
       
  2392  */
       
  2393     case function_dint_to_word :
       
  2394     {
       
  2395         symbol_c *last_type_symbol = NULL;
       
  2396 
       
  2397         {
       
  2398             identifier_c param_name("IN");
       
  2399             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2400             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2401             symbol_c *IN_type_symbol = NULL;
       
  2402             
       
  2403             /* Get the value from a foo(<param_value>) style call */
       
  2404             if (IN_param_value == NULL)
       
  2405               IN_param_value = function_call_param_iterator.next();
       
  2406             if (IN_param_value != NULL) {
       
  2407               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2408               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2409             }
       
  2410             
       
  2411             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2412             {
       
  2413         
       
  2414                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2415                 return return_type_symbol;
       
  2416                 
       
  2417             }
       
  2418             
       
  2419             
       
  2420             ERROR;
       
  2421         }
       
  2422         
       
  2423     }/*function_dint_to_word*/
       
  2424     break;
       
  2425 
       
  2426 /****
       
  2427  *DINT_TO_STRING
       
  2428  */
       
  2429     case function_dint_to_string :
       
  2430     {
       
  2431         symbol_c *last_type_symbol = NULL;
       
  2432 
       
  2433         {
       
  2434             identifier_c param_name("IN");
       
  2435             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2436             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2437             symbol_c *IN_type_symbol = NULL;
       
  2438             
       
  2439             /* Get the value from a foo(<param_value>) style call */
       
  2440             if (IN_param_value == NULL)
       
  2441               IN_param_value = function_call_param_iterator.next();
       
  2442             if (IN_param_value != NULL) {
       
  2443               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2444               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2445             }
       
  2446             
       
  2447             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2448             {
       
  2449         
       
  2450                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2451                 return return_type_symbol;
       
  2452                 
       
  2453             }
       
  2454             
       
  2455             
       
  2456             ERROR;
       
  2457         }
       
  2458         
       
  2459     }/*function_dint_to_string*/
       
  2460     break;
       
  2461 
       
  2462 /****
       
  2463  *DINT_TO_LWORD
       
  2464  */
       
  2465     case function_dint_to_lword :
       
  2466     {
       
  2467         symbol_c *last_type_symbol = NULL;
       
  2468 
       
  2469         {
       
  2470             identifier_c param_name("IN");
       
  2471             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2472             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2473             symbol_c *IN_type_symbol = NULL;
       
  2474             
       
  2475             /* Get the value from a foo(<param_value>) style call */
       
  2476             if (IN_param_value == NULL)
       
  2477               IN_param_value = function_call_param_iterator.next();
       
  2478             if (IN_param_value != NULL) {
       
  2479               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2480               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2481             }
       
  2482             
       
  2483             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2484             {
       
  2485         
       
  2486                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2487                 return return_type_symbol;
       
  2488                 
       
  2489             }
       
  2490             
       
  2491             
       
  2492             ERROR;
       
  2493         }
       
  2494         
       
  2495     }/*function_dint_to_lword*/
       
  2496     break;
       
  2497 
       
  2498 /****
       
  2499  *DINT_TO_UINT
       
  2500  */
       
  2501     case function_dint_to_uint :
       
  2502     {
       
  2503         symbol_c *last_type_symbol = NULL;
       
  2504 
       
  2505         {
       
  2506             identifier_c param_name("IN");
       
  2507             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2508             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2509             symbol_c *IN_type_symbol = NULL;
       
  2510             
       
  2511             /* Get the value from a foo(<param_value>) style call */
       
  2512             if (IN_param_value == NULL)
       
  2513               IN_param_value = function_call_param_iterator.next();
       
  2514             if (IN_param_value != NULL) {
       
  2515               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2516               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2517             }
       
  2518             
       
  2519             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2520             {
       
  2521         
       
  2522                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2523                 return return_type_symbol;
       
  2524                 
       
  2525             }
       
  2526             
       
  2527             
       
  2528             ERROR;
       
  2529         }
       
  2530         
       
  2531     }/*function_dint_to_uint*/
       
  2532     break;
       
  2533 
       
  2534 /****
       
  2535  *DINT_TO_LREAL
       
  2536  */
       
  2537     case function_dint_to_lreal :
       
  2538     {
       
  2539         symbol_c *last_type_symbol = NULL;
       
  2540 
       
  2541         {
       
  2542             identifier_c param_name("IN");
       
  2543             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2544             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2545             symbol_c *IN_type_symbol = NULL;
       
  2546             
       
  2547             /* Get the value from a foo(<param_value>) style call */
       
  2548             if (IN_param_value == NULL)
       
  2549               IN_param_value = function_call_param_iterator.next();
       
  2550             if (IN_param_value != NULL) {
       
  2551               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2552               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2553             }
       
  2554             
       
  2555             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2556             {
       
  2557         
       
  2558                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2559                 return return_type_symbol;
       
  2560                 
       
  2561             }
       
  2562             
       
  2563             
       
  2564             ERROR;
       
  2565         }
       
  2566         
       
  2567     }/*function_dint_to_lreal*/
       
  2568     break;
       
  2569 
       
  2570 /****
       
  2571  *DINT_TO_BYTE
       
  2572  */
       
  2573     case function_dint_to_byte :
       
  2574     {
       
  2575         symbol_c *last_type_symbol = NULL;
       
  2576 
       
  2577         {
       
  2578             identifier_c param_name("IN");
       
  2579             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2580             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2581             symbol_c *IN_type_symbol = NULL;
       
  2582             
       
  2583             /* Get the value from a foo(<param_value>) style call */
       
  2584             if (IN_param_value == NULL)
       
  2585               IN_param_value = function_call_param_iterator.next();
       
  2586             if (IN_param_value != NULL) {
       
  2587               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2588               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2589             }
       
  2590             
       
  2591             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2592             {
       
  2593         
       
  2594                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2595                 return return_type_symbol;
       
  2596                 
       
  2597             }
       
  2598             
       
  2599             
       
  2600             ERROR;
       
  2601         }
       
  2602         
       
  2603     }/*function_dint_to_byte*/
       
  2604     break;
       
  2605 
       
  2606 /****
       
  2607  *DINT_TO_USINT
       
  2608  */
       
  2609     case function_dint_to_usint :
       
  2610     {
       
  2611         symbol_c *last_type_symbol = NULL;
       
  2612 
       
  2613         {
       
  2614             identifier_c param_name("IN");
       
  2615             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2616             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2617             symbol_c *IN_type_symbol = NULL;
       
  2618             
       
  2619             /* Get the value from a foo(<param_value>) style call */
       
  2620             if (IN_param_value == NULL)
       
  2621               IN_param_value = function_call_param_iterator.next();
       
  2622             if (IN_param_value != NULL) {
       
  2623               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2624               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2625             }
       
  2626             
       
  2627             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2628             {
       
  2629         
       
  2630                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2631                 return return_type_symbol;
       
  2632                 
       
  2633             }
       
  2634             
       
  2635             
       
  2636             ERROR;
       
  2637         }
       
  2638         
       
  2639     }/*function_dint_to_usint*/
       
  2640     break;
       
  2641 
       
  2642 /****
       
  2643  *DINT_TO_ULINT
       
  2644  */
       
  2645     case function_dint_to_ulint :
       
  2646     {
       
  2647         symbol_c *last_type_symbol = NULL;
       
  2648 
       
  2649         {
       
  2650             identifier_c param_name("IN");
       
  2651             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2652             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2653             symbol_c *IN_type_symbol = NULL;
       
  2654             
       
  2655             /* Get the value from a foo(<param_value>) style call */
       
  2656             if (IN_param_value == NULL)
       
  2657               IN_param_value = function_call_param_iterator.next();
       
  2658             if (IN_param_value != NULL) {
       
  2659               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2660               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2661             }
       
  2662             
       
  2663             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2664             {
       
  2665         
       
  2666                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2667                 return return_type_symbol;
       
  2668                 
       
  2669             }
       
  2670             
       
  2671             
       
  2672             ERROR;
       
  2673         }
       
  2674         
       
  2675     }/*function_dint_to_ulint*/
       
  2676     break;
       
  2677 
       
  2678 /****
       
  2679  *DINT_TO_BOOL
       
  2680  */
       
  2681     case function_dint_to_bool :
       
  2682     {
       
  2683         symbol_c *last_type_symbol = NULL;
       
  2684 
       
  2685         {
       
  2686             identifier_c param_name("IN");
       
  2687             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2688             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2689             symbol_c *IN_type_symbol = NULL;
       
  2690             
       
  2691             /* Get the value from a foo(<param_value>) style call */
       
  2692             if (IN_param_value == NULL)
       
  2693               IN_param_value = function_call_param_iterator.next();
       
  2694             if (IN_param_value != NULL) {
       
  2695               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2696               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2697             }
       
  2698             
       
  2699             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2700             {
       
  2701         
       
  2702                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2703                 return return_type_symbol;
       
  2704                 
       
  2705             }
       
  2706             
       
  2707             
       
  2708             ERROR;
       
  2709         }
       
  2710         
       
  2711     }/*function_dint_to_bool*/
       
  2712     break;
       
  2713 
       
  2714 /****
       
  2715  *DINT_TO_TIME
       
  2716  */
       
  2717     case function_dint_to_time :
       
  2718     {
       
  2719         symbol_c *last_type_symbol = NULL;
       
  2720 
       
  2721         {
       
  2722             identifier_c param_name("IN");
       
  2723             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2724             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2725             symbol_c *IN_type_symbol = NULL;
       
  2726             
       
  2727             /* Get the value from a foo(<param_value>) style call */
       
  2728             if (IN_param_value == NULL)
       
  2729               IN_param_value = function_call_param_iterator.next();
       
  2730             if (IN_param_value != NULL) {
       
  2731               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2732               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2733             }
       
  2734             
       
  2735             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2736             {
       
  2737         
       
  2738                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2739                 return return_type_symbol;
       
  2740                 
       
  2741             }
       
  2742             
       
  2743             
       
  2744             ERROR;
       
  2745         }
       
  2746         
       
  2747     }/*function_dint_to_time*/
       
  2748     break;
       
  2749 
       
  2750 /****
       
  2751  *DINT_TO_INT
       
  2752  */
       
  2753     case function_dint_to_int :
       
  2754     {
       
  2755         symbol_c *last_type_symbol = NULL;
       
  2756 
       
  2757         {
       
  2758             identifier_c param_name("IN");
       
  2759             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2760             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2761             symbol_c *IN_type_symbol = NULL;
       
  2762             
       
  2763             /* Get the value from a foo(<param_value>) style call */
       
  2764             if (IN_param_value == NULL)
       
  2765               IN_param_value = function_call_param_iterator.next();
       
  2766             if (IN_param_value != NULL) {
       
  2767               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2768               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2769             }
       
  2770             
       
  2771             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2772             {
       
  2773         
       
  2774                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2775                 return return_type_symbol;
       
  2776                 
       
  2777             }
       
  2778             
       
  2779             
       
  2780             ERROR;
       
  2781         }
       
  2782         
       
  2783     }/*function_dint_to_int*/
       
  2784     break;
       
  2785 
       
  2786 /****
       
  2787  *DATE_TO_REAL
       
  2788  */
       
  2789     case function_date_to_real :
       
  2790     {
       
  2791         symbol_c *last_type_symbol = NULL;
       
  2792 
       
  2793         {
       
  2794             identifier_c param_name("IN");
       
  2795             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2796             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2797             symbol_c *IN_type_symbol = NULL;
       
  2798             
       
  2799             /* Get the value from a foo(<param_value>) style call */
       
  2800             if (IN_param_value == NULL)
       
  2801               IN_param_value = function_call_param_iterator.next();
       
  2802             if (IN_param_value != NULL) {
       
  2803               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2804               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2805             }
       
  2806             
       
  2807             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2808             {
       
  2809         
       
  2810                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2811                 return return_type_symbol;
       
  2812                 
       
  2813             }
       
  2814             
       
  2815             
       
  2816             ERROR;
       
  2817         }
       
  2818         
       
  2819     }/*function_date_to_real*/
       
  2820     break;
       
  2821 
       
  2822 /****
       
  2823  *DATE_TO_SINT
       
  2824  */
       
  2825     case function_date_to_sint :
       
  2826     {
       
  2827         symbol_c *last_type_symbol = NULL;
       
  2828 
       
  2829         {
       
  2830             identifier_c param_name("IN");
       
  2831             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2832             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2833             symbol_c *IN_type_symbol = NULL;
       
  2834             
       
  2835             /* Get the value from a foo(<param_value>) style call */
       
  2836             if (IN_param_value == NULL)
       
  2837               IN_param_value = function_call_param_iterator.next();
       
  2838             if (IN_param_value != NULL) {
       
  2839               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2840               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2841             }
       
  2842             
       
  2843             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2844             {
       
  2845         
       
  2846                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2847                 return return_type_symbol;
       
  2848                 
       
  2849             }
       
  2850             
       
  2851             
       
  2852             ERROR;
       
  2853         }
       
  2854         
       
  2855     }/*function_date_to_sint*/
       
  2856     break;
       
  2857 
       
  2858 /****
       
  2859  *DATE_TO_LINT
       
  2860  */
       
  2861     case function_date_to_lint :
       
  2862     {
       
  2863         symbol_c *last_type_symbol = NULL;
       
  2864 
       
  2865         {
       
  2866             identifier_c param_name("IN");
       
  2867             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2868             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2869             symbol_c *IN_type_symbol = NULL;
       
  2870             
       
  2871             /* Get the value from a foo(<param_value>) style call */
       
  2872             if (IN_param_value == NULL)
       
  2873               IN_param_value = function_call_param_iterator.next();
       
  2874             if (IN_param_value != NULL) {
       
  2875               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2876               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2877             }
       
  2878             
       
  2879             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2880             {
       
  2881         
       
  2882                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2883                 return return_type_symbol;
       
  2884                 
       
  2885             }
       
  2886             
       
  2887             
       
  2888             ERROR;
       
  2889         }
       
  2890         
       
  2891     }/*function_date_to_lint*/
       
  2892     break;
       
  2893 
       
  2894 /****
       
  2895  *DATE_TO_DINT
       
  2896  */
       
  2897     case function_date_to_dint :
       
  2898     {
       
  2899         symbol_c *last_type_symbol = NULL;
       
  2900 
       
  2901         {
       
  2902             identifier_c param_name("IN");
       
  2903             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2904             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2905             symbol_c *IN_type_symbol = NULL;
       
  2906             
       
  2907             /* Get the value from a foo(<param_value>) style call */
       
  2908             if (IN_param_value == NULL)
       
  2909               IN_param_value = function_call_param_iterator.next();
       
  2910             if (IN_param_value != NULL) {
       
  2911               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2912               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2913             }
       
  2914             
       
  2915             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2916             {
       
  2917         
       
  2918                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  2919                 return return_type_symbol;
       
  2920                 
       
  2921             }
       
  2922             
       
  2923             
       
  2924             ERROR;
       
  2925         }
       
  2926         
       
  2927     }/*function_date_to_dint*/
       
  2928     break;
       
  2929 
       
  2930 /****
       
  2931  *DATE_TO_DWORD
       
  2932  */
       
  2933     case function_date_to_dword :
       
  2934     {
       
  2935         symbol_c *last_type_symbol = NULL;
       
  2936 
       
  2937         {
       
  2938             identifier_c param_name("IN");
       
  2939             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2940             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2941             symbol_c *IN_type_symbol = NULL;
       
  2942             
       
  2943             /* Get the value from a foo(<param_value>) style call */
       
  2944             if (IN_param_value == NULL)
       
  2945               IN_param_value = function_call_param_iterator.next();
       
  2946             if (IN_param_value != NULL) {
       
  2947               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2948               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2949             }
       
  2950             
       
  2951             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2952             {
       
  2953         
       
  2954                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2955                 return return_type_symbol;
       
  2956                 
       
  2957             }
       
  2958             
       
  2959             
       
  2960             ERROR;
       
  2961         }
       
  2962         
       
  2963     }/*function_date_to_dword*/
       
  2964     break;
       
  2965 
       
  2966 /****
       
  2967  *DATE_TO_UDINT
       
  2968  */
       
  2969     case function_date_to_udint :
       
  2970     {
       
  2971         symbol_c *last_type_symbol = NULL;
       
  2972 
       
  2973         {
       
  2974             identifier_c param_name("IN");
       
  2975             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2976             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2977             symbol_c *IN_type_symbol = NULL;
       
  2978             
       
  2979             /* Get the value from a foo(<param_value>) style call */
       
  2980             if (IN_param_value == NULL)
       
  2981               IN_param_value = function_call_param_iterator.next();
       
  2982             if (IN_param_value != NULL) {
       
  2983               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2984               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2985             }
       
  2986             
       
  2987             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2988             {
       
  2989         
       
  2990                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2991                 return return_type_symbol;
       
  2992                 
       
  2993             }
       
  2994             
       
  2995             
       
  2996             ERROR;
       
  2997         }
       
  2998         
       
  2999     }/*function_date_to_udint*/
       
  3000     break;
       
  3001 
       
  3002 /****
       
  3003  *DATE_TO_WORD
       
  3004  */
       
  3005     case function_date_to_word :
       
  3006     {
       
  3007         symbol_c *last_type_symbol = NULL;
       
  3008 
       
  3009         {
       
  3010             identifier_c param_name("IN");
       
  3011             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3012             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3013             symbol_c *IN_type_symbol = NULL;
       
  3014             
       
  3015             /* Get the value from a foo(<param_value>) style call */
       
  3016             if (IN_param_value == NULL)
       
  3017               IN_param_value = function_call_param_iterator.next();
       
  3018             if (IN_param_value != NULL) {
       
  3019               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3020               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3021             }
       
  3022             
       
  3023             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3024             {
       
  3025         
       
  3026                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3027                 return return_type_symbol;
       
  3028                 
       
  3029             }
       
  3030             
       
  3031             
       
  3032             ERROR;
       
  3033         }
       
  3034         
       
  3035     }/*function_date_to_word*/
       
  3036     break;
       
  3037 
       
  3038 /****
       
  3039  *DATE_TO_STRING
       
  3040  */
       
  3041     case function_date_to_string :
       
  3042     {
       
  3043         symbol_c *last_type_symbol = NULL;
       
  3044 
       
  3045         {
       
  3046             identifier_c param_name("IN");
       
  3047             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3048             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3049             symbol_c *IN_type_symbol = NULL;
       
  3050             
       
  3051             /* Get the value from a foo(<param_value>) style call */
       
  3052             if (IN_param_value == NULL)
       
  3053               IN_param_value = function_call_param_iterator.next();
       
  3054             if (IN_param_value != NULL) {
       
  3055               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3056               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3057             }
       
  3058             
       
  3059             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3060             {
       
  3061         
       
  3062                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3063                 return return_type_symbol;
       
  3064                 
       
  3065             }
       
  3066             
       
  3067             
       
  3068             ERROR;
       
  3069         }
       
  3070         
       
  3071     }/*function_date_to_string*/
       
  3072     break;
       
  3073 
       
  3074 /****
       
  3075  *DATE_TO_LWORD
       
  3076  */
       
  3077     case function_date_to_lword :
       
  3078     {
       
  3079         symbol_c *last_type_symbol = NULL;
       
  3080 
       
  3081         {
       
  3082             identifier_c param_name("IN");
       
  3083             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3084             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3085             symbol_c *IN_type_symbol = NULL;
       
  3086             
       
  3087             /* Get the value from a foo(<param_value>) style call */
       
  3088             if (IN_param_value == NULL)
       
  3089               IN_param_value = function_call_param_iterator.next();
       
  3090             if (IN_param_value != NULL) {
       
  3091               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3092               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3093             }
       
  3094             
       
  3095             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3096             {
       
  3097         
       
  3098                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3099                 return return_type_symbol;
       
  3100                 
       
  3101             }
       
  3102             
       
  3103             
       
  3104             ERROR;
       
  3105         }
       
  3106         
       
  3107     }/*function_date_to_lword*/
       
  3108     break;
       
  3109 
       
  3110 /****
       
  3111  *DATE_TO_UINT
       
  3112  */
       
  3113     case function_date_to_uint :
       
  3114     {
       
  3115         symbol_c *last_type_symbol = NULL;
       
  3116 
       
  3117         {
       
  3118             identifier_c param_name("IN");
       
  3119             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3120             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3121             symbol_c *IN_type_symbol = NULL;
       
  3122             
       
  3123             /* Get the value from a foo(<param_value>) style call */
       
  3124             if (IN_param_value == NULL)
       
  3125               IN_param_value = function_call_param_iterator.next();
       
  3126             if (IN_param_value != NULL) {
       
  3127               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3128               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3129             }
       
  3130             
       
  3131             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3132             {
       
  3133         
       
  3134                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3135                 return return_type_symbol;
       
  3136                 
       
  3137             }
       
  3138             
       
  3139             
       
  3140             ERROR;
       
  3141         }
       
  3142         
       
  3143     }/*function_date_to_uint*/
       
  3144     break;
       
  3145 
       
  3146 /****
       
  3147  *DATE_TO_LREAL
       
  3148  */
       
  3149     case function_date_to_lreal :
       
  3150     {
       
  3151         symbol_c *last_type_symbol = NULL;
       
  3152 
       
  3153         {
       
  3154             identifier_c param_name("IN");
       
  3155             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3156             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3157             symbol_c *IN_type_symbol = NULL;
       
  3158             
       
  3159             /* Get the value from a foo(<param_value>) style call */
       
  3160             if (IN_param_value == NULL)
       
  3161               IN_param_value = function_call_param_iterator.next();
       
  3162             if (IN_param_value != NULL) {
       
  3163               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3164               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3165             }
       
  3166             
       
  3167             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3168             {
       
  3169         
       
  3170                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3171                 return return_type_symbol;
       
  3172                 
       
  3173             }
       
  3174             
       
  3175             
       
  3176             ERROR;
       
  3177         }
       
  3178         
       
  3179     }/*function_date_to_lreal*/
       
  3180     break;
       
  3181 
       
  3182 /****
       
  3183  *DATE_TO_BYTE
       
  3184  */
       
  3185     case function_date_to_byte :
       
  3186     {
       
  3187         symbol_c *last_type_symbol = NULL;
       
  3188 
       
  3189         {
       
  3190             identifier_c param_name("IN");
       
  3191             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3192             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3193             symbol_c *IN_type_symbol = NULL;
       
  3194             
       
  3195             /* Get the value from a foo(<param_value>) style call */
       
  3196             if (IN_param_value == NULL)
       
  3197               IN_param_value = function_call_param_iterator.next();
       
  3198             if (IN_param_value != NULL) {
       
  3199               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3200               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3201             }
       
  3202             
       
  3203             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3204             {
       
  3205         
       
  3206                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3207                 return return_type_symbol;
       
  3208                 
       
  3209             }
       
  3210             
       
  3211             
       
  3212             ERROR;
       
  3213         }
       
  3214         
       
  3215     }/*function_date_to_byte*/
       
  3216     break;
       
  3217 
       
  3218 /****
       
  3219  *DATE_TO_USINT
       
  3220  */
       
  3221     case function_date_to_usint :
       
  3222     {
       
  3223         symbol_c *last_type_symbol = NULL;
       
  3224 
       
  3225         {
       
  3226             identifier_c param_name("IN");
       
  3227             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3228             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3229             symbol_c *IN_type_symbol = NULL;
       
  3230             
       
  3231             /* Get the value from a foo(<param_value>) style call */
       
  3232             if (IN_param_value == NULL)
       
  3233               IN_param_value = function_call_param_iterator.next();
       
  3234             if (IN_param_value != NULL) {
       
  3235               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3236               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3237             }
       
  3238             
       
  3239             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3240             {
       
  3241         
       
  3242                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3243                 return return_type_symbol;
       
  3244                 
       
  3245             }
       
  3246             
       
  3247             
       
  3248             ERROR;
       
  3249         }
       
  3250         
       
  3251     }/*function_date_to_usint*/
       
  3252     break;
       
  3253 
       
  3254 /****
       
  3255  *DATE_TO_ULINT
       
  3256  */
       
  3257     case function_date_to_ulint :
       
  3258     {
       
  3259         symbol_c *last_type_symbol = NULL;
       
  3260 
       
  3261         {
       
  3262             identifier_c param_name("IN");
       
  3263             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3264             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3265             symbol_c *IN_type_symbol = NULL;
       
  3266             
       
  3267             /* Get the value from a foo(<param_value>) style call */
       
  3268             if (IN_param_value == NULL)
       
  3269               IN_param_value = function_call_param_iterator.next();
       
  3270             if (IN_param_value != NULL) {
       
  3271               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3272               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3273             }
       
  3274             
       
  3275             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3276             {
       
  3277         
       
  3278                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3279                 return return_type_symbol;
       
  3280                 
       
  3281             }
       
  3282             
       
  3283             
       
  3284             ERROR;
       
  3285         }
       
  3286         
       
  3287     }/*function_date_to_ulint*/
       
  3288     break;
       
  3289 
       
  3290 /****
       
  3291  *DATE_TO_INT
       
  3292  */
       
  3293     case function_date_to_int :
       
  3294     {
       
  3295         symbol_c *last_type_symbol = NULL;
       
  3296 
       
  3297         {
       
  3298             identifier_c param_name("IN");
       
  3299             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3300             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3301             symbol_c *IN_type_symbol = NULL;
       
  3302             
       
  3303             /* Get the value from a foo(<param_value>) style call */
       
  3304             if (IN_param_value == NULL)
       
  3305               IN_param_value = function_call_param_iterator.next();
       
  3306             if (IN_param_value != NULL) {
       
  3307               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3308               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3309             }
       
  3310             
       
  3311             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3312             {
       
  3313         
       
  3314                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3315                 return return_type_symbol;
       
  3316                 
       
  3317             }
       
  3318             
       
  3319             
       
  3320             ERROR;
       
  3321         }
       
  3322         
       
  3323     }/*function_date_to_int*/
       
  3324     break;
       
  3325 
       
  3326 /****
       
  3327  *DWORD_TO_REAL
       
  3328  */
       
  3329     case function_dword_to_real :
       
  3330     {
       
  3331         symbol_c *last_type_symbol = NULL;
       
  3332 
       
  3333         {
       
  3334             identifier_c param_name("IN");
       
  3335             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3336             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3337             symbol_c *IN_type_symbol = NULL;
       
  3338             
       
  3339             /* Get the value from a foo(<param_value>) style call */
       
  3340             if (IN_param_value == NULL)
       
  3341               IN_param_value = function_call_param_iterator.next();
       
  3342             if (IN_param_value != NULL) {
       
  3343               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3344               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3345             }
       
  3346             
       
  3347             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3348             {
       
  3349         
       
  3350                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3351                 return return_type_symbol;
       
  3352                 
       
  3353             }
       
  3354             
       
  3355             
       
  3356             ERROR;
       
  3357         }
       
  3358         
       
  3359     }/*function_dword_to_real*/
       
  3360     break;
       
  3361 
       
  3362 /****
       
  3363  *DWORD_TO_SINT
       
  3364  */
       
  3365     case function_dword_to_sint :
       
  3366     {
       
  3367         symbol_c *last_type_symbol = NULL;
       
  3368 
       
  3369         {
       
  3370             identifier_c param_name("IN");
       
  3371             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3372             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3373             symbol_c *IN_type_symbol = NULL;
       
  3374             
       
  3375             /* Get the value from a foo(<param_value>) style call */
       
  3376             if (IN_param_value == NULL)
       
  3377               IN_param_value = function_call_param_iterator.next();
       
  3378             if (IN_param_value != NULL) {
       
  3379               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3380               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3381             }
       
  3382             
       
  3383             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3384             {
       
  3385         
       
  3386                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3387                 return return_type_symbol;
       
  3388                 
       
  3389             }
       
  3390             
       
  3391             
       
  3392             ERROR;
       
  3393         }
       
  3394         
       
  3395     }/*function_dword_to_sint*/
       
  3396     break;
       
  3397 
       
  3398 /****
       
  3399  *DWORD_TO_LINT
       
  3400  */
       
  3401     case function_dword_to_lint :
       
  3402     {
       
  3403         symbol_c *last_type_symbol = NULL;
       
  3404 
       
  3405         {
       
  3406             identifier_c param_name("IN");
       
  3407             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3408             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3409             symbol_c *IN_type_symbol = NULL;
       
  3410             
       
  3411             /* Get the value from a foo(<param_value>) style call */
       
  3412             if (IN_param_value == NULL)
       
  3413               IN_param_value = function_call_param_iterator.next();
       
  3414             if (IN_param_value != NULL) {
       
  3415               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3416               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3417             }
       
  3418             
       
  3419             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3420             {
       
  3421         
       
  3422                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3423                 return return_type_symbol;
       
  3424                 
       
  3425             }
       
  3426             
       
  3427             
       
  3428             ERROR;
       
  3429         }
       
  3430         
       
  3431     }/*function_dword_to_lint*/
       
  3432     break;
       
  3433 
       
  3434 /****
       
  3435  *DWORD_TO_DINT
       
  3436  */
       
  3437     case function_dword_to_dint :
       
  3438     {
       
  3439         symbol_c *last_type_symbol = NULL;
       
  3440 
       
  3441         {
       
  3442             identifier_c param_name("IN");
       
  3443             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3444             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3445             symbol_c *IN_type_symbol = NULL;
       
  3446             
       
  3447             /* Get the value from a foo(<param_value>) style call */
       
  3448             if (IN_param_value == NULL)
       
  3449               IN_param_value = function_call_param_iterator.next();
       
  3450             if (IN_param_value != NULL) {
       
  3451               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3452               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3453             }
       
  3454             
       
  3455             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3456             {
       
  3457         
       
  3458                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3459                 return return_type_symbol;
       
  3460                 
       
  3461             }
       
  3462             
       
  3463             
       
  3464             ERROR;
       
  3465         }
       
  3466         
       
  3467     }/*function_dword_to_dint*/
       
  3468     break;
       
  3469 
       
  3470 /****
       
  3471  *DWORD_TO_DATE
       
  3472  */
       
  3473     case function_dword_to_date :
       
  3474     {
       
  3475         symbol_c *last_type_symbol = NULL;
       
  3476 
       
  3477         {
       
  3478             identifier_c param_name("IN");
       
  3479             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3480             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3481             symbol_c *IN_type_symbol = NULL;
       
  3482             
       
  3483             /* Get the value from a foo(<param_value>) style call */
       
  3484             if (IN_param_value == NULL)
       
  3485               IN_param_value = function_call_param_iterator.next();
       
  3486             if (IN_param_value != NULL) {
       
  3487               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3488               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3489             }
       
  3490             
       
  3491             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3492             {
       
  3493         
       
  3494                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3495                 return return_type_symbol;
       
  3496                 
       
  3497             }
       
  3498             
       
  3499             
       
  3500             ERROR;
       
  3501         }
       
  3502         
       
  3503     }/*function_dword_to_date*/
       
  3504     break;
       
  3505 
       
  3506 /****
       
  3507  *DWORD_TO_DT
       
  3508  */
       
  3509     case function_dword_to_dt :
       
  3510     {
       
  3511         symbol_c *last_type_symbol = NULL;
       
  3512 
       
  3513         {
       
  3514             identifier_c param_name("IN");
       
  3515             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3516             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3517             symbol_c *IN_type_symbol = NULL;
       
  3518             
       
  3519             /* Get the value from a foo(<param_value>) style call */
       
  3520             if (IN_param_value == NULL)
       
  3521               IN_param_value = function_call_param_iterator.next();
       
  3522             if (IN_param_value != NULL) {
       
  3523               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3524               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3525             }
       
  3526             
       
  3527             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3528             {
       
  3529         
       
  3530                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3531                 return return_type_symbol;
       
  3532                 
       
  3533             }
       
  3534             
       
  3535             
       
  3536             ERROR;
       
  3537         }
       
  3538         
       
  3539     }/*function_dword_to_dt*/
       
  3540     break;
       
  3541 
       
  3542 /****
       
  3543  *DWORD_TO_TOD
       
  3544  */
       
  3545     case function_dword_to_tod :
       
  3546     {
       
  3547         symbol_c *last_type_symbol = NULL;
       
  3548 
       
  3549         {
       
  3550             identifier_c param_name("IN");
       
  3551             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3552             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3553             symbol_c *IN_type_symbol = NULL;
       
  3554             
       
  3555             /* Get the value from a foo(<param_value>) style call */
       
  3556             if (IN_param_value == NULL)
       
  3557               IN_param_value = function_call_param_iterator.next();
       
  3558             if (IN_param_value != NULL) {
       
  3559               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3560               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3561             }
       
  3562             
       
  3563             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3564             {
       
  3565         
       
  3566                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3567                 return return_type_symbol;
       
  3568                 
       
  3569             }
       
  3570             
       
  3571             
       
  3572             ERROR;
       
  3573         }
       
  3574         
       
  3575     }/*function_dword_to_tod*/
       
  3576     break;
       
  3577 
       
  3578 /****
       
  3579  *DWORD_TO_UDINT
       
  3580  */
       
  3581     case function_dword_to_udint :
       
  3582     {
       
  3583         symbol_c *last_type_symbol = NULL;
       
  3584 
       
  3585         {
       
  3586             identifier_c param_name("IN");
       
  3587             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3588             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3589             symbol_c *IN_type_symbol = NULL;
       
  3590             
       
  3591             /* Get the value from a foo(<param_value>) style call */
       
  3592             if (IN_param_value == NULL)
       
  3593               IN_param_value = function_call_param_iterator.next();
       
  3594             if (IN_param_value != NULL) {
       
  3595               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3596               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3597             }
       
  3598             
       
  3599             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3600             {
       
  3601         
       
  3602                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3603                 return return_type_symbol;
       
  3604                 
       
  3605             }
       
  3606             
       
  3607             
       
  3608             ERROR;
       
  3609         }
       
  3610         
       
  3611     }/*function_dword_to_udint*/
       
  3612     break;
       
  3613 
       
  3614 /****
       
  3615  *DWORD_TO_WORD
       
  3616  */
       
  3617     case function_dword_to_word :
       
  3618     {
       
  3619         symbol_c *last_type_symbol = NULL;
       
  3620 
       
  3621         {
       
  3622             identifier_c param_name("IN");
       
  3623             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3624             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3625             symbol_c *IN_type_symbol = NULL;
       
  3626             
       
  3627             /* Get the value from a foo(<param_value>) style call */
       
  3628             if (IN_param_value == NULL)
       
  3629               IN_param_value = function_call_param_iterator.next();
       
  3630             if (IN_param_value != NULL) {
       
  3631               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3632               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3633             }
       
  3634             
       
  3635             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3636             {
       
  3637         
       
  3638                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3639                 return return_type_symbol;
       
  3640                 
       
  3641             }
       
  3642             
       
  3643             
       
  3644             ERROR;
       
  3645         }
       
  3646         
       
  3647     }/*function_dword_to_word*/
       
  3648     break;
       
  3649 
       
  3650 /****
       
  3651  *DWORD_TO_STRING
       
  3652  */
       
  3653     case function_dword_to_string :
       
  3654     {
       
  3655         symbol_c *last_type_symbol = NULL;
       
  3656 
       
  3657         {
       
  3658             identifier_c param_name("IN");
       
  3659             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3660             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3661             symbol_c *IN_type_symbol = NULL;
       
  3662             
       
  3663             /* Get the value from a foo(<param_value>) style call */
       
  3664             if (IN_param_value == NULL)
       
  3665               IN_param_value = function_call_param_iterator.next();
       
  3666             if (IN_param_value != NULL) {
       
  3667               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3668               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3669             }
       
  3670             
       
  3671             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3672             {
       
  3673         
       
  3674                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3675                 return return_type_symbol;
       
  3676                 
       
  3677             }
       
  3678             
       
  3679             
       
  3680             ERROR;
       
  3681         }
       
  3682         
       
  3683     }/*function_dword_to_string*/
       
  3684     break;
       
  3685 
       
  3686 /****
       
  3687  *DWORD_TO_LWORD
       
  3688  */
       
  3689     case function_dword_to_lword :
       
  3690     {
       
  3691         symbol_c *last_type_symbol = NULL;
       
  3692 
       
  3693         {
       
  3694             identifier_c param_name("IN");
       
  3695             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3696             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3697             symbol_c *IN_type_symbol = NULL;
       
  3698             
       
  3699             /* Get the value from a foo(<param_value>) style call */
       
  3700             if (IN_param_value == NULL)
       
  3701               IN_param_value = function_call_param_iterator.next();
       
  3702             if (IN_param_value != NULL) {
       
  3703               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3704               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3705             }
       
  3706             
       
  3707             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3708             {
       
  3709         
       
  3710                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3711                 return return_type_symbol;
       
  3712                 
       
  3713             }
       
  3714             
       
  3715             
       
  3716             ERROR;
       
  3717         }
       
  3718         
       
  3719     }/*function_dword_to_lword*/
       
  3720     break;
       
  3721 
       
  3722 /****
       
  3723  *DWORD_TO_UINT
       
  3724  */
       
  3725     case function_dword_to_uint :
       
  3726     {
       
  3727         symbol_c *last_type_symbol = NULL;
       
  3728 
       
  3729         {
       
  3730             identifier_c param_name("IN");
       
  3731             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3732             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3733             symbol_c *IN_type_symbol = NULL;
       
  3734             
       
  3735             /* Get the value from a foo(<param_value>) style call */
       
  3736             if (IN_param_value == NULL)
       
  3737               IN_param_value = function_call_param_iterator.next();
       
  3738             if (IN_param_value != NULL) {
       
  3739               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3740               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3741             }
       
  3742             
       
  3743             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3744             {
       
  3745         
       
  3746                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3747                 return return_type_symbol;
       
  3748                 
       
  3749             }
       
  3750             
       
  3751             
       
  3752             ERROR;
       
  3753         }
       
  3754         
       
  3755     }/*function_dword_to_uint*/
       
  3756     break;
       
  3757 
       
  3758 /****
       
  3759  *DWORD_TO_LREAL
       
  3760  */
       
  3761     case function_dword_to_lreal :
       
  3762     {
       
  3763         symbol_c *last_type_symbol = NULL;
       
  3764 
       
  3765         {
       
  3766             identifier_c param_name("IN");
       
  3767             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3768             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3769             symbol_c *IN_type_symbol = NULL;
       
  3770             
       
  3771             /* Get the value from a foo(<param_value>) style call */
       
  3772             if (IN_param_value == NULL)
       
  3773               IN_param_value = function_call_param_iterator.next();
       
  3774             if (IN_param_value != NULL) {
       
  3775               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3776               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3777             }
       
  3778             
       
  3779             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3780             {
       
  3781         
       
  3782                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3783                 return return_type_symbol;
       
  3784                 
       
  3785             }
       
  3786             
       
  3787             
       
  3788             ERROR;
       
  3789         }
       
  3790         
       
  3791     }/*function_dword_to_lreal*/
       
  3792     break;
       
  3793 
       
  3794 /****
       
  3795  *DWORD_TO_BYTE
       
  3796  */
       
  3797     case function_dword_to_byte :
       
  3798     {
       
  3799         symbol_c *last_type_symbol = NULL;
       
  3800 
       
  3801         {
       
  3802             identifier_c param_name("IN");
       
  3803             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3804             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3805             symbol_c *IN_type_symbol = NULL;
       
  3806             
       
  3807             /* Get the value from a foo(<param_value>) style call */
       
  3808             if (IN_param_value == NULL)
       
  3809               IN_param_value = function_call_param_iterator.next();
       
  3810             if (IN_param_value != NULL) {
       
  3811               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3812               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3813             }
       
  3814             
       
  3815             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3816             {
       
  3817         
       
  3818                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3819                 return return_type_symbol;
       
  3820                 
       
  3821             }
       
  3822             
       
  3823             
       
  3824             ERROR;
       
  3825         }
       
  3826         
       
  3827     }/*function_dword_to_byte*/
       
  3828     break;
       
  3829 
       
  3830 /****
       
  3831  *DWORD_TO_USINT
       
  3832  */
       
  3833     case function_dword_to_usint :
       
  3834     {
       
  3835         symbol_c *last_type_symbol = NULL;
       
  3836 
       
  3837         {
       
  3838             identifier_c param_name("IN");
       
  3839             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3840             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3841             symbol_c *IN_type_symbol = NULL;
       
  3842             
       
  3843             /* Get the value from a foo(<param_value>) style call */
       
  3844             if (IN_param_value == NULL)
       
  3845               IN_param_value = function_call_param_iterator.next();
       
  3846             if (IN_param_value != NULL) {
       
  3847               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3848               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3849             }
       
  3850             
       
  3851             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3852             {
       
  3853         
       
  3854                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3855                 return return_type_symbol;
       
  3856                 
       
  3857             }
       
  3858             
       
  3859             
       
  3860             ERROR;
       
  3861         }
       
  3862         
       
  3863     }/*function_dword_to_usint*/
       
  3864     break;
       
  3865 
       
  3866 /****
       
  3867  *DWORD_TO_ULINT
       
  3868  */
       
  3869     case function_dword_to_ulint :
       
  3870     {
       
  3871         symbol_c *last_type_symbol = NULL;
       
  3872 
       
  3873         {
       
  3874             identifier_c param_name("IN");
       
  3875             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3876             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3877             symbol_c *IN_type_symbol = NULL;
       
  3878             
       
  3879             /* Get the value from a foo(<param_value>) style call */
       
  3880             if (IN_param_value == NULL)
       
  3881               IN_param_value = function_call_param_iterator.next();
       
  3882             if (IN_param_value != NULL) {
       
  3883               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3884               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3885             }
       
  3886             
       
  3887             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3888             {
       
  3889         
       
  3890                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3891                 return return_type_symbol;
       
  3892                 
       
  3893             }
       
  3894             
       
  3895             
       
  3896             ERROR;
       
  3897         }
       
  3898         
       
  3899     }/*function_dword_to_ulint*/
       
  3900     break;
       
  3901 
       
  3902 /****
       
  3903  *DWORD_TO_BOOL
       
  3904  */
       
  3905     case function_dword_to_bool :
       
  3906     {
       
  3907         symbol_c *last_type_symbol = NULL;
       
  3908 
       
  3909         {
       
  3910             identifier_c param_name("IN");
       
  3911             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3912             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3913             symbol_c *IN_type_symbol = NULL;
       
  3914             
       
  3915             /* Get the value from a foo(<param_value>) style call */
       
  3916             if (IN_param_value == NULL)
       
  3917               IN_param_value = function_call_param_iterator.next();
       
  3918             if (IN_param_value != NULL) {
       
  3919               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3920               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3921             }
       
  3922             
       
  3923             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3924             {
       
  3925         
       
  3926                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3927                 return return_type_symbol;
       
  3928                 
       
  3929             }
       
  3930             
       
  3931             
       
  3932             ERROR;
       
  3933         }
       
  3934         
       
  3935     }/*function_dword_to_bool*/
       
  3936     break;
       
  3937 
       
  3938 /****
       
  3939  *DWORD_TO_TIME
       
  3940  */
       
  3941     case function_dword_to_time :
       
  3942     {
       
  3943         symbol_c *last_type_symbol = NULL;
       
  3944 
       
  3945         {
       
  3946             identifier_c param_name("IN");
       
  3947             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3948             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3949             symbol_c *IN_type_symbol = NULL;
       
  3950             
       
  3951             /* Get the value from a foo(<param_value>) style call */
       
  3952             if (IN_param_value == NULL)
       
  3953               IN_param_value = function_call_param_iterator.next();
       
  3954             if (IN_param_value != NULL) {
       
  3955               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3956               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3957             }
       
  3958             
       
  3959             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3960             {
       
  3961         
       
  3962                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3963                 return return_type_symbol;
       
  3964                 
       
  3965             }
       
  3966             
       
  3967             
       
  3968             ERROR;
       
  3969         }
       
  3970         
       
  3971     }/*function_dword_to_time*/
       
  3972     break;
       
  3973 
       
  3974 /****
       
  3975  *DWORD_TO_INT
       
  3976  */
       
  3977     case function_dword_to_int :
       
  3978     {
       
  3979         symbol_c *last_type_symbol = NULL;
       
  3980 
       
  3981         {
       
  3982             identifier_c param_name("IN");
       
  3983             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3984             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3985             symbol_c *IN_type_symbol = NULL;
       
  3986             
       
  3987             /* Get the value from a foo(<param_value>) style call */
       
  3988             if (IN_param_value == NULL)
       
  3989               IN_param_value = function_call_param_iterator.next();
       
  3990             if (IN_param_value != NULL) {
       
  3991               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3992               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3993             }
       
  3994             
       
  3995             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3996             {
       
  3997         
       
  3998                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3999                 return return_type_symbol;
       
  4000                 
       
  4001             }
       
  4002             
       
  4003             
       
  4004             ERROR;
       
  4005         }
       
  4006         
       
  4007     }/*function_dword_to_int*/
       
  4008     break;
       
  4009 
       
  4010 /****
       
  4011  *DT_TO_REAL
       
  4012  */
       
  4013     case function_dt_to_real :
       
  4014     {
       
  4015         symbol_c *last_type_symbol = NULL;
       
  4016 
       
  4017         {
       
  4018             identifier_c param_name("IN");
       
  4019             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4020             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4021             symbol_c *IN_type_symbol = NULL;
       
  4022             
       
  4023             /* Get the value from a foo(<param_value>) style call */
       
  4024             if (IN_param_value == NULL)
       
  4025               IN_param_value = function_call_param_iterator.next();
       
  4026             if (IN_param_value != NULL) {
       
  4027               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4028               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4029             }
       
  4030             
       
  4031             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4032             {
       
  4033         
       
  4034                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4035                 return return_type_symbol;
       
  4036                 
       
  4037             }
       
  4038             
       
  4039             
       
  4040             ERROR;
       
  4041         }
       
  4042         
       
  4043     }/*function_dt_to_real*/
       
  4044     break;
       
  4045 
       
  4046 /****
       
  4047  *DT_TO_SINT
       
  4048  */
       
  4049     case function_dt_to_sint :
       
  4050     {
       
  4051         symbol_c *last_type_symbol = NULL;
       
  4052 
       
  4053         {
       
  4054             identifier_c param_name("IN");
       
  4055             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4056             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4057             symbol_c *IN_type_symbol = NULL;
       
  4058             
       
  4059             /* Get the value from a foo(<param_value>) style call */
       
  4060             if (IN_param_value == NULL)
       
  4061               IN_param_value = function_call_param_iterator.next();
       
  4062             if (IN_param_value != NULL) {
       
  4063               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4064               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4065             }
       
  4066             
       
  4067             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4068             {
       
  4069         
       
  4070                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4071                 return return_type_symbol;
       
  4072                 
       
  4073             }
       
  4074             
       
  4075             
       
  4076             ERROR;
       
  4077         }
       
  4078         
       
  4079     }/*function_dt_to_sint*/
       
  4080     break;
       
  4081 
       
  4082 /****
       
  4083  *DT_TO_LINT
       
  4084  */
       
  4085     case function_dt_to_lint :
       
  4086     {
       
  4087         symbol_c *last_type_symbol = NULL;
       
  4088 
       
  4089         {
       
  4090             identifier_c param_name("IN");
       
  4091             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4092             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4093             symbol_c *IN_type_symbol = NULL;
       
  4094             
       
  4095             /* Get the value from a foo(<param_value>) style call */
       
  4096             if (IN_param_value == NULL)
       
  4097               IN_param_value = function_call_param_iterator.next();
       
  4098             if (IN_param_value != NULL) {
       
  4099               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4100               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4101             }
       
  4102             
       
  4103             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4104             {
       
  4105         
       
  4106                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4107                 return return_type_symbol;
       
  4108                 
       
  4109             }
       
  4110             
       
  4111             
       
  4112             ERROR;
       
  4113         }
       
  4114         
       
  4115     }/*function_dt_to_lint*/
       
  4116     break;
       
  4117 
       
  4118 /****
       
  4119  *DT_TO_DINT
       
  4120  */
       
  4121     case function_dt_to_dint :
       
  4122     {
       
  4123         symbol_c *last_type_symbol = NULL;
       
  4124 
       
  4125         {
       
  4126             identifier_c param_name("IN");
       
  4127             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4128             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4129             symbol_c *IN_type_symbol = NULL;
       
  4130             
       
  4131             /* Get the value from a foo(<param_value>) style call */
       
  4132             if (IN_param_value == NULL)
       
  4133               IN_param_value = function_call_param_iterator.next();
       
  4134             if (IN_param_value != NULL) {
       
  4135               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4136               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4137             }
       
  4138             
       
  4139             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4140             {
       
  4141         
       
  4142                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4143                 return return_type_symbol;
       
  4144                 
       
  4145             }
       
  4146             
       
  4147             
       
  4148             ERROR;
       
  4149         }
       
  4150         
       
  4151     }/*function_dt_to_dint*/
       
  4152     break;
       
  4153 
       
  4154 /****
       
  4155  *DT_TO_DWORD
       
  4156  */
       
  4157     case function_dt_to_dword :
       
  4158     {
       
  4159         symbol_c *last_type_symbol = NULL;
       
  4160 
       
  4161         {
       
  4162             identifier_c param_name("IN");
       
  4163             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4164             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4165             symbol_c *IN_type_symbol = NULL;
       
  4166             
       
  4167             /* Get the value from a foo(<param_value>) style call */
       
  4168             if (IN_param_value == NULL)
       
  4169               IN_param_value = function_call_param_iterator.next();
       
  4170             if (IN_param_value != NULL) {
       
  4171               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4172               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4173             }
       
  4174             
       
  4175             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4176             {
       
  4177         
       
  4178                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4179                 return return_type_symbol;
       
  4180                 
       
  4181             }
       
  4182             
       
  4183             
       
  4184             ERROR;
       
  4185         }
       
  4186         
       
  4187     }/*function_dt_to_dword*/
       
  4188     break;
       
  4189 
       
  4190 /****
       
  4191  *DT_TO_UDINT
       
  4192  */
       
  4193     case function_dt_to_udint :
       
  4194     {
       
  4195         symbol_c *last_type_symbol = NULL;
       
  4196 
       
  4197         {
       
  4198             identifier_c param_name("IN");
       
  4199             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4200             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4201             symbol_c *IN_type_symbol = NULL;
       
  4202             
       
  4203             /* Get the value from a foo(<param_value>) style call */
       
  4204             if (IN_param_value == NULL)
       
  4205               IN_param_value = function_call_param_iterator.next();
       
  4206             if (IN_param_value != NULL) {
       
  4207               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4208               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4209             }
       
  4210             
       
  4211             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4212             {
       
  4213         
       
  4214                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4215                 return return_type_symbol;
       
  4216                 
       
  4217             }
       
  4218             
       
  4219             
       
  4220             ERROR;
       
  4221         }
       
  4222         
       
  4223     }/*function_dt_to_udint*/
       
  4224     break;
       
  4225 
       
  4226 /****
       
  4227  *DT_TO_WORD
       
  4228  */
       
  4229     case function_dt_to_word :
       
  4230     {
       
  4231         symbol_c *last_type_symbol = NULL;
       
  4232 
       
  4233         {
       
  4234             identifier_c param_name("IN");
       
  4235             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4236             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4237             symbol_c *IN_type_symbol = NULL;
       
  4238             
       
  4239             /* Get the value from a foo(<param_value>) style call */
       
  4240             if (IN_param_value == NULL)
       
  4241               IN_param_value = function_call_param_iterator.next();
       
  4242             if (IN_param_value != NULL) {
       
  4243               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4244               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4245             }
       
  4246             
       
  4247             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4248             {
       
  4249         
       
  4250                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4251                 return return_type_symbol;
       
  4252                 
       
  4253             }
       
  4254             
       
  4255             
       
  4256             ERROR;
       
  4257         }
       
  4258         
       
  4259     }/*function_dt_to_word*/
       
  4260     break;
       
  4261 
       
  4262 /****
       
  4263  *DT_TO_STRING
       
  4264  */
       
  4265     case function_dt_to_string :
       
  4266     {
       
  4267         symbol_c *last_type_symbol = NULL;
       
  4268 
       
  4269         {
       
  4270             identifier_c param_name("IN");
       
  4271             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4272             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4273             symbol_c *IN_type_symbol = NULL;
       
  4274             
       
  4275             /* Get the value from a foo(<param_value>) style call */
       
  4276             if (IN_param_value == NULL)
       
  4277               IN_param_value = function_call_param_iterator.next();
       
  4278             if (IN_param_value != NULL) {
       
  4279               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4280               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4281             }
       
  4282             
       
  4283             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4284             {
       
  4285         
       
  4286                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4287                 return return_type_symbol;
       
  4288                 
       
  4289             }
       
  4290             
       
  4291             
       
  4292             ERROR;
       
  4293         }
       
  4294         
       
  4295     }/*function_dt_to_string*/
       
  4296     break;
       
  4297 
       
  4298 /****
       
  4299  *DT_TO_LWORD
       
  4300  */
       
  4301     case function_dt_to_lword :
       
  4302     {
       
  4303         symbol_c *last_type_symbol = NULL;
       
  4304 
       
  4305         {
       
  4306             identifier_c param_name("IN");
       
  4307             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4308             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4309             symbol_c *IN_type_symbol = NULL;
       
  4310             
       
  4311             /* Get the value from a foo(<param_value>) style call */
       
  4312             if (IN_param_value == NULL)
       
  4313               IN_param_value = function_call_param_iterator.next();
       
  4314             if (IN_param_value != NULL) {
       
  4315               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4316               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4317             }
       
  4318             
       
  4319             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4320             {
       
  4321         
       
  4322                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4323                 return return_type_symbol;
       
  4324                 
       
  4325             }
       
  4326             
       
  4327             
       
  4328             ERROR;
       
  4329         }
       
  4330         
       
  4331     }/*function_dt_to_lword*/
       
  4332     break;
       
  4333 
       
  4334 /****
       
  4335  *DT_TO_UINT
       
  4336  */
       
  4337     case function_dt_to_uint :
       
  4338     {
       
  4339         symbol_c *last_type_symbol = NULL;
       
  4340 
       
  4341         {
       
  4342             identifier_c param_name("IN");
       
  4343             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4344             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4345             symbol_c *IN_type_symbol = NULL;
       
  4346             
       
  4347             /* Get the value from a foo(<param_value>) style call */
       
  4348             if (IN_param_value == NULL)
       
  4349               IN_param_value = function_call_param_iterator.next();
       
  4350             if (IN_param_value != NULL) {
       
  4351               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4352               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4353             }
       
  4354             
       
  4355             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4356             {
       
  4357         
       
  4358                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4359                 return return_type_symbol;
       
  4360                 
       
  4361             }
       
  4362             
       
  4363             
       
  4364             ERROR;
       
  4365         }
       
  4366         
       
  4367     }/*function_dt_to_uint*/
       
  4368     break;
       
  4369 
       
  4370 /****
       
  4371  *DT_TO_LREAL
       
  4372  */
       
  4373     case function_dt_to_lreal :
       
  4374     {
       
  4375         symbol_c *last_type_symbol = NULL;
       
  4376 
       
  4377         {
       
  4378             identifier_c param_name("IN");
       
  4379             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4380             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4381             symbol_c *IN_type_symbol = NULL;
       
  4382             
       
  4383             /* Get the value from a foo(<param_value>) style call */
       
  4384             if (IN_param_value == NULL)
       
  4385               IN_param_value = function_call_param_iterator.next();
       
  4386             if (IN_param_value != NULL) {
       
  4387               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4388               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4389             }
       
  4390             
       
  4391             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4392             {
       
  4393         
       
  4394                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4395                 return return_type_symbol;
       
  4396                 
       
  4397             }
       
  4398             
       
  4399             
       
  4400             ERROR;
       
  4401         }
       
  4402         
       
  4403     }/*function_dt_to_lreal*/
       
  4404     break;
       
  4405 
       
  4406 /****
       
  4407  *DT_TO_BYTE
       
  4408  */
       
  4409     case function_dt_to_byte :
       
  4410     {
       
  4411         symbol_c *last_type_symbol = NULL;
       
  4412 
       
  4413         {
       
  4414             identifier_c param_name("IN");
       
  4415             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4416             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4417             symbol_c *IN_type_symbol = NULL;
       
  4418             
       
  4419             /* Get the value from a foo(<param_value>) style call */
       
  4420             if (IN_param_value == NULL)
       
  4421               IN_param_value = function_call_param_iterator.next();
       
  4422             if (IN_param_value != NULL) {
       
  4423               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4424               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4425             }
       
  4426             
       
  4427             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4428             {
       
  4429         
       
  4430                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4431                 return return_type_symbol;
       
  4432                 
       
  4433             }
       
  4434             
       
  4435             
       
  4436             ERROR;
       
  4437         }
       
  4438         
       
  4439     }/*function_dt_to_byte*/
       
  4440     break;
       
  4441 
       
  4442 /****
       
  4443  *DT_TO_USINT
       
  4444  */
       
  4445     case function_dt_to_usint :
       
  4446     {
       
  4447         symbol_c *last_type_symbol = NULL;
       
  4448 
       
  4449         {
       
  4450             identifier_c param_name("IN");
       
  4451             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4452             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4453             symbol_c *IN_type_symbol = NULL;
       
  4454             
       
  4455             /* Get the value from a foo(<param_value>) style call */
       
  4456             if (IN_param_value == NULL)
       
  4457               IN_param_value = function_call_param_iterator.next();
       
  4458             if (IN_param_value != NULL) {
       
  4459               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4460               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4461             }
       
  4462             
       
  4463             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4464             {
       
  4465         
       
  4466                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4467                 return return_type_symbol;
       
  4468                 
       
  4469             }
       
  4470             
       
  4471             
       
  4472             ERROR;
       
  4473         }
       
  4474         
       
  4475     }/*function_dt_to_usint*/
       
  4476     break;
       
  4477 
       
  4478 /****
       
  4479  *DT_TO_ULINT
       
  4480  */
       
  4481     case function_dt_to_ulint :
       
  4482     {
       
  4483         symbol_c *last_type_symbol = NULL;
       
  4484 
       
  4485         {
       
  4486             identifier_c param_name("IN");
       
  4487             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4488             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4489             symbol_c *IN_type_symbol = NULL;
       
  4490             
       
  4491             /* Get the value from a foo(<param_value>) style call */
       
  4492             if (IN_param_value == NULL)
       
  4493               IN_param_value = function_call_param_iterator.next();
       
  4494             if (IN_param_value != NULL) {
       
  4495               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4496               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4497             }
       
  4498             
       
  4499             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4500             {
       
  4501         
       
  4502                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4503                 return return_type_symbol;
       
  4504                 
       
  4505             }
       
  4506             
       
  4507             
       
  4508             ERROR;
       
  4509         }
       
  4510         
       
  4511     }/*function_dt_to_ulint*/
       
  4512     break;
       
  4513 
       
  4514 /****
       
  4515  *DT_TO_INT
       
  4516  */
       
  4517     case function_dt_to_int :
       
  4518     {
       
  4519         symbol_c *last_type_symbol = NULL;
       
  4520 
       
  4521         {
       
  4522             identifier_c param_name("IN");
       
  4523             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4524             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4525             symbol_c *IN_type_symbol = NULL;
       
  4526             
       
  4527             /* Get the value from a foo(<param_value>) style call */
       
  4528             if (IN_param_value == NULL)
       
  4529               IN_param_value = function_call_param_iterator.next();
       
  4530             if (IN_param_value != NULL) {
       
  4531               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4532               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4533             }
       
  4534             
       
  4535             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4536             {
       
  4537         
       
  4538                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4539                 return return_type_symbol;
       
  4540                 
       
  4541             }
       
  4542             
       
  4543             
       
  4544             ERROR;
       
  4545         }
       
  4546         
       
  4547     }/*function_dt_to_int*/
       
  4548     break;
       
  4549 
       
  4550 /****
       
  4551  *TOD_TO_REAL
       
  4552  */
       
  4553     case function_tod_to_real :
       
  4554     {
       
  4555         symbol_c *last_type_symbol = NULL;
       
  4556 
       
  4557         {
       
  4558             identifier_c param_name("IN");
       
  4559             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4560             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4561             symbol_c *IN_type_symbol = NULL;
       
  4562             
       
  4563             /* Get the value from a foo(<param_value>) style call */
       
  4564             if (IN_param_value == NULL)
       
  4565               IN_param_value = function_call_param_iterator.next();
       
  4566             if (IN_param_value != NULL) {
       
  4567               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4568               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4569             }
       
  4570             
       
  4571             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4572             {
       
  4573         
       
  4574                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4575                 return return_type_symbol;
       
  4576                 
       
  4577             }
       
  4578             
       
  4579             
       
  4580             ERROR;
       
  4581         }
       
  4582         
       
  4583     }/*function_tod_to_real*/
       
  4584     break;
       
  4585 
       
  4586 /****
       
  4587  *TOD_TO_SINT
       
  4588  */
       
  4589     case function_tod_to_sint :
       
  4590     {
       
  4591         symbol_c *last_type_symbol = NULL;
       
  4592 
       
  4593         {
       
  4594             identifier_c param_name("IN");
       
  4595             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4596             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4597             symbol_c *IN_type_symbol = NULL;
       
  4598             
       
  4599             /* Get the value from a foo(<param_value>) style call */
       
  4600             if (IN_param_value == NULL)
       
  4601               IN_param_value = function_call_param_iterator.next();
       
  4602             if (IN_param_value != NULL) {
       
  4603               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4604               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4605             }
       
  4606             
       
  4607             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4608             {
       
  4609         
       
  4610                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4611                 return return_type_symbol;
       
  4612                 
       
  4613             }
       
  4614             
       
  4615             
       
  4616             ERROR;
       
  4617         }
       
  4618         
       
  4619     }/*function_tod_to_sint*/
       
  4620     break;
       
  4621 
       
  4622 /****
       
  4623  *TOD_TO_LINT
       
  4624  */
       
  4625     case function_tod_to_lint :
       
  4626     {
       
  4627         symbol_c *last_type_symbol = NULL;
       
  4628 
       
  4629         {
       
  4630             identifier_c param_name("IN");
       
  4631             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4632             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4633             symbol_c *IN_type_symbol = NULL;
       
  4634             
       
  4635             /* Get the value from a foo(<param_value>) style call */
       
  4636             if (IN_param_value == NULL)
       
  4637               IN_param_value = function_call_param_iterator.next();
       
  4638             if (IN_param_value != NULL) {
       
  4639               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4640               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4641             }
       
  4642             
       
  4643             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4644             {
       
  4645         
       
  4646                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4647                 return return_type_symbol;
       
  4648                 
       
  4649             }
       
  4650             
       
  4651             
       
  4652             ERROR;
       
  4653         }
       
  4654         
       
  4655     }/*function_tod_to_lint*/
       
  4656     break;
       
  4657 
       
  4658 /****
       
  4659  *TOD_TO_DINT
       
  4660  */
       
  4661     case function_tod_to_dint :
       
  4662     {
       
  4663         symbol_c *last_type_symbol = NULL;
       
  4664 
       
  4665         {
       
  4666             identifier_c param_name("IN");
       
  4667             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4668             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4669             symbol_c *IN_type_symbol = NULL;
       
  4670             
       
  4671             /* Get the value from a foo(<param_value>) style call */
       
  4672             if (IN_param_value == NULL)
       
  4673               IN_param_value = function_call_param_iterator.next();
       
  4674             if (IN_param_value != NULL) {
       
  4675               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4676               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4677             }
       
  4678             
       
  4679             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4680             {
       
  4681         
       
  4682                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4683                 return return_type_symbol;
       
  4684                 
       
  4685             }
       
  4686             
       
  4687             
       
  4688             ERROR;
       
  4689         }
       
  4690         
       
  4691     }/*function_tod_to_dint*/
       
  4692     break;
       
  4693 
       
  4694 /****
       
  4695  *TOD_TO_DWORD
       
  4696  */
       
  4697     case function_tod_to_dword :
       
  4698     {
       
  4699         symbol_c *last_type_symbol = NULL;
       
  4700 
       
  4701         {
       
  4702             identifier_c param_name("IN");
       
  4703             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4704             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4705             symbol_c *IN_type_symbol = NULL;
       
  4706             
       
  4707             /* Get the value from a foo(<param_value>) style call */
       
  4708             if (IN_param_value == NULL)
       
  4709               IN_param_value = function_call_param_iterator.next();
       
  4710             if (IN_param_value != NULL) {
       
  4711               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4712               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4713             }
       
  4714             
       
  4715             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4716             {
       
  4717         
       
  4718                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4719                 return return_type_symbol;
       
  4720                 
       
  4721             }
       
  4722             
       
  4723             
       
  4724             ERROR;
       
  4725         }
       
  4726         
       
  4727     }/*function_tod_to_dword*/
       
  4728     break;
       
  4729 
       
  4730 /****
       
  4731  *TOD_TO_UDINT
       
  4732  */
       
  4733     case function_tod_to_udint :
       
  4734     {
       
  4735         symbol_c *last_type_symbol = NULL;
       
  4736 
       
  4737         {
       
  4738             identifier_c param_name("IN");
       
  4739             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4740             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4741             symbol_c *IN_type_symbol = NULL;
       
  4742             
       
  4743             /* Get the value from a foo(<param_value>) style call */
       
  4744             if (IN_param_value == NULL)
       
  4745               IN_param_value = function_call_param_iterator.next();
       
  4746             if (IN_param_value != NULL) {
       
  4747               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4748               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4749             }
       
  4750             
       
  4751             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4752             {
       
  4753         
       
  4754                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4755                 return return_type_symbol;
       
  4756                 
       
  4757             }
       
  4758             
       
  4759             
       
  4760             ERROR;
       
  4761         }
       
  4762         
       
  4763     }/*function_tod_to_udint*/
       
  4764     break;
       
  4765 
       
  4766 /****
       
  4767  *TOD_TO_WORD
       
  4768  */
       
  4769     case function_tod_to_word :
       
  4770     {
       
  4771         symbol_c *last_type_symbol = NULL;
       
  4772 
       
  4773         {
       
  4774             identifier_c param_name("IN");
       
  4775             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4776             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4777             symbol_c *IN_type_symbol = NULL;
       
  4778             
       
  4779             /* Get the value from a foo(<param_value>) style call */
       
  4780             if (IN_param_value == NULL)
       
  4781               IN_param_value = function_call_param_iterator.next();
       
  4782             if (IN_param_value != NULL) {
       
  4783               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4784               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4785             }
       
  4786             
       
  4787             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4788             {
       
  4789         
       
  4790                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4791                 return return_type_symbol;
       
  4792                 
       
  4793             }
       
  4794             
       
  4795             
       
  4796             ERROR;
       
  4797         }
       
  4798         
       
  4799     }/*function_tod_to_word*/
       
  4800     break;
       
  4801 
       
  4802 /****
       
  4803  *TOD_TO_STRING
       
  4804  */
       
  4805     case function_tod_to_string :
       
  4806     {
       
  4807         symbol_c *last_type_symbol = NULL;
       
  4808 
       
  4809         {
       
  4810             identifier_c param_name("IN");
       
  4811             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4812             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4813             symbol_c *IN_type_symbol = NULL;
       
  4814             
       
  4815             /* Get the value from a foo(<param_value>) style call */
       
  4816             if (IN_param_value == NULL)
       
  4817               IN_param_value = function_call_param_iterator.next();
       
  4818             if (IN_param_value != NULL) {
       
  4819               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4820               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4821             }
       
  4822             
       
  4823             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4824             {
       
  4825         
       
  4826                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4827                 return return_type_symbol;
       
  4828                 
       
  4829             }
       
  4830             
       
  4831             
       
  4832             ERROR;
       
  4833         }
       
  4834         
       
  4835     }/*function_tod_to_string*/
       
  4836     break;
       
  4837 
       
  4838 /****
       
  4839  *TOD_TO_LWORD
       
  4840  */
       
  4841     case function_tod_to_lword :
       
  4842     {
       
  4843         symbol_c *last_type_symbol = NULL;
       
  4844 
       
  4845         {
       
  4846             identifier_c param_name("IN");
       
  4847             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4848             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4849             symbol_c *IN_type_symbol = NULL;
       
  4850             
       
  4851             /* Get the value from a foo(<param_value>) style call */
       
  4852             if (IN_param_value == NULL)
       
  4853               IN_param_value = function_call_param_iterator.next();
       
  4854             if (IN_param_value != NULL) {
       
  4855               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4856               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4857             }
       
  4858             
       
  4859             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4860             {
       
  4861         
       
  4862                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4863                 return return_type_symbol;
       
  4864                 
       
  4865             }
       
  4866             
       
  4867             
       
  4868             ERROR;
       
  4869         }
       
  4870         
       
  4871     }/*function_tod_to_lword*/
       
  4872     break;
       
  4873 
       
  4874 /****
       
  4875  *TOD_TO_UINT
       
  4876  */
       
  4877     case function_tod_to_uint :
       
  4878     {
       
  4879         symbol_c *last_type_symbol = NULL;
       
  4880 
       
  4881         {
       
  4882             identifier_c param_name("IN");
       
  4883             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4884             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4885             symbol_c *IN_type_symbol = NULL;
       
  4886             
       
  4887             /* Get the value from a foo(<param_value>) style call */
       
  4888             if (IN_param_value == NULL)
       
  4889               IN_param_value = function_call_param_iterator.next();
       
  4890             if (IN_param_value != NULL) {
       
  4891               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4892               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4893             }
       
  4894             
       
  4895             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4896             {
       
  4897         
       
  4898                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4899                 return return_type_symbol;
       
  4900                 
       
  4901             }
       
  4902             
       
  4903             
       
  4904             ERROR;
       
  4905         }
       
  4906         
       
  4907     }/*function_tod_to_uint*/
       
  4908     break;
       
  4909 
       
  4910 /****
       
  4911  *TOD_TO_LREAL
       
  4912  */
       
  4913     case function_tod_to_lreal :
       
  4914     {
       
  4915         symbol_c *last_type_symbol = NULL;
       
  4916 
       
  4917         {
       
  4918             identifier_c param_name("IN");
       
  4919             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4920             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4921             symbol_c *IN_type_symbol = NULL;
       
  4922             
       
  4923             /* Get the value from a foo(<param_value>) style call */
       
  4924             if (IN_param_value == NULL)
       
  4925               IN_param_value = function_call_param_iterator.next();
       
  4926             if (IN_param_value != NULL) {
       
  4927               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4928               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4929             }
       
  4930             
       
  4931             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4932             {
       
  4933         
       
  4934                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4935                 return return_type_symbol;
       
  4936                 
       
  4937             }
       
  4938             
       
  4939             
       
  4940             ERROR;
       
  4941         }
       
  4942         
       
  4943     }/*function_tod_to_lreal*/
       
  4944     break;
       
  4945 
       
  4946 /****
       
  4947  *TOD_TO_BYTE
       
  4948  */
       
  4949     case function_tod_to_byte :
       
  4950     {
       
  4951         symbol_c *last_type_symbol = NULL;
       
  4952 
       
  4953         {
       
  4954             identifier_c param_name("IN");
       
  4955             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4956             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4957             symbol_c *IN_type_symbol = NULL;
       
  4958             
       
  4959             /* Get the value from a foo(<param_value>) style call */
       
  4960             if (IN_param_value == NULL)
       
  4961               IN_param_value = function_call_param_iterator.next();
       
  4962             if (IN_param_value != NULL) {
       
  4963               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4964               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4965             }
       
  4966             
       
  4967             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4968             {
       
  4969         
       
  4970                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4971                 return return_type_symbol;
       
  4972                 
       
  4973             }
       
  4974             
       
  4975             
       
  4976             ERROR;
       
  4977         }
       
  4978         
       
  4979     }/*function_tod_to_byte*/
       
  4980     break;
       
  4981 
       
  4982 /****
       
  4983  *TOD_TO_USINT
       
  4984  */
       
  4985     case function_tod_to_usint :
       
  4986     {
       
  4987         symbol_c *last_type_symbol = NULL;
       
  4988 
       
  4989         {
       
  4990             identifier_c param_name("IN");
       
  4991             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4992             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4993             symbol_c *IN_type_symbol = NULL;
       
  4994             
       
  4995             /* Get the value from a foo(<param_value>) style call */
       
  4996             if (IN_param_value == NULL)
       
  4997               IN_param_value = function_call_param_iterator.next();
       
  4998             if (IN_param_value != NULL) {
       
  4999               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5000               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5001             }
       
  5002             
       
  5003             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5004             {
       
  5005         
       
  5006                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5007                 return return_type_symbol;
       
  5008                 
       
  5009             }
       
  5010             
       
  5011             
       
  5012             ERROR;
       
  5013         }
       
  5014         
       
  5015     }/*function_tod_to_usint*/
       
  5016     break;
       
  5017 
       
  5018 /****
       
  5019  *TOD_TO_ULINT
       
  5020  */
       
  5021     case function_tod_to_ulint :
       
  5022     {
       
  5023         symbol_c *last_type_symbol = NULL;
       
  5024 
       
  5025         {
       
  5026             identifier_c param_name("IN");
       
  5027             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5028             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5029             symbol_c *IN_type_symbol = NULL;
       
  5030             
       
  5031             /* Get the value from a foo(<param_value>) style call */
       
  5032             if (IN_param_value == NULL)
       
  5033               IN_param_value = function_call_param_iterator.next();
       
  5034             if (IN_param_value != NULL) {
       
  5035               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5036               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5037             }
       
  5038             
       
  5039             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5040             {
       
  5041         
       
  5042                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5043                 return return_type_symbol;
       
  5044                 
       
  5045             }
       
  5046             
       
  5047             
       
  5048             ERROR;
       
  5049         }
       
  5050         
       
  5051     }/*function_tod_to_ulint*/
       
  5052     break;
       
  5053 
       
  5054 /****
       
  5055  *TOD_TO_INT
       
  5056  */
       
  5057     case function_tod_to_int :
       
  5058     {
       
  5059         symbol_c *last_type_symbol = NULL;
       
  5060 
       
  5061         {
       
  5062             identifier_c param_name("IN");
       
  5063             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5064             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5065             symbol_c *IN_type_symbol = NULL;
       
  5066             
       
  5067             /* Get the value from a foo(<param_value>) style call */
       
  5068             if (IN_param_value == NULL)
       
  5069               IN_param_value = function_call_param_iterator.next();
       
  5070             if (IN_param_value != NULL) {
       
  5071               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5072               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5073             }
       
  5074             
       
  5075             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  5076             {
       
  5077         
       
  5078                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5079                 return return_type_symbol;
       
  5080                 
       
  5081             }
       
  5082             
       
  5083             
       
  5084             ERROR;
       
  5085         }
       
  5086         
       
  5087     }/*function_tod_to_int*/
       
  5088     break;
       
  5089 
       
  5090 /****
       
  5091  *UDINT_TO_REAL
       
  5092  */
       
  5093     case function_udint_to_real :
       
  5094     {
       
  5095         symbol_c *last_type_symbol = NULL;
       
  5096 
       
  5097         {
       
  5098             identifier_c param_name("IN");
       
  5099             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5100             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5101             symbol_c *IN_type_symbol = NULL;
       
  5102             
       
  5103             /* Get the value from a foo(<param_value>) style call */
       
  5104             if (IN_param_value == NULL)
       
  5105               IN_param_value = function_call_param_iterator.next();
       
  5106             if (IN_param_value != NULL) {
       
  5107               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5108               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5109             }
       
  5110             
       
  5111             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5112             {
       
  5113         
       
  5114                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5115                 return return_type_symbol;
       
  5116                 
       
  5117             }
       
  5118             
       
  5119             
       
  5120             ERROR;
       
  5121         }
       
  5122         
       
  5123     }/*function_udint_to_real*/
       
  5124     break;
       
  5125 
       
  5126 /****
       
  5127  *UDINT_TO_SINT
       
  5128  */
       
  5129     case function_udint_to_sint :
       
  5130     {
       
  5131         symbol_c *last_type_symbol = NULL;
       
  5132 
       
  5133         {
       
  5134             identifier_c param_name("IN");
       
  5135             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5136             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5137             symbol_c *IN_type_symbol = NULL;
       
  5138             
       
  5139             /* Get the value from a foo(<param_value>) style call */
       
  5140             if (IN_param_value == NULL)
       
  5141               IN_param_value = function_call_param_iterator.next();
       
  5142             if (IN_param_value != NULL) {
       
  5143               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5144               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5145             }
       
  5146             
       
  5147             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5148             {
       
  5149         
       
  5150                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5151                 return return_type_symbol;
       
  5152                 
       
  5153             }
       
  5154             
       
  5155             
       
  5156             ERROR;
       
  5157         }
       
  5158         
       
  5159     }/*function_udint_to_sint*/
       
  5160     break;
       
  5161 
       
  5162 /****
       
  5163  *UDINT_TO_LINT
       
  5164  */
       
  5165     case function_udint_to_lint :
       
  5166     {
       
  5167         symbol_c *last_type_symbol = NULL;
       
  5168 
       
  5169         {
       
  5170             identifier_c param_name("IN");
       
  5171             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5172             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5173             symbol_c *IN_type_symbol = NULL;
       
  5174             
       
  5175             /* Get the value from a foo(<param_value>) style call */
       
  5176             if (IN_param_value == NULL)
       
  5177               IN_param_value = function_call_param_iterator.next();
       
  5178             if (IN_param_value != NULL) {
       
  5179               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5180               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5181             }
       
  5182             
       
  5183             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5184             {
       
  5185         
       
  5186                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5187                 return return_type_symbol;
       
  5188                 
       
  5189             }
       
  5190             
       
  5191             
       
  5192             ERROR;
       
  5193         }
       
  5194         
       
  5195     }/*function_udint_to_lint*/
       
  5196     break;
       
  5197 
       
  5198 /****
       
  5199  *UDINT_TO_DINT
       
  5200  */
       
  5201     case function_udint_to_dint :
       
  5202     {
       
  5203         symbol_c *last_type_symbol = NULL;
       
  5204 
       
  5205         {
       
  5206             identifier_c param_name("IN");
       
  5207             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5208             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5209             symbol_c *IN_type_symbol = NULL;
       
  5210             
       
  5211             /* Get the value from a foo(<param_value>) style call */
       
  5212             if (IN_param_value == NULL)
       
  5213               IN_param_value = function_call_param_iterator.next();
       
  5214             if (IN_param_value != NULL) {
       
  5215               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5216               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5217             }
       
  5218             
       
  5219             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5220             {
       
  5221         
       
  5222                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5223                 return return_type_symbol;
       
  5224                 
       
  5225             }
       
  5226             
       
  5227             
       
  5228             ERROR;
       
  5229         }
       
  5230         
       
  5231     }/*function_udint_to_dint*/
       
  5232     break;
       
  5233 
       
  5234 /****
       
  5235  *UDINT_TO_DATE
       
  5236  */
       
  5237     case function_udint_to_date :
       
  5238     {
       
  5239         symbol_c *last_type_symbol = NULL;
       
  5240 
       
  5241         {
       
  5242             identifier_c param_name("IN");
       
  5243             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5244             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5245             symbol_c *IN_type_symbol = NULL;
       
  5246             
       
  5247             /* Get the value from a foo(<param_value>) style call */
       
  5248             if (IN_param_value == NULL)
       
  5249               IN_param_value = function_call_param_iterator.next();
       
  5250             if (IN_param_value != NULL) {
       
  5251               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5252               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5253             }
       
  5254             
       
  5255             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5256             {
       
  5257         
       
  5258                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5259                 return return_type_symbol;
       
  5260                 
       
  5261             }
       
  5262             
       
  5263             
       
  5264             ERROR;
       
  5265         }
       
  5266         
       
  5267     }/*function_udint_to_date*/
       
  5268     break;
       
  5269 
       
  5270 /****
       
  5271  *UDINT_TO_DWORD
       
  5272  */
       
  5273     case function_udint_to_dword :
       
  5274     {
       
  5275         symbol_c *last_type_symbol = NULL;
       
  5276 
       
  5277         {
       
  5278             identifier_c param_name("IN");
       
  5279             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5280             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5281             symbol_c *IN_type_symbol = NULL;
       
  5282             
       
  5283             /* Get the value from a foo(<param_value>) style call */
       
  5284             if (IN_param_value == NULL)
       
  5285               IN_param_value = function_call_param_iterator.next();
       
  5286             if (IN_param_value != NULL) {
       
  5287               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5288               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5289             }
       
  5290             
       
  5291             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5292             {
       
  5293         
       
  5294                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5295                 return return_type_symbol;
       
  5296                 
       
  5297             }
       
  5298             
       
  5299             
       
  5300             ERROR;
       
  5301         }
       
  5302         
       
  5303     }/*function_udint_to_dword*/
       
  5304     break;
       
  5305 
       
  5306 /****
       
  5307  *UDINT_TO_DT
       
  5308  */
       
  5309     case function_udint_to_dt :
       
  5310     {
       
  5311         symbol_c *last_type_symbol = NULL;
       
  5312 
       
  5313         {
       
  5314             identifier_c param_name("IN");
       
  5315             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5316             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5317             symbol_c *IN_type_symbol = NULL;
       
  5318             
       
  5319             /* Get the value from a foo(<param_value>) style call */
       
  5320             if (IN_param_value == NULL)
       
  5321               IN_param_value = function_call_param_iterator.next();
       
  5322             if (IN_param_value != NULL) {
       
  5323               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5324               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5325             }
       
  5326             
       
  5327             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5328             {
       
  5329         
       
  5330                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5331                 return return_type_symbol;
       
  5332                 
       
  5333             }
       
  5334             
       
  5335             
       
  5336             ERROR;
       
  5337         }
       
  5338         
       
  5339     }/*function_udint_to_dt*/
       
  5340     break;
       
  5341 
       
  5342 /****
       
  5343  *UDINT_TO_TOD
       
  5344  */
       
  5345     case function_udint_to_tod :
       
  5346     {
       
  5347         symbol_c *last_type_symbol = NULL;
       
  5348 
       
  5349         {
       
  5350             identifier_c param_name("IN");
       
  5351             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5352             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5353             symbol_c *IN_type_symbol = NULL;
       
  5354             
       
  5355             /* Get the value from a foo(<param_value>) style call */
       
  5356             if (IN_param_value == NULL)
       
  5357               IN_param_value = function_call_param_iterator.next();
       
  5358             if (IN_param_value != NULL) {
       
  5359               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5360               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5361             }
       
  5362             
       
  5363             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5364             {
       
  5365         
       
  5366                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5367                 return return_type_symbol;
       
  5368                 
       
  5369             }
       
  5370             
       
  5371             
       
  5372             ERROR;
       
  5373         }
       
  5374         
       
  5375     }/*function_udint_to_tod*/
       
  5376     break;
       
  5377 
       
  5378 /****
       
  5379  *UDINT_TO_WORD
       
  5380  */
       
  5381     case function_udint_to_word :
       
  5382     {
       
  5383         symbol_c *last_type_symbol = NULL;
       
  5384 
       
  5385         {
       
  5386             identifier_c param_name("IN");
       
  5387             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5388             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5389             symbol_c *IN_type_symbol = NULL;
       
  5390             
       
  5391             /* Get the value from a foo(<param_value>) style call */
       
  5392             if (IN_param_value == NULL)
       
  5393               IN_param_value = function_call_param_iterator.next();
       
  5394             if (IN_param_value != NULL) {
       
  5395               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5396               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5397             }
       
  5398             
       
  5399             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5400             {
       
  5401         
       
  5402                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5403                 return return_type_symbol;
       
  5404                 
       
  5405             }
       
  5406             
       
  5407             
       
  5408             ERROR;
       
  5409         }
       
  5410         
       
  5411     }/*function_udint_to_word*/
       
  5412     break;
       
  5413 
       
  5414 /****
       
  5415  *UDINT_TO_STRING
       
  5416  */
       
  5417     case function_udint_to_string :
       
  5418     {
       
  5419         symbol_c *last_type_symbol = NULL;
       
  5420 
       
  5421         {
       
  5422             identifier_c param_name("IN");
       
  5423             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5424             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5425             symbol_c *IN_type_symbol = NULL;
       
  5426             
       
  5427             /* Get the value from a foo(<param_value>) style call */
       
  5428             if (IN_param_value == NULL)
       
  5429               IN_param_value = function_call_param_iterator.next();
       
  5430             if (IN_param_value != NULL) {
       
  5431               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5432               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5433             }
       
  5434             
       
  5435             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5436             {
       
  5437         
       
  5438                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5439                 return return_type_symbol;
       
  5440                 
       
  5441             }
       
  5442             
       
  5443             
       
  5444             ERROR;
       
  5445         }
       
  5446         
       
  5447     }/*function_udint_to_string*/
       
  5448     break;
       
  5449 
       
  5450 /****
       
  5451  *UDINT_TO_LWORD
       
  5452  */
       
  5453     case function_udint_to_lword :
       
  5454     {
       
  5455         symbol_c *last_type_symbol = NULL;
       
  5456 
       
  5457         {
       
  5458             identifier_c param_name("IN");
       
  5459             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5460             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5461             symbol_c *IN_type_symbol = NULL;
       
  5462             
       
  5463             /* Get the value from a foo(<param_value>) style call */
       
  5464             if (IN_param_value == NULL)
       
  5465               IN_param_value = function_call_param_iterator.next();
       
  5466             if (IN_param_value != NULL) {
       
  5467               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5468               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5469             }
       
  5470             
       
  5471             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5472             {
       
  5473         
       
  5474                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5475                 return return_type_symbol;
       
  5476                 
       
  5477             }
       
  5478             
       
  5479             
       
  5480             ERROR;
       
  5481         }
       
  5482         
       
  5483     }/*function_udint_to_lword*/
       
  5484     break;
       
  5485 
       
  5486 /****
       
  5487  *UDINT_TO_UINT
       
  5488  */
       
  5489     case function_udint_to_uint :
       
  5490     {
       
  5491         symbol_c *last_type_symbol = NULL;
       
  5492 
       
  5493         {
       
  5494             identifier_c param_name("IN");
       
  5495             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5496             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5497             symbol_c *IN_type_symbol = NULL;
       
  5498             
       
  5499             /* Get the value from a foo(<param_value>) style call */
       
  5500             if (IN_param_value == NULL)
       
  5501               IN_param_value = function_call_param_iterator.next();
       
  5502             if (IN_param_value != NULL) {
       
  5503               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5504               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5505             }
       
  5506             
       
  5507             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5508             {
       
  5509         
       
  5510                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5511                 return return_type_symbol;
       
  5512                 
       
  5513             }
       
  5514             
       
  5515             
       
  5516             ERROR;
       
  5517         }
       
  5518         
       
  5519     }/*function_udint_to_uint*/
       
  5520     break;
       
  5521 
       
  5522 /****
       
  5523  *UDINT_TO_LREAL
       
  5524  */
       
  5525     case function_udint_to_lreal :
       
  5526     {
       
  5527         symbol_c *last_type_symbol = NULL;
       
  5528 
       
  5529         {
       
  5530             identifier_c param_name("IN");
       
  5531             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5532             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5533             symbol_c *IN_type_symbol = NULL;
       
  5534             
       
  5535             /* Get the value from a foo(<param_value>) style call */
       
  5536             if (IN_param_value == NULL)
       
  5537               IN_param_value = function_call_param_iterator.next();
       
  5538             if (IN_param_value != NULL) {
       
  5539               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5540               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5541             }
       
  5542             
       
  5543             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5544             {
       
  5545         
       
  5546                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5547                 return return_type_symbol;
       
  5548                 
       
  5549             }
       
  5550             
       
  5551             
       
  5552             ERROR;
       
  5553         }
       
  5554         
       
  5555     }/*function_udint_to_lreal*/
       
  5556     break;
       
  5557 
       
  5558 /****
       
  5559  *UDINT_TO_BYTE
       
  5560  */
       
  5561     case function_udint_to_byte :
       
  5562     {
       
  5563         symbol_c *last_type_symbol = NULL;
       
  5564 
       
  5565         {
       
  5566             identifier_c param_name("IN");
       
  5567             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5568             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5569             symbol_c *IN_type_symbol = NULL;
       
  5570             
       
  5571             /* Get the value from a foo(<param_value>) style call */
       
  5572             if (IN_param_value == NULL)
       
  5573               IN_param_value = function_call_param_iterator.next();
       
  5574             if (IN_param_value != NULL) {
       
  5575               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5576               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5577             }
       
  5578             
       
  5579             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5580             {
       
  5581         
       
  5582                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5583                 return return_type_symbol;
       
  5584                 
       
  5585             }
       
  5586             
       
  5587             
       
  5588             ERROR;
       
  5589         }
       
  5590         
       
  5591     }/*function_udint_to_byte*/
       
  5592     break;
       
  5593 
       
  5594 /****
       
  5595  *UDINT_TO_USINT
       
  5596  */
       
  5597     case function_udint_to_usint :
       
  5598     {
       
  5599         symbol_c *last_type_symbol = NULL;
       
  5600 
       
  5601         {
       
  5602             identifier_c param_name("IN");
       
  5603             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5604             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5605             symbol_c *IN_type_symbol = NULL;
       
  5606             
       
  5607             /* Get the value from a foo(<param_value>) style call */
       
  5608             if (IN_param_value == NULL)
       
  5609               IN_param_value = function_call_param_iterator.next();
       
  5610             if (IN_param_value != NULL) {
       
  5611               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5612               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5613             }
       
  5614             
       
  5615             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5616             {
       
  5617         
       
  5618                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5619                 return return_type_symbol;
       
  5620                 
       
  5621             }
       
  5622             
       
  5623             
       
  5624             ERROR;
       
  5625         }
       
  5626         
       
  5627     }/*function_udint_to_usint*/
       
  5628     break;
       
  5629 
       
  5630 /****
       
  5631  *UDINT_TO_ULINT
       
  5632  */
       
  5633     case function_udint_to_ulint :
       
  5634     {
       
  5635         symbol_c *last_type_symbol = NULL;
       
  5636 
       
  5637         {
       
  5638             identifier_c param_name("IN");
       
  5639             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5640             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5641             symbol_c *IN_type_symbol = NULL;
       
  5642             
       
  5643             /* Get the value from a foo(<param_value>) style call */
       
  5644             if (IN_param_value == NULL)
       
  5645               IN_param_value = function_call_param_iterator.next();
       
  5646             if (IN_param_value != NULL) {
       
  5647               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5648               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5649             }
       
  5650             
       
  5651             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5652             {
       
  5653         
       
  5654                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5655                 return return_type_symbol;
       
  5656                 
       
  5657             }
       
  5658             
       
  5659             
       
  5660             ERROR;
       
  5661         }
       
  5662         
       
  5663     }/*function_udint_to_ulint*/
       
  5664     break;
       
  5665 
       
  5666 /****
       
  5667  *UDINT_TO_BOOL
       
  5668  */
       
  5669     case function_udint_to_bool :
       
  5670     {
       
  5671         symbol_c *last_type_symbol = NULL;
       
  5672 
       
  5673         {
       
  5674             identifier_c param_name("IN");
       
  5675             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5676             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5677             symbol_c *IN_type_symbol = NULL;
       
  5678             
       
  5679             /* Get the value from a foo(<param_value>) style call */
       
  5680             if (IN_param_value == NULL)
       
  5681               IN_param_value = function_call_param_iterator.next();
       
  5682             if (IN_param_value != NULL) {
       
  5683               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5684               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5685             }
       
  5686             
       
  5687             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5688             {
       
  5689         
       
  5690                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5691                 return return_type_symbol;
       
  5692                 
       
  5693             }
       
  5694             
       
  5695             
       
  5696             ERROR;
       
  5697         }
       
  5698         
       
  5699     }/*function_udint_to_bool*/
       
  5700     break;
       
  5701 
       
  5702 /****
       
  5703  *UDINT_TO_TIME
       
  5704  */
       
  5705     case function_udint_to_time :
       
  5706     {
       
  5707         symbol_c *last_type_symbol = NULL;
       
  5708 
       
  5709         {
       
  5710             identifier_c param_name("IN");
       
  5711             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5712             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5713             symbol_c *IN_type_symbol = NULL;
       
  5714             
       
  5715             /* Get the value from a foo(<param_value>) style call */
       
  5716             if (IN_param_value == NULL)
       
  5717               IN_param_value = function_call_param_iterator.next();
       
  5718             if (IN_param_value != NULL) {
       
  5719               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5720               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5721             }
       
  5722             
       
  5723             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5724             {
       
  5725         
       
  5726                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5727                 return return_type_symbol;
       
  5728                 
       
  5729             }
       
  5730             
       
  5731             
       
  5732             ERROR;
       
  5733         }
       
  5734         
       
  5735     }/*function_udint_to_time*/
       
  5736     break;
       
  5737 
       
  5738 /****
       
  5739  *UDINT_TO_INT
       
  5740  */
       
  5741     case function_udint_to_int :
       
  5742     {
       
  5743         symbol_c *last_type_symbol = NULL;
       
  5744 
       
  5745         {
       
  5746             identifier_c param_name("IN");
       
  5747             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5748             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5749             symbol_c *IN_type_symbol = NULL;
       
  5750             
       
  5751             /* Get the value from a foo(<param_value>) style call */
       
  5752             if (IN_param_value == NULL)
       
  5753               IN_param_value = function_call_param_iterator.next();
       
  5754             if (IN_param_value != NULL) {
       
  5755               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5756               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5757             }
       
  5758             
       
  5759             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5760             {
       
  5761         
       
  5762                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5763                 return return_type_symbol;
       
  5764                 
       
  5765             }
       
  5766             
       
  5767             
       
  5768             ERROR;
       
  5769         }
       
  5770         
       
  5771     }/*function_udint_to_int*/
       
  5772     break;
       
  5773 
       
  5774 /****
       
  5775  *WORD_TO_REAL
       
  5776  */
       
  5777     case function_word_to_real :
       
  5778     {
       
  5779         symbol_c *last_type_symbol = NULL;
       
  5780 
       
  5781         {
       
  5782             identifier_c param_name("IN");
       
  5783             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5784             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5785             symbol_c *IN_type_symbol = NULL;
       
  5786             
       
  5787             /* Get the value from a foo(<param_value>) style call */
       
  5788             if (IN_param_value == NULL)
       
  5789               IN_param_value = function_call_param_iterator.next();
       
  5790             if (IN_param_value != NULL) {
       
  5791               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5792               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5793             }
       
  5794             
       
  5795             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5796             {
       
  5797         
       
  5798                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5799                 return return_type_symbol;
       
  5800                 
       
  5801             }
       
  5802             
       
  5803             
       
  5804             ERROR;
       
  5805         }
       
  5806         
       
  5807     }/*function_word_to_real*/
       
  5808     break;
       
  5809 
       
  5810 /****
       
  5811  *WORD_TO_SINT
       
  5812  */
       
  5813     case function_word_to_sint :
       
  5814     {
       
  5815         symbol_c *last_type_symbol = NULL;
       
  5816 
       
  5817         {
       
  5818             identifier_c param_name("IN");
       
  5819             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5820             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5821             symbol_c *IN_type_symbol = NULL;
       
  5822             
       
  5823             /* Get the value from a foo(<param_value>) style call */
       
  5824             if (IN_param_value == NULL)
       
  5825               IN_param_value = function_call_param_iterator.next();
       
  5826             if (IN_param_value != NULL) {
       
  5827               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5828               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5829             }
       
  5830             
       
  5831             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5832             {
       
  5833         
       
  5834                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5835                 return return_type_symbol;
       
  5836                 
       
  5837             }
       
  5838             
       
  5839             
       
  5840             ERROR;
       
  5841         }
       
  5842         
       
  5843     }/*function_word_to_sint*/
       
  5844     break;
       
  5845 
       
  5846 /****
       
  5847  *WORD_TO_LINT
       
  5848  */
       
  5849     case function_word_to_lint :
       
  5850     {
       
  5851         symbol_c *last_type_symbol = NULL;
       
  5852 
       
  5853         {
       
  5854             identifier_c param_name("IN");
       
  5855             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5856             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5857             symbol_c *IN_type_symbol = NULL;
       
  5858             
       
  5859             /* Get the value from a foo(<param_value>) style call */
       
  5860             if (IN_param_value == NULL)
       
  5861               IN_param_value = function_call_param_iterator.next();
       
  5862             if (IN_param_value != NULL) {
       
  5863               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5864               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5865             }
       
  5866             
       
  5867             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5868             {
       
  5869         
       
  5870                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5871                 return return_type_symbol;
       
  5872                 
       
  5873             }
       
  5874             
       
  5875             
       
  5876             ERROR;
       
  5877         }
       
  5878         
       
  5879     }/*function_word_to_lint*/
       
  5880     break;
       
  5881 
       
  5882 /****
       
  5883  *WORD_TO_DINT
       
  5884  */
       
  5885     case function_word_to_dint :
       
  5886     {
       
  5887         symbol_c *last_type_symbol = NULL;
       
  5888 
       
  5889         {
       
  5890             identifier_c param_name("IN");
       
  5891             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5892             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5893             symbol_c *IN_type_symbol = NULL;
       
  5894             
       
  5895             /* Get the value from a foo(<param_value>) style call */
       
  5896             if (IN_param_value == NULL)
       
  5897               IN_param_value = function_call_param_iterator.next();
       
  5898             if (IN_param_value != NULL) {
       
  5899               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5900               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5901             }
       
  5902             
       
  5903             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5904             {
       
  5905         
       
  5906                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5907                 return return_type_symbol;
       
  5908                 
       
  5909             }
       
  5910             
       
  5911             
       
  5912             ERROR;
       
  5913         }
       
  5914         
       
  5915     }/*function_word_to_dint*/
       
  5916     break;
       
  5917 
       
  5918 /****
       
  5919  *WORD_TO_DATE
       
  5920  */
       
  5921     case function_word_to_date :
       
  5922     {
       
  5923         symbol_c *last_type_symbol = NULL;
       
  5924 
       
  5925         {
       
  5926             identifier_c param_name("IN");
       
  5927             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5928             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5929             symbol_c *IN_type_symbol = NULL;
       
  5930             
       
  5931             /* Get the value from a foo(<param_value>) style call */
       
  5932             if (IN_param_value == NULL)
       
  5933               IN_param_value = function_call_param_iterator.next();
       
  5934             if (IN_param_value != NULL) {
       
  5935               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5936               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5937             }
       
  5938             
       
  5939             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5940             {
       
  5941         
       
  5942                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5943                 return return_type_symbol;
       
  5944                 
       
  5945             }
       
  5946             
       
  5947             
       
  5948             ERROR;
       
  5949         }
       
  5950         
       
  5951     }/*function_word_to_date*/
       
  5952     break;
       
  5953 
       
  5954 /****
       
  5955  *WORD_TO_DWORD
       
  5956  */
       
  5957     case function_word_to_dword :
       
  5958     {
       
  5959         symbol_c *last_type_symbol = NULL;
       
  5960 
       
  5961         {
       
  5962             identifier_c param_name("IN");
       
  5963             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5964             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5965             symbol_c *IN_type_symbol = NULL;
       
  5966             
       
  5967             /* Get the value from a foo(<param_value>) style call */
       
  5968             if (IN_param_value == NULL)
       
  5969               IN_param_value = function_call_param_iterator.next();
       
  5970             if (IN_param_value != NULL) {
       
  5971               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5972               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5973             }
       
  5974             
       
  5975             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5976             {
       
  5977         
       
  5978                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5979                 return return_type_symbol;
       
  5980                 
       
  5981             }
       
  5982             
       
  5983             
       
  5984             ERROR;
       
  5985         }
       
  5986         
       
  5987     }/*function_word_to_dword*/
       
  5988     break;
       
  5989 
       
  5990 /****
       
  5991  *WORD_TO_DT
       
  5992  */
       
  5993     case function_word_to_dt :
       
  5994     {
       
  5995         symbol_c *last_type_symbol = NULL;
       
  5996 
       
  5997         {
       
  5998             identifier_c param_name("IN");
       
  5999             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6000             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6001             symbol_c *IN_type_symbol = NULL;
       
  6002             
       
  6003             /* Get the value from a foo(<param_value>) style call */
       
  6004             if (IN_param_value == NULL)
       
  6005               IN_param_value = function_call_param_iterator.next();
       
  6006             if (IN_param_value != NULL) {
       
  6007               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6008               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6009             }
       
  6010             
       
  6011             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6012             {
       
  6013         
       
  6014                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6015                 return return_type_symbol;
       
  6016                 
       
  6017             }
       
  6018             
       
  6019             
       
  6020             ERROR;
       
  6021         }
       
  6022         
       
  6023     }/*function_word_to_dt*/
       
  6024     break;
       
  6025 
       
  6026 /****
       
  6027  *WORD_TO_TOD
       
  6028  */
       
  6029     case function_word_to_tod :
       
  6030     {
       
  6031         symbol_c *last_type_symbol = NULL;
       
  6032 
       
  6033         {
       
  6034             identifier_c param_name("IN");
       
  6035             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6036             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6037             symbol_c *IN_type_symbol = NULL;
       
  6038             
       
  6039             /* Get the value from a foo(<param_value>) style call */
       
  6040             if (IN_param_value == NULL)
       
  6041               IN_param_value = function_call_param_iterator.next();
       
  6042             if (IN_param_value != NULL) {
       
  6043               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6044               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6045             }
       
  6046             
       
  6047             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6048             {
       
  6049         
       
  6050                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6051                 return return_type_symbol;
       
  6052                 
       
  6053             }
       
  6054             
       
  6055             
       
  6056             ERROR;
       
  6057         }
       
  6058         
       
  6059     }/*function_word_to_tod*/
       
  6060     break;
       
  6061 
       
  6062 /****
       
  6063  *WORD_TO_UDINT
       
  6064  */
       
  6065     case function_word_to_udint :
       
  6066     {
       
  6067         symbol_c *last_type_symbol = NULL;
       
  6068 
       
  6069         {
       
  6070             identifier_c param_name("IN");
       
  6071             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6072             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6073             symbol_c *IN_type_symbol = NULL;
       
  6074             
       
  6075             /* Get the value from a foo(<param_value>) style call */
       
  6076             if (IN_param_value == NULL)
       
  6077               IN_param_value = function_call_param_iterator.next();
       
  6078             if (IN_param_value != NULL) {
       
  6079               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6080               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6081             }
       
  6082             
       
  6083             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6084             {
       
  6085         
       
  6086                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6087                 return return_type_symbol;
       
  6088                 
       
  6089             }
       
  6090             
       
  6091             
       
  6092             ERROR;
       
  6093         }
       
  6094         
       
  6095     }/*function_word_to_udint*/
       
  6096     break;
       
  6097 
       
  6098 /****
       
  6099  *WORD_TO_STRING
       
  6100  */
       
  6101     case function_word_to_string :
       
  6102     {
       
  6103         symbol_c *last_type_symbol = NULL;
       
  6104 
       
  6105         {
       
  6106             identifier_c param_name("IN");
       
  6107             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6108             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6109             symbol_c *IN_type_symbol = NULL;
       
  6110             
       
  6111             /* Get the value from a foo(<param_value>) style call */
       
  6112             if (IN_param_value == NULL)
       
  6113               IN_param_value = function_call_param_iterator.next();
       
  6114             if (IN_param_value != NULL) {
       
  6115               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6116               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6117             }
       
  6118             
       
  6119             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6120             {
       
  6121         
       
  6122                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6123                 return return_type_symbol;
       
  6124                 
       
  6125             }
       
  6126             
       
  6127             
       
  6128             ERROR;
       
  6129         }
       
  6130         
       
  6131     }/*function_word_to_string*/
       
  6132     break;
       
  6133 
       
  6134 /****
       
  6135  *WORD_TO_LWORD
       
  6136  */
       
  6137     case function_word_to_lword :
       
  6138     {
       
  6139         symbol_c *last_type_symbol = NULL;
       
  6140 
       
  6141         {
       
  6142             identifier_c param_name("IN");
       
  6143             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6144             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6145             symbol_c *IN_type_symbol = NULL;
       
  6146             
       
  6147             /* Get the value from a foo(<param_value>) style call */
       
  6148             if (IN_param_value == NULL)
       
  6149               IN_param_value = function_call_param_iterator.next();
       
  6150             if (IN_param_value != NULL) {
       
  6151               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6152               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6153             }
       
  6154             
       
  6155             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6156             {
       
  6157         
       
  6158                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6159                 return return_type_symbol;
       
  6160                 
       
  6161             }
       
  6162             
       
  6163             
       
  6164             ERROR;
       
  6165         }
       
  6166         
       
  6167     }/*function_word_to_lword*/
       
  6168     break;
       
  6169 
       
  6170 /****
       
  6171  *WORD_TO_UINT
       
  6172  */
       
  6173     case function_word_to_uint :
       
  6174     {
       
  6175         symbol_c *last_type_symbol = NULL;
       
  6176 
       
  6177         {
       
  6178             identifier_c param_name("IN");
       
  6179             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6180             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6181             symbol_c *IN_type_symbol = NULL;
       
  6182             
       
  6183             /* Get the value from a foo(<param_value>) style call */
       
  6184             if (IN_param_value == NULL)
       
  6185               IN_param_value = function_call_param_iterator.next();
       
  6186             if (IN_param_value != NULL) {
       
  6187               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6188               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6189             }
       
  6190             
       
  6191             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6192             {
       
  6193         
       
  6194                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6195                 return return_type_symbol;
       
  6196                 
       
  6197             }
       
  6198             
       
  6199             
       
  6200             ERROR;
       
  6201         }
       
  6202         
       
  6203     }/*function_word_to_uint*/
       
  6204     break;
       
  6205 
       
  6206 /****
       
  6207  *WORD_TO_LREAL
       
  6208  */
       
  6209     case function_word_to_lreal :
       
  6210     {
       
  6211         symbol_c *last_type_symbol = NULL;
       
  6212 
       
  6213         {
       
  6214             identifier_c param_name("IN");
       
  6215             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6216             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6217             symbol_c *IN_type_symbol = NULL;
       
  6218             
       
  6219             /* Get the value from a foo(<param_value>) style call */
       
  6220             if (IN_param_value == NULL)
       
  6221               IN_param_value = function_call_param_iterator.next();
       
  6222             if (IN_param_value != NULL) {
       
  6223               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6224               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6225             }
       
  6226             
       
  6227             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6228             {
       
  6229         
       
  6230                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6231                 return return_type_symbol;
       
  6232                 
       
  6233             }
       
  6234             
       
  6235             
       
  6236             ERROR;
       
  6237         }
       
  6238         
       
  6239     }/*function_word_to_lreal*/
       
  6240     break;
       
  6241 
       
  6242 /****
       
  6243  *WORD_TO_BYTE
       
  6244  */
       
  6245     case function_word_to_byte :
       
  6246     {
       
  6247         symbol_c *last_type_symbol = NULL;
       
  6248 
       
  6249         {
       
  6250             identifier_c param_name("IN");
       
  6251             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6252             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6253             symbol_c *IN_type_symbol = NULL;
       
  6254             
       
  6255             /* Get the value from a foo(<param_value>) style call */
       
  6256             if (IN_param_value == NULL)
       
  6257               IN_param_value = function_call_param_iterator.next();
       
  6258             if (IN_param_value != NULL) {
       
  6259               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6260               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6261             }
       
  6262             
       
  6263             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6264             {
       
  6265         
       
  6266                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6267                 return return_type_symbol;
       
  6268                 
       
  6269             }
       
  6270             
       
  6271             
       
  6272             ERROR;
       
  6273         }
       
  6274         
       
  6275     }/*function_word_to_byte*/
       
  6276     break;
       
  6277 
       
  6278 /****
       
  6279  *WORD_TO_USINT
       
  6280  */
       
  6281     case function_word_to_usint :
       
  6282     {
       
  6283         symbol_c *last_type_symbol = NULL;
       
  6284 
       
  6285         {
       
  6286             identifier_c param_name("IN");
       
  6287             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6288             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6289             symbol_c *IN_type_symbol = NULL;
       
  6290             
       
  6291             /* Get the value from a foo(<param_value>) style call */
       
  6292             if (IN_param_value == NULL)
       
  6293               IN_param_value = function_call_param_iterator.next();
       
  6294             if (IN_param_value != NULL) {
       
  6295               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6296               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6297             }
       
  6298             
       
  6299             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6300             {
       
  6301         
       
  6302                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6303                 return return_type_symbol;
       
  6304                 
       
  6305             }
       
  6306             
       
  6307             
       
  6308             ERROR;
       
  6309         }
       
  6310         
       
  6311     }/*function_word_to_usint*/
       
  6312     break;
       
  6313 
       
  6314 /****
       
  6315  *WORD_TO_ULINT
       
  6316  */
       
  6317     case function_word_to_ulint :
       
  6318     {
       
  6319         symbol_c *last_type_symbol = NULL;
       
  6320 
       
  6321         {
       
  6322             identifier_c param_name("IN");
       
  6323             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6324             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6325             symbol_c *IN_type_symbol = NULL;
       
  6326             
       
  6327             /* Get the value from a foo(<param_value>) style call */
       
  6328             if (IN_param_value == NULL)
       
  6329               IN_param_value = function_call_param_iterator.next();
       
  6330             if (IN_param_value != NULL) {
       
  6331               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6332               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6333             }
       
  6334             
       
  6335             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6336             {
       
  6337         
       
  6338                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6339                 return return_type_symbol;
       
  6340                 
       
  6341             }
       
  6342             
       
  6343             
       
  6344             ERROR;
       
  6345         }
       
  6346         
       
  6347     }/*function_word_to_ulint*/
       
  6348     break;
       
  6349 
       
  6350 /****
       
  6351  *WORD_TO_BOOL
       
  6352  */
       
  6353     case function_word_to_bool :
       
  6354     {
       
  6355         symbol_c *last_type_symbol = NULL;
       
  6356 
       
  6357         {
       
  6358             identifier_c param_name("IN");
       
  6359             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6360             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6361             symbol_c *IN_type_symbol = NULL;
       
  6362             
       
  6363             /* Get the value from a foo(<param_value>) style call */
       
  6364             if (IN_param_value == NULL)
       
  6365               IN_param_value = function_call_param_iterator.next();
       
  6366             if (IN_param_value != NULL) {
       
  6367               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6368               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6369             }
       
  6370             
       
  6371             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6372             {
       
  6373         
       
  6374                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6375                 return return_type_symbol;
       
  6376                 
       
  6377             }
       
  6378             
       
  6379             
       
  6380             ERROR;
       
  6381         }
       
  6382         
       
  6383     }/*function_word_to_bool*/
       
  6384     break;
       
  6385 
       
  6386 /****
       
  6387  *WORD_TO_TIME
       
  6388  */
       
  6389     case function_word_to_time :
       
  6390     {
       
  6391         symbol_c *last_type_symbol = NULL;
       
  6392 
       
  6393         {
       
  6394             identifier_c param_name("IN");
       
  6395             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6396             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6397             symbol_c *IN_type_symbol = NULL;
       
  6398             
       
  6399             /* Get the value from a foo(<param_value>) style call */
       
  6400             if (IN_param_value == NULL)
       
  6401               IN_param_value = function_call_param_iterator.next();
       
  6402             if (IN_param_value != NULL) {
       
  6403               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6404               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6405             }
       
  6406             
       
  6407             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6408             {
       
  6409         
       
  6410                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6411                 return return_type_symbol;
       
  6412                 
       
  6413             }
       
  6414             
       
  6415             
       
  6416             ERROR;
       
  6417         }
       
  6418         
       
  6419     }/*function_word_to_time*/
       
  6420     break;
       
  6421 
       
  6422 /****
       
  6423  *WORD_TO_INT
       
  6424  */
       
  6425     case function_word_to_int :
       
  6426     {
       
  6427         symbol_c *last_type_symbol = NULL;
       
  6428 
       
  6429         {
       
  6430             identifier_c param_name("IN");
       
  6431             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6432             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6433             symbol_c *IN_type_symbol = NULL;
       
  6434             
       
  6435             /* Get the value from a foo(<param_value>) style call */
       
  6436             if (IN_param_value == NULL)
       
  6437               IN_param_value = function_call_param_iterator.next();
       
  6438             if (IN_param_value != NULL) {
       
  6439               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6440               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6441             }
       
  6442             
       
  6443             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  6444             {
       
  6445         
       
  6446                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6447                 return return_type_symbol;
       
  6448                 
       
  6449             }
       
  6450             
       
  6451             
       
  6452             ERROR;
       
  6453         }
       
  6454         
       
  6455     }/*function_word_to_int*/
       
  6456     break;
       
  6457 
       
  6458 /****
       
  6459  *STRING_TO_REAL
       
  6460  */
       
  6461     case function_string_to_real :
       
  6462     {
       
  6463         symbol_c *last_type_symbol = NULL;
       
  6464 
       
  6465         {
       
  6466             identifier_c param_name("IN");
       
  6467             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6468             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6469             symbol_c *IN_type_symbol = NULL;
       
  6470             
       
  6471             /* Get the value from a foo(<param_value>) style call */
       
  6472             if (IN_param_value == NULL)
       
  6473               IN_param_value = function_call_param_iterator.next();
       
  6474             if (IN_param_value != NULL) {
       
  6475               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6476               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6477             }
       
  6478             
       
  6479             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6480             {
       
  6481         
       
  6482                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6483                 return return_type_symbol;
       
  6484                 
       
  6485             }
       
  6486             
       
  6487             
       
  6488             ERROR;
       
  6489         }
       
  6490         
       
  6491     }/*function_string_to_real*/
       
  6492     break;
       
  6493 
       
  6494 /****
       
  6495  *STRING_TO_SINT
       
  6496  */
       
  6497     case function_string_to_sint :
       
  6498     {
       
  6499         symbol_c *last_type_symbol = NULL;
       
  6500 
       
  6501         {
       
  6502             identifier_c param_name("IN");
       
  6503             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6504             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6505             symbol_c *IN_type_symbol = NULL;
       
  6506             
       
  6507             /* Get the value from a foo(<param_value>) style call */
       
  6508             if (IN_param_value == NULL)
       
  6509               IN_param_value = function_call_param_iterator.next();
       
  6510             if (IN_param_value != NULL) {
       
  6511               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6512               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6513             }
       
  6514             
       
  6515             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6516             {
       
  6517         
       
  6518                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6519                 return return_type_symbol;
       
  6520                 
       
  6521             }
       
  6522             
       
  6523             
       
  6524             ERROR;
       
  6525         }
       
  6526         
       
  6527     }/*function_string_to_sint*/
       
  6528     break;
       
  6529 
       
  6530 /****
       
  6531  *STRING_TO_LINT
       
  6532  */
       
  6533     case function_string_to_lint :
       
  6534     {
       
  6535         symbol_c *last_type_symbol = NULL;
       
  6536 
       
  6537         {
       
  6538             identifier_c param_name("IN");
       
  6539             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6540             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6541             symbol_c *IN_type_symbol = NULL;
       
  6542             
       
  6543             /* Get the value from a foo(<param_value>) style call */
       
  6544             if (IN_param_value == NULL)
       
  6545               IN_param_value = function_call_param_iterator.next();
       
  6546             if (IN_param_value != NULL) {
       
  6547               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6548               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6549             }
       
  6550             
       
  6551             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6552             {
       
  6553         
       
  6554                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6555                 return return_type_symbol;
       
  6556                 
       
  6557             }
       
  6558             
       
  6559             
       
  6560             ERROR;
       
  6561         }
       
  6562         
       
  6563     }/*function_string_to_lint*/
       
  6564     break;
       
  6565 
       
  6566 /****
       
  6567  *STRING_TO_DINT
       
  6568  */
       
  6569     case function_string_to_dint :
       
  6570     {
       
  6571         symbol_c *last_type_symbol = NULL;
       
  6572 
       
  6573         {
       
  6574             identifier_c param_name("IN");
       
  6575             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6576             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6577             symbol_c *IN_type_symbol = NULL;
       
  6578             
       
  6579             /* Get the value from a foo(<param_value>) style call */
       
  6580             if (IN_param_value == NULL)
       
  6581               IN_param_value = function_call_param_iterator.next();
       
  6582             if (IN_param_value != NULL) {
       
  6583               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6584               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6585             }
       
  6586             
       
  6587             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6588             {
       
  6589         
       
  6590                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6591                 return return_type_symbol;
       
  6592                 
       
  6593             }
       
  6594             
       
  6595             
       
  6596             ERROR;
       
  6597         }
       
  6598         
       
  6599     }/*function_string_to_dint*/
       
  6600     break;
       
  6601 
       
  6602 /****
       
  6603  *STRING_TO_DATE
       
  6604  */
       
  6605     case function_string_to_date :
       
  6606     {
       
  6607         symbol_c *last_type_symbol = NULL;
       
  6608 
       
  6609         {
       
  6610             identifier_c param_name("IN");
       
  6611             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6612             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6613             symbol_c *IN_type_symbol = NULL;
       
  6614             
       
  6615             /* Get the value from a foo(<param_value>) style call */
       
  6616             if (IN_param_value == NULL)
       
  6617               IN_param_value = function_call_param_iterator.next();
       
  6618             if (IN_param_value != NULL) {
       
  6619               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6620               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6621             }
       
  6622             
       
  6623             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6624             {
       
  6625         
       
  6626                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6627                 return return_type_symbol;
       
  6628                 
       
  6629             }
       
  6630             
       
  6631             
       
  6632             ERROR;
       
  6633         }
       
  6634         
       
  6635     }/*function_string_to_date*/
       
  6636     break;
       
  6637 
       
  6638 /****
       
  6639  *STRING_TO_DWORD
       
  6640  */
       
  6641     case function_string_to_dword :
       
  6642     {
       
  6643         symbol_c *last_type_symbol = NULL;
       
  6644 
       
  6645         {
       
  6646             identifier_c param_name("IN");
       
  6647             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6648             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6649             symbol_c *IN_type_symbol = NULL;
       
  6650             
       
  6651             /* Get the value from a foo(<param_value>) style call */
       
  6652             if (IN_param_value == NULL)
       
  6653               IN_param_value = function_call_param_iterator.next();
       
  6654             if (IN_param_value != NULL) {
       
  6655               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6656               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6657             }
       
  6658             
       
  6659             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6660             {
       
  6661         
       
  6662                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6663                 return return_type_symbol;
       
  6664                 
       
  6665             }
       
  6666             
       
  6667             
       
  6668             ERROR;
       
  6669         }
       
  6670         
       
  6671     }/*function_string_to_dword*/
       
  6672     break;
       
  6673 
       
  6674 /****
       
  6675  *STRING_TO_DT
       
  6676  */
       
  6677     case function_string_to_dt :
       
  6678     {
       
  6679         symbol_c *last_type_symbol = NULL;
       
  6680 
       
  6681         {
       
  6682             identifier_c param_name("IN");
       
  6683             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6684             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6685             symbol_c *IN_type_symbol = NULL;
       
  6686             
       
  6687             /* Get the value from a foo(<param_value>) style call */
       
  6688             if (IN_param_value == NULL)
       
  6689               IN_param_value = function_call_param_iterator.next();
       
  6690             if (IN_param_value != NULL) {
       
  6691               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6692               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6693             }
       
  6694             
       
  6695             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6696             {
       
  6697         
       
  6698                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6699                 return return_type_symbol;
       
  6700                 
       
  6701             }
       
  6702             
       
  6703             
       
  6704             ERROR;
       
  6705         }
       
  6706         
       
  6707     }/*function_string_to_dt*/
       
  6708     break;
       
  6709 
       
  6710 /****
       
  6711  *STRING_TO_TOD
       
  6712  */
       
  6713     case function_string_to_tod :
       
  6714     {
       
  6715         symbol_c *last_type_symbol = NULL;
       
  6716 
       
  6717         {
       
  6718             identifier_c param_name("IN");
       
  6719             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6720             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6721             symbol_c *IN_type_symbol = NULL;
       
  6722             
       
  6723             /* Get the value from a foo(<param_value>) style call */
       
  6724             if (IN_param_value == NULL)
       
  6725               IN_param_value = function_call_param_iterator.next();
       
  6726             if (IN_param_value != NULL) {
       
  6727               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6728               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6729             }
       
  6730             
       
  6731             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6732             {
       
  6733         
       
  6734                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6735                 return return_type_symbol;
       
  6736                 
       
  6737             }
       
  6738             
       
  6739             
       
  6740             ERROR;
       
  6741         }
       
  6742         
       
  6743     }/*function_string_to_tod*/
       
  6744     break;
       
  6745 
       
  6746 /****
       
  6747  *STRING_TO_UDINT
       
  6748  */
       
  6749     case function_string_to_udint :
       
  6750     {
       
  6751         symbol_c *last_type_symbol = NULL;
       
  6752 
       
  6753         {
       
  6754             identifier_c param_name("IN");
       
  6755             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6756             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6757             symbol_c *IN_type_symbol = NULL;
       
  6758             
       
  6759             /* Get the value from a foo(<param_value>) style call */
       
  6760             if (IN_param_value == NULL)
       
  6761               IN_param_value = function_call_param_iterator.next();
       
  6762             if (IN_param_value != NULL) {
       
  6763               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6764               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6765             }
       
  6766             
       
  6767             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6768             {
       
  6769         
       
  6770                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6771                 return return_type_symbol;
       
  6772                 
       
  6773             }
       
  6774             
       
  6775             
       
  6776             ERROR;
       
  6777         }
       
  6778         
       
  6779     }/*function_string_to_udint*/
       
  6780     break;
       
  6781 
       
  6782 /****
       
  6783  *STRING_TO_WORD
       
  6784  */
       
  6785     case function_string_to_word :
       
  6786     {
       
  6787         symbol_c *last_type_symbol = NULL;
       
  6788 
       
  6789         {
       
  6790             identifier_c param_name("IN");
       
  6791             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6792             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6793             symbol_c *IN_type_symbol = NULL;
       
  6794             
       
  6795             /* Get the value from a foo(<param_value>) style call */
       
  6796             if (IN_param_value == NULL)
       
  6797               IN_param_value = function_call_param_iterator.next();
       
  6798             if (IN_param_value != NULL) {
       
  6799               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6800               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6801             }
       
  6802             
       
  6803             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6804             {
       
  6805         
       
  6806                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6807                 return return_type_symbol;
       
  6808                 
       
  6809             }
       
  6810             
       
  6811             
       
  6812             ERROR;
       
  6813         }
       
  6814         
       
  6815     }/*function_string_to_word*/
       
  6816     break;
       
  6817 
       
  6818 /****
       
  6819  *STRING_TO_LWORD
       
  6820  */
       
  6821     case function_string_to_lword :
       
  6822     {
       
  6823         symbol_c *last_type_symbol = NULL;
       
  6824 
       
  6825         {
       
  6826             identifier_c param_name("IN");
       
  6827             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6828             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6829             symbol_c *IN_type_symbol = NULL;
       
  6830             
       
  6831             /* Get the value from a foo(<param_value>) style call */
       
  6832             if (IN_param_value == NULL)
       
  6833               IN_param_value = function_call_param_iterator.next();
       
  6834             if (IN_param_value != NULL) {
       
  6835               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6836               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6837             }
       
  6838             
       
  6839             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6840             {
       
  6841         
       
  6842                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6843                 return return_type_symbol;
       
  6844                 
       
  6845             }
       
  6846             
       
  6847             
       
  6848             ERROR;
       
  6849         }
       
  6850         
       
  6851     }/*function_string_to_lword*/
       
  6852     break;
       
  6853 
       
  6854 /****
       
  6855  *STRING_TO_UINT
       
  6856  */
       
  6857     case function_string_to_uint :
       
  6858     {
       
  6859         symbol_c *last_type_symbol = NULL;
       
  6860 
       
  6861         {
       
  6862             identifier_c param_name("IN");
       
  6863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6864             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6865             symbol_c *IN_type_symbol = NULL;
       
  6866             
       
  6867             /* Get the value from a foo(<param_value>) style call */
       
  6868             if (IN_param_value == NULL)
       
  6869               IN_param_value = function_call_param_iterator.next();
       
  6870             if (IN_param_value != NULL) {
       
  6871               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6872               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6873             }
       
  6874             
       
  6875             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6876             {
       
  6877         
       
  6878                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6879                 return return_type_symbol;
       
  6880                 
       
  6881             }
       
  6882             
       
  6883             
       
  6884             ERROR;
       
  6885         }
       
  6886         
       
  6887     }/*function_string_to_uint*/
       
  6888     break;
       
  6889 
       
  6890 /****
       
  6891  *STRING_TO_LREAL
       
  6892  */
       
  6893     case function_string_to_lreal :
       
  6894     {
       
  6895         symbol_c *last_type_symbol = NULL;
       
  6896 
       
  6897         {
       
  6898             identifier_c param_name("IN");
       
  6899             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6900             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6901             symbol_c *IN_type_symbol = NULL;
       
  6902             
       
  6903             /* Get the value from a foo(<param_value>) style call */
       
  6904             if (IN_param_value == NULL)
       
  6905               IN_param_value = function_call_param_iterator.next();
       
  6906             if (IN_param_value != NULL) {
       
  6907               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6908               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6909             }
       
  6910             
       
  6911             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6912             {
       
  6913         
       
  6914                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6915                 return return_type_symbol;
       
  6916                 
       
  6917             }
       
  6918             
       
  6919             
       
  6920             ERROR;
       
  6921         }
       
  6922         
       
  6923     }/*function_string_to_lreal*/
       
  6924     break;
       
  6925 
       
  6926 /****
       
  6927  *STRING_TO_BYTE
       
  6928  */
       
  6929     case function_string_to_byte :
       
  6930     {
       
  6931         symbol_c *last_type_symbol = NULL;
       
  6932 
       
  6933         {
       
  6934             identifier_c param_name("IN");
       
  6935             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6936             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6937             symbol_c *IN_type_symbol = NULL;
       
  6938             
       
  6939             /* Get the value from a foo(<param_value>) style call */
       
  6940             if (IN_param_value == NULL)
       
  6941               IN_param_value = function_call_param_iterator.next();
       
  6942             if (IN_param_value != NULL) {
       
  6943               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6944               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6945             }
       
  6946             
       
  6947             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6948             {
       
  6949         
       
  6950                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6951                 return return_type_symbol;
       
  6952                 
       
  6953             }
       
  6954             
       
  6955             
       
  6956             ERROR;
       
  6957         }
       
  6958         
       
  6959     }/*function_string_to_byte*/
       
  6960     break;
       
  6961 
       
  6962 /****
       
  6963  *STRING_TO_USINT
       
  6964  */
       
  6965     case function_string_to_usint :
       
  6966     {
       
  6967         symbol_c *last_type_symbol = NULL;
       
  6968 
       
  6969         {
       
  6970             identifier_c param_name("IN");
       
  6971             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6972             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6973             symbol_c *IN_type_symbol = NULL;
       
  6974             
       
  6975             /* Get the value from a foo(<param_value>) style call */
       
  6976             if (IN_param_value == NULL)
       
  6977               IN_param_value = function_call_param_iterator.next();
       
  6978             if (IN_param_value != NULL) {
       
  6979               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6980               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6981             }
       
  6982             
       
  6983             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6984             {
       
  6985         
       
  6986                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6987                 return return_type_symbol;
       
  6988                 
       
  6989             }
       
  6990             
       
  6991             
       
  6992             ERROR;
       
  6993         }
       
  6994         
       
  6995     }/*function_string_to_usint*/
       
  6996     break;
       
  6997 
       
  6998 /****
       
  6999  *STRING_TO_ULINT
       
  7000  */
       
  7001     case function_string_to_ulint :
       
  7002     {
       
  7003         symbol_c *last_type_symbol = NULL;
       
  7004 
       
  7005         {
       
  7006             identifier_c param_name("IN");
       
  7007             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7008             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7009             symbol_c *IN_type_symbol = NULL;
       
  7010             
       
  7011             /* Get the value from a foo(<param_value>) style call */
       
  7012             if (IN_param_value == NULL)
       
  7013               IN_param_value = function_call_param_iterator.next();
       
  7014             if (IN_param_value != NULL) {
       
  7015               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7016               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7017             }
       
  7018             
       
  7019             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7020             {
       
  7021         
       
  7022                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7023                 return return_type_symbol;
       
  7024                 
       
  7025             }
       
  7026             
       
  7027             
       
  7028             ERROR;
       
  7029         }
       
  7030         
       
  7031     }/*function_string_to_ulint*/
       
  7032     break;
       
  7033 
       
  7034 /****
       
  7035  *STRING_TO_BOOL
       
  7036  */
       
  7037     case function_string_to_bool :
       
  7038     {
       
  7039         symbol_c *last_type_symbol = NULL;
       
  7040 
       
  7041         {
       
  7042             identifier_c param_name("IN");
       
  7043             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7044             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7045             symbol_c *IN_type_symbol = NULL;
       
  7046             
       
  7047             /* Get the value from a foo(<param_value>) style call */
       
  7048             if (IN_param_value == NULL)
       
  7049               IN_param_value = function_call_param_iterator.next();
       
  7050             if (IN_param_value != NULL) {
       
  7051               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7052               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7053             }
       
  7054             
       
  7055             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7056             {
       
  7057         
       
  7058                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7059                 return return_type_symbol;
       
  7060                 
       
  7061             }
       
  7062             
       
  7063             
       
  7064             ERROR;
       
  7065         }
       
  7066         
       
  7067     }/*function_string_to_bool*/
       
  7068     break;
       
  7069 
       
  7070 /****
       
  7071  *STRING_TO_TIME
       
  7072  */
       
  7073     case function_string_to_time :
       
  7074     {
       
  7075         symbol_c *last_type_symbol = NULL;
       
  7076 
       
  7077         {
       
  7078             identifier_c param_name("IN");
       
  7079             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7080             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7081             symbol_c *IN_type_symbol = NULL;
       
  7082             
       
  7083             /* Get the value from a foo(<param_value>) style call */
       
  7084             if (IN_param_value == NULL)
       
  7085               IN_param_value = function_call_param_iterator.next();
       
  7086             if (IN_param_value != NULL) {
       
  7087               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7088               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7089             }
       
  7090             
       
  7091             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7092             {
       
  7093         
       
  7094                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7095                 return return_type_symbol;
       
  7096                 
       
  7097             }
       
  7098             
       
  7099             
       
  7100             ERROR;
       
  7101         }
       
  7102         
       
  7103     }/*function_string_to_time*/
       
  7104     break;
       
  7105 
       
  7106 /****
       
  7107  *STRING_TO_INT
       
  7108  */
       
  7109     case function_string_to_int :
       
  7110     {
       
  7111         symbol_c *last_type_symbol = NULL;
       
  7112 
       
  7113         {
       
  7114             identifier_c param_name("IN");
       
  7115             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7116             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7117             symbol_c *IN_type_symbol = NULL;
       
  7118             
       
  7119             /* Get the value from a foo(<param_value>) style call */
       
  7120             if (IN_param_value == NULL)
       
  7121               IN_param_value = function_call_param_iterator.next();
       
  7122             if (IN_param_value != NULL) {
       
  7123               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7124               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7125             }
       
  7126             
       
  7127             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  7128             {
       
  7129         
       
  7130                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7131                 return return_type_symbol;
       
  7132                 
       
  7133             }
       
  7134             
       
  7135             
       
  7136             ERROR;
       
  7137         }
       
  7138         
       
  7139     }/*function_string_to_int*/
       
  7140     break;
       
  7141 
       
  7142 /****
       
  7143  *LWORD_TO_REAL
       
  7144  */
       
  7145     case function_lword_to_real :
       
  7146     {
       
  7147         symbol_c *last_type_symbol = NULL;
       
  7148 
       
  7149         {
       
  7150             identifier_c param_name("IN");
       
  7151             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7152             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7153             symbol_c *IN_type_symbol = NULL;
       
  7154             
       
  7155             /* Get the value from a foo(<param_value>) style call */
       
  7156             if (IN_param_value == NULL)
       
  7157               IN_param_value = function_call_param_iterator.next();
       
  7158             if (IN_param_value != NULL) {
       
  7159               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7160               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7161             }
       
  7162             
       
  7163             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7164             {
       
  7165         
       
  7166                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7167                 return return_type_symbol;
       
  7168                 
       
  7169             }
       
  7170             
       
  7171             
       
  7172             ERROR;
       
  7173         }
       
  7174         
       
  7175     }/*function_lword_to_real*/
       
  7176     break;
       
  7177 
       
  7178 /****
       
  7179  *LWORD_TO_SINT
       
  7180  */
       
  7181     case function_lword_to_sint :
       
  7182     {
       
  7183         symbol_c *last_type_symbol = NULL;
       
  7184 
       
  7185         {
       
  7186             identifier_c param_name("IN");
       
  7187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7188             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7189             symbol_c *IN_type_symbol = NULL;
       
  7190             
       
  7191             /* Get the value from a foo(<param_value>) style call */
       
  7192             if (IN_param_value == NULL)
       
  7193               IN_param_value = function_call_param_iterator.next();
       
  7194             if (IN_param_value != NULL) {
       
  7195               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7196               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7197             }
       
  7198             
       
  7199             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7200             {
       
  7201         
       
  7202                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7203                 return return_type_symbol;
       
  7204                 
       
  7205             }
       
  7206             
       
  7207             
       
  7208             ERROR;
       
  7209         }
       
  7210         
       
  7211     }/*function_lword_to_sint*/
       
  7212     break;
       
  7213 
       
  7214 /****
       
  7215  *LWORD_TO_LINT
       
  7216  */
       
  7217     case function_lword_to_lint :
       
  7218     {
       
  7219         symbol_c *last_type_symbol = NULL;
       
  7220 
       
  7221         {
       
  7222             identifier_c param_name("IN");
       
  7223             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7224             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7225             symbol_c *IN_type_symbol = NULL;
       
  7226             
       
  7227             /* Get the value from a foo(<param_value>) style call */
       
  7228             if (IN_param_value == NULL)
       
  7229               IN_param_value = function_call_param_iterator.next();
       
  7230             if (IN_param_value != NULL) {
       
  7231               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7232               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7233             }
       
  7234             
       
  7235             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7236             {
       
  7237         
       
  7238                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7239                 return return_type_symbol;
       
  7240                 
       
  7241             }
       
  7242             
       
  7243             
       
  7244             ERROR;
       
  7245         }
       
  7246         
       
  7247     }/*function_lword_to_lint*/
       
  7248     break;
       
  7249 
       
  7250 /****
       
  7251  *LWORD_TO_DINT
       
  7252  */
       
  7253     case function_lword_to_dint :
       
  7254     {
       
  7255         symbol_c *last_type_symbol = NULL;
       
  7256 
       
  7257         {
       
  7258             identifier_c param_name("IN");
       
  7259             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7260             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7261             symbol_c *IN_type_symbol = NULL;
       
  7262             
       
  7263             /* Get the value from a foo(<param_value>) style call */
       
  7264             if (IN_param_value == NULL)
       
  7265               IN_param_value = function_call_param_iterator.next();
       
  7266             if (IN_param_value != NULL) {
       
  7267               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7268               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7269             }
       
  7270             
       
  7271             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7272             {
       
  7273         
       
  7274                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7275                 return return_type_symbol;
       
  7276                 
       
  7277             }
       
  7278             
       
  7279             
       
  7280             ERROR;
       
  7281         }
       
  7282         
       
  7283     }/*function_lword_to_dint*/
       
  7284     break;
       
  7285 
       
  7286 /****
       
  7287  *LWORD_TO_DATE
       
  7288  */
       
  7289     case function_lword_to_date :
       
  7290     {
       
  7291         symbol_c *last_type_symbol = NULL;
       
  7292 
       
  7293         {
       
  7294             identifier_c param_name("IN");
       
  7295             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7296             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7297             symbol_c *IN_type_symbol = NULL;
       
  7298             
       
  7299             /* Get the value from a foo(<param_value>) style call */
       
  7300             if (IN_param_value == NULL)
       
  7301               IN_param_value = function_call_param_iterator.next();
       
  7302             if (IN_param_value != NULL) {
       
  7303               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7304               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7305             }
       
  7306             
       
  7307             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7308             {
       
  7309         
       
  7310                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7311                 return return_type_symbol;
       
  7312                 
       
  7313             }
       
  7314             
       
  7315             
       
  7316             ERROR;
       
  7317         }
       
  7318         
       
  7319     }/*function_lword_to_date*/
       
  7320     break;
       
  7321 
       
  7322 /****
       
  7323  *LWORD_TO_DWORD
       
  7324  */
       
  7325     case function_lword_to_dword :
       
  7326     {
       
  7327         symbol_c *last_type_symbol = NULL;
       
  7328 
       
  7329         {
       
  7330             identifier_c param_name("IN");
       
  7331             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7332             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7333             symbol_c *IN_type_symbol = NULL;
       
  7334             
       
  7335             /* Get the value from a foo(<param_value>) style call */
       
  7336             if (IN_param_value == NULL)
       
  7337               IN_param_value = function_call_param_iterator.next();
       
  7338             if (IN_param_value != NULL) {
       
  7339               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7340               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7341             }
       
  7342             
       
  7343             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7344             {
       
  7345         
       
  7346                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7347                 return return_type_symbol;
       
  7348                 
       
  7349             }
       
  7350             
       
  7351             
       
  7352             ERROR;
       
  7353         }
       
  7354         
       
  7355     }/*function_lword_to_dword*/
       
  7356     break;
       
  7357 
       
  7358 /****
       
  7359  *LWORD_TO_DT
       
  7360  */
       
  7361     case function_lword_to_dt :
       
  7362     {
       
  7363         symbol_c *last_type_symbol = NULL;
       
  7364 
       
  7365         {
       
  7366             identifier_c param_name("IN");
       
  7367             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7368             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7369             symbol_c *IN_type_symbol = NULL;
       
  7370             
       
  7371             /* Get the value from a foo(<param_value>) style call */
       
  7372             if (IN_param_value == NULL)
       
  7373               IN_param_value = function_call_param_iterator.next();
       
  7374             if (IN_param_value != NULL) {
       
  7375               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7376               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7377             }
       
  7378             
       
  7379             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7380             {
       
  7381         
       
  7382                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7383                 return return_type_symbol;
       
  7384                 
       
  7385             }
       
  7386             
       
  7387             
       
  7388             ERROR;
       
  7389         }
       
  7390         
       
  7391     }/*function_lword_to_dt*/
       
  7392     break;
       
  7393 
       
  7394 /****
       
  7395  *LWORD_TO_TOD
       
  7396  */
       
  7397     case function_lword_to_tod :
       
  7398     {
       
  7399         symbol_c *last_type_symbol = NULL;
       
  7400 
       
  7401         {
       
  7402             identifier_c param_name("IN");
       
  7403             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7404             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7405             symbol_c *IN_type_symbol = NULL;
       
  7406             
       
  7407             /* Get the value from a foo(<param_value>) style call */
       
  7408             if (IN_param_value == NULL)
       
  7409               IN_param_value = function_call_param_iterator.next();
       
  7410             if (IN_param_value != NULL) {
       
  7411               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7412               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7413             }
       
  7414             
       
  7415             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7416             {
       
  7417         
       
  7418                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7419                 return return_type_symbol;
       
  7420                 
       
  7421             }
       
  7422             
       
  7423             
       
  7424             ERROR;
       
  7425         }
       
  7426         
       
  7427     }/*function_lword_to_tod*/
       
  7428     break;
       
  7429 
       
  7430 /****
       
  7431  *LWORD_TO_UDINT
       
  7432  */
       
  7433     case function_lword_to_udint :
       
  7434     {
       
  7435         symbol_c *last_type_symbol = NULL;
       
  7436 
       
  7437         {
       
  7438             identifier_c param_name("IN");
       
  7439             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7440             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7441             symbol_c *IN_type_symbol = NULL;
       
  7442             
       
  7443             /* Get the value from a foo(<param_value>) style call */
       
  7444             if (IN_param_value == NULL)
       
  7445               IN_param_value = function_call_param_iterator.next();
       
  7446             if (IN_param_value != NULL) {
       
  7447               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7448               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7449             }
       
  7450             
       
  7451             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7452             {
       
  7453         
       
  7454                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7455                 return return_type_symbol;
       
  7456                 
       
  7457             }
       
  7458             
       
  7459             
       
  7460             ERROR;
       
  7461         }
       
  7462         
       
  7463     }/*function_lword_to_udint*/
       
  7464     break;
       
  7465 
       
  7466 /****
       
  7467  *LWORD_TO_WORD
       
  7468  */
       
  7469     case function_lword_to_word :
       
  7470     {
       
  7471         symbol_c *last_type_symbol = NULL;
       
  7472 
       
  7473         {
       
  7474             identifier_c param_name("IN");
       
  7475             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7476             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7477             symbol_c *IN_type_symbol = NULL;
       
  7478             
       
  7479             /* Get the value from a foo(<param_value>) style call */
       
  7480             if (IN_param_value == NULL)
       
  7481               IN_param_value = function_call_param_iterator.next();
       
  7482             if (IN_param_value != NULL) {
       
  7483               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7484               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7485             }
       
  7486             
       
  7487             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7488             {
       
  7489         
       
  7490                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7491                 return return_type_symbol;
       
  7492                 
       
  7493             }
       
  7494             
       
  7495             
       
  7496             ERROR;
       
  7497         }
       
  7498         
       
  7499     }/*function_lword_to_word*/
       
  7500     break;
       
  7501 
       
  7502 /****
       
  7503  *LWORD_TO_STRING
       
  7504  */
       
  7505     case function_lword_to_string :
       
  7506     {
       
  7507         symbol_c *last_type_symbol = NULL;
       
  7508 
       
  7509         {
       
  7510             identifier_c param_name("IN");
       
  7511             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7512             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7513             symbol_c *IN_type_symbol = NULL;
       
  7514             
       
  7515             /* Get the value from a foo(<param_value>) style call */
       
  7516             if (IN_param_value == NULL)
       
  7517               IN_param_value = function_call_param_iterator.next();
       
  7518             if (IN_param_value != NULL) {
       
  7519               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7520               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7521             }
       
  7522             
       
  7523             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7524             {
       
  7525         
       
  7526                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7527                 return return_type_symbol;
       
  7528                 
       
  7529             }
       
  7530             
       
  7531             
       
  7532             ERROR;
       
  7533         }
       
  7534         
       
  7535     }/*function_lword_to_string*/
       
  7536     break;
       
  7537 
       
  7538 /****
       
  7539  *LWORD_TO_UINT
       
  7540  */
       
  7541     case function_lword_to_uint :
       
  7542     {
       
  7543         symbol_c *last_type_symbol = NULL;
       
  7544 
       
  7545         {
       
  7546             identifier_c param_name("IN");
       
  7547             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7548             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7549             symbol_c *IN_type_symbol = NULL;
       
  7550             
       
  7551             /* Get the value from a foo(<param_value>) style call */
       
  7552             if (IN_param_value == NULL)
       
  7553               IN_param_value = function_call_param_iterator.next();
       
  7554             if (IN_param_value != NULL) {
       
  7555               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7556               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7557             }
       
  7558             
       
  7559             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7560             {
       
  7561         
       
  7562                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7563                 return return_type_symbol;
       
  7564                 
       
  7565             }
       
  7566             
       
  7567             
       
  7568             ERROR;
       
  7569         }
       
  7570         
       
  7571     }/*function_lword_to_uint*/
       
  7572     break;
       
  7573 
       
  7574 /****
       
  7575  *LWORD_TO_LREAL
       
  7576  */
       
  7577     case function_lword_to_lreal :
       
  7578     {
       
  7579         symbol_c *last_type_symbol = NULL;
       
  7580 
       
  7581         {
       
  7582             identifier_c param_name("IN");
       
  7583             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7584             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7585             symbol_c *IN_type_symbol = NULL;
       
  7586             
       
  7587             /* Get the value from a foo(<param_value>) style call */
       
  7588             if (IN_param_value == NULL)
       
  7589               IN_param_value = function_call_param_iterator.next();
       
  7590             if (IN_param_value != NULL) {
       
  7591               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7592               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7593             }
       
  7594             
       
  7595             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7596             {
       
  7597         
       
  7598                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7599                 return return_type_symbol;
       
  7600                 
       
  7601             }
       
  7602             
       
  7603             
       
  7604             ERROR;
       
  7605         }
       
  7606         
       
  7607     }/*function_lword_to_lreal*/
       
  7608     break;
       
  7609 
       
  7610 /****
       
  7611  *LWORD_TO_BYTE
       
  7612  */
       
  7613     case function_lword_to_byte :
       
  7614     {
       
  7615         symbol_c *last_type_symbol = NULL;
       
  7616 
       
  7617         {
       
  7618             identifier_c param_name("IN");
       
  7619             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7620             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7621             symbol_c *IN_type_symbol = NULL;
       
  7622             
       
  7623             /* Get the value from a foo(<param_value>) style call */
       
  7624             if (IN_param_value == NULL)
       
  7625               IN_param_value = function_call_param_iterator.next();
       
  7626             if (IN_param_value != NULL) {
       
  7627               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7628               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7629             }
       
  7630             
       
  7631             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7632             {
       
  7633         
       
  7634                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7635                 return return_type_symbol;
       
  7636                 
       
  7637             }
       
  7638             
       
  7639             
       
  7640             ERROR;
       
  7641         }
       
  7642         
       
  7643     }/*function_lword_to_byte*/
       
  7644     break;
       
  7645 
       
  7646 /****
       
  7647  *LWORD_TO_USINT
       
  7648  */
       
  7649     case function_lword_to_usint :
       
  7650     {
       
  7651         symbol_c *last_type_symbol = NULL;
       
  7652 
       
  7653         {
       
  7654             identifier_c param_name("IN");
       
  7655             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7656             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7657             symbol_c *IN_type_symbol = NULL;
       
  7658             
       
  7659             /* Get the value from a foo(<param_value>) style call */
       
  7660             if (IN_param_value == NULL)
       
  7661               IN_param_value = function_call_param_iterator.next();
       
  7662             if (IN_param_value != NULL) {
       
  7663               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7664               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7665             }
       
  7666             
       
  7667             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7668             {
       
  7669         
       
  7670                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7671                 return return_type_symbol;
       
  7672                 
       
  7673             }
       
  7674             
       
  7675             
       
  7676             ERROR;
       
  7677         }
       
  7678         
       
  7679     }/*function_lword_to_usint*/
       
  7680     break;
       
  7681 
       
  7682 /****
       
  7683  *LWORD_TO_ULINT
       
  7684  */
       
  7685     case function_lword_to_ulint :
       
  7686     {
       
  7687         symbol_c *last_type_symbol = NULL;
       
  7688 
       
  7689         {
       
  7690             identifier_c param_name("IN");
       
  7691             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7692             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7693             symbol_c *IN_type_symbol = NULL;
       
  7694             
       
  7695             /* Get the value from a foo(<param_value>) style call */
       
  7696             if (IN_param_value == NULL)
       
  7697               IN_param_value = function_call_param_iterator.next();
       
  7698             if (IN_param_value != NULL) {
       
  7699               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7700               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7701             }
       
  7702             
       
  7703             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7704             {
       
  7705         
       
  7706                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7707                 return return_type_symbol;
       
  7708                 
       
  7709             }
       
  7710             
       
  7711             
       
  7712             ERROR;
       
  7713         }
       
  7714         
       
  7715     }/*function_lword_to_ulint*/
       
  7716     break;
       
  7717 
       
  7718 /****
       
  7719  *LWORD_TO_BOOL
       
  7720  */
       
  7721     case function_lword_to_bool :
       
  7722     {
       
  7723         symbol_c *last_type_symbol = NULL;
       
  7724 
       
  7725         {
       
  7726             identifier_c param_name("IN");
       
  7727             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7728             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7729             symbol_c *IN_type_symbol = NULL;
       
  7730             
       
  7731             /* Get the value from a foo(<param_value>) style call */
       
  7732             if (IN_param_value == NULL)
       
  7733               IN_param_value = function_call_param_iterator.next();
       
  7734             if (IN_param_value != NULL) {
       
  7735               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7736               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7737             }
       
  7738             
       
  7739             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7740             {
       
  7741         
       
  7742                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7743                 return return_type_symbol;
       
  7744                 
       
  7745             }
       
  7746             
       
  7747             
       
  7748             ERROR;
       
  7749         }
       
  7750         
       
  7751     }/*function_lword_to_bool*/
       
  7752     break;
       
  7753 
       
  7754 /****
       
  7755  *LWORD_TO_TIME
       
  7756  */
       
  7757     case function_lword_to_time :
       
  7758     {
       
  7759         symbol_c *last_type_symbol = NULL;
       
  7760 
       
  7761         {
       
  7762             identifier_c param_name("IN");
       
  7763             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7764             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7765             symbol_c *IN_type_symbol = NULL;
       
  7766             
       
  7767             /* Get the value from a foo(<param_value>) style call */
       
  7768             if (IN_param_value == NULL)
       
  7769               IN_param_value = function_call_param_iterator.next();
       
  7770             if (IN_param_value != NULL) {
       
  7771               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7772               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7773             }
       
  7774             
       
  7775             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7776             {
       
  7777         
       
  7778                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7779                 return return_type_symbol;
       
  7780                 
       
  7781             }
       
  7782             
       
  7783             
       
  7784             ERROR;
       
  7785         }
       
  7786         
       
  7787     }/*function_lword_to_time*/
       
  7788     break;
       
  7789 
       
  7790 /****
       
  7791  *LWORD_TO_INT
       
  7792  */
       
  7793     case function_lword_to_int :
       
  7794     {
       
  7795         symbol_c *last_type_symbol = NULL;
       
  7796 
       
  7797         {
       
  7798             identifier_c param_name("IN");
       
  7799             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7800             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7801             symbol_c *IN_type_symbol = NULL;
       
  7802             
       
  7803             /* Get the value from a foo(<param_value>) style call */
       
  7804             if (IN_param_value == NULL)
       
  7805               IN_param_value = function_call_param_iterator.next();
       
  7806             if (IN_param_value != NULL) {
       
  7807               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7808               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7809             }
       
  7810             
       
  7811             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7812             {
       
  7813         
       
  7814                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7815                 return return_type_symbol;
       
  7816                 
       
  7817             }
       
  7818             
       
  7819             
       
  7820             ERROR;
       
  7821         }
       
  7822         
       
  7823     }/*function_lword_to_int*/
       
  7824     break;
       
  7825 
       
  7826 /****
       
  7827  *UINT_TO_REAL
       
  7828  */
       
  7829     case function_uint_to_real :
       
  7830     {
       
  7831         symbol_c *last_type_symbol = NULL;
       
  7832 
       
  7833         {
       
  7834             identifier_c param_name("IN");
       
  7835             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7836             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7837             symbol_c *IN_type_symbol = NULL;
       
  7838             
       
  7839             /* Get the value from a foo(<param_value>) style call */
       
  7840             if (IN_param_value == NULL)
       
  7841               IN_param_value = function_call_param_iterator.next();
       
  7842             if (IN_param_value != NULL) {
       
  7843               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7844               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7845             }
       
  7846             
       
  7847             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7848             {
       
  7849         
       
  7850                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7851                 return return_type_symbol;
       
  7852                 
       
  7853             }
       
  7854             
       
  7855             
       
  7856             ERROR;
       
  7857         }
       
  7858         
       
  7859     }/*function_uint_to_real*/
       
  7860     break;
       
  7861 
       
  7862 /****
       
  7863  *UINT_TO_SINT
       
  7864  */
       
  7865     case function_uint_to_sint :
       
  7866     {
       
  7867         symbol_c *last_type_symbol = NULL;
       
  7868 
       
  7869         {
       
  7870             identifier_c param_name("IN");
       
  7871             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7872             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7873             symbol_c *IN_type_symbol = NULL;
       
  7874             
       
  7875             /* Get the value from a foo(<param_value>) style call */
       
  7876             if (IN_param_value == NULL)
       
  7877               IN_param_value = function_call_param_iterator.next();
       
  7878             if (IN_param_value != NULL) {
       
  7879               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7880               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7881             }
       
  7882             
       
  7883             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7884             {
       
  7885         
       
  7886                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7887                 return return_type_symbol;
       
  7888                 
       
  7889             }
       
  7890             
       
  7891             
       
  7892             ERROR;
       
  7893         }
       
  7894         
       
  7895     }/*function_uint_to_sint*/
       
  7896     break;
       
  7897 
       
  7898 /****
       
  7899  *UINT_TO_LINT
       
  7900  */
       
  7901     case function_uint_to_lint :
       
  7902     {
       
  7903         symbol_c *last_type_symbol = NULL;
       
  7904 
       
  7905         {
       
  7906             identifier_c param_name("IN");
       
  7907             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7908             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7909             symbol_c *IN_type_symbol = NULL;
       
  7910             
       
  7911             /* Get the value from a foo(<param_value>) style call */
       
  7912             if (IN_param_value == NULL)
       
  7913               IN_param_value = function_call_param_iterator.next();
       
  7914             if (IN_param_value != NULL) {
       
  7915               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7916               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7917             }
       
  7918             
       
  7919             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7920             {
       
  7921         
       
  7922                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7923                 return return_type_symbol;
       
  7924                 
       
  7925             }
       
  7926             
       
  7927             
       
  7928             ERROR;
       
  7929         }
       
  7930         
       
  7931     }/*function_uint_to_lint*/
       
  7932     break;
       
  7933 
       
  7934 /****
       
  7935  *UINT_TO_DINT
       
  7936  */
       
  7937     case function_uint_to_dint :
       
  7938     {
       
  7939         symbol_c *last_type_symbol = NULL;
       
  7940 
       
  7941         {
       
  7942             identifier_c param_name("IN");
       
  7943             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7944             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7945             symbol_c *IN_type_symbol = NULL;
       
  7946             
       
  7947             /* Get the value from a foo(<param_value>) style call */
       
  7948             if (IN_param_value == NULL)
       
  7949               IN_param_value = function_call_param_iterator.next();
       
  7950             if (IN_param_value != NULL) {
       
  7951               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7952               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7953             }
       
  7954             
       
  7955             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7956             {
       
  7957         
       
  7958                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7959                 return return_type_symbol;
       
  7960                 
       
  7961             }
       
  7962             
       
  7963             
       
  7964             ERROR;
       
  7965         }
       
  7966         
       
  7967     }/*function_uint_to_dint*/
       
  7968     break;
       
  7969 
       
  7970 /****
       
  7971  *UINT_TO_DATE
       
  7972  */
       
  7973     case function_uint_to_date :
       
  7974     {
       
  7975         symbol_c *last_type_symbol = NULL;
       
  7976 
       
  7977         {
       
  7978             identifier_c param_name("IN");
       
  7979             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7980             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7981             symbol_c *IN_type_symbol = NULL;
       
  7982             
       
  7983             /* Get the value from a foo(<param_value>) style call */
       
  7984             if (IN_param_value == NULL)
       
  7985               IN_param_value = function_call_param_iterator.next();
       
  7986             if (IN_param_value != NULL) {
       
  7987               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7988               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7989             }
       
  7990             
       
  7991             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7992             {
       
  7993         
       
  7994                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7995                 return return_type_symbol;
       
  7996                 
       
  7997             }
       
  7998             
       
  7999             
       
  8000             ERROR;
       
  8001         }
       
  8002         
       
  8003     }/*function_uint_to_date*/
       
  8004     break;
       
  8005 
       
  8006 /****
       
  8007  *UINT_TO_DWORD
       
  8008  */
       
  8009     case function_uint_to_dword :
       
  8010     {
       
  8011         symbol_c *last_type_symbol = NULL;
       
  8012 
       
  8013         {
       
  8014             identifier_c param_name("IN");
       
  8015             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8016             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8017             symbol_c *IN_type_symbol = NULL;
       
  8018             
       
  8019             /* Get the value from a foo(<param_value>) style call */
       
  8020             if (IN_param_value == NULL)
       
  8021               IN_param_value = function_call_param_iterator.next();
       
  8022             if (IN_param_value != NULL) {
       
  8023               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8024               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8025             }
       
  8026             
       
  8027             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8028             {
       
  8029         
       
  8030                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8031                 return return_type_symbol;
       
  8032                 
       
  8033             }
       
  8034             
       
  8035             
       
  8036             ERROR;
       
  8037         }
       
  8038         
       
  8039     }/*function_uint_to_dword*/
       
  8040     break;
       
  8041 
       
  8042 /****
       
  8043  *UINT_TO_DT
       
  8044  */
       
  8045     case function_uint_to_dt :
       
  8046     {
       
  8047         symbol_c *last_type_symbol = NULL;
       
  8048 
       
  8049         {
       
  8050             identifier_c param_name("IN");
       
  8051             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8052             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8053             symbol_c *IN_type_symbol = NULL;
       
  8054             
       
  8055             /* Get the value from a foo(<param_value>) style call */
       
  8056             if (IN_param_value == NULL)
       
  8057               IN_param_value = function_call_param_iterator.next();
       
  8058             if (IN_param_value != NULL) {
       
  8059               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8060               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8061             }
       
  8062             
       
  8063             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8064             {
       
  8065         
       
  8066                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8067                 return return_type_symbol;
       
  8068                 
       
  8069             }
       
  8070             
       
  8071             
       
  8072             ERROR;
       
  8073         }
       
  8074         
       
  8075     }/*function_uint_to_dt*/
       
  8076     break;
       
  8077 
       
  8078 /****
       
  8079  *UINT_TO_TOD
       
  8080  */
       
  8081     case function_uint_to_tod :
       
  8082     {
       
  8083         symbol_c *last_type_symbol = NULL;
       
  8084 
       
  8085         {
       
  8086             identifier_c param_name("IN");
       
  8087             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8088             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8089             symbol_c *IN_type_symbol = NULL;
       
  8090             
       
  8091             /* Get the value from a foo(<param_value>) style call */
       
  8092             if (IN_param_value == NULL)
       
  8093               IN_param_value = function_call_param_iterator.next();
       
  8094             if (IN_param_value != NULL) {
       
  8095               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8096               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8097             }
       
  8098             
       
  8099             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8100             {
       
  8101         
       
  8102                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8103                 return return_type_symbol;
       
  8104                 
       
  8105             }
       
  8106             
       
  8107             
       
  8108             ERROR;
       
  8109         }
       
  8110         
       
  8111     }/*function_uint_to_tod*/
       
  8112     break;
       
  8113 
       
  8114 /****
       
  8115  *UINT_TO_UDINT
       
  8116  */
       
  8117     case function_uint_to_udint :
       
  8118     {
       
  8119         symbol_c *last_type_symbol = NULL;
       
  8120 
       
  8121         {
       
  8122             identifier_c param_name("IN");
       
  8123             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8124             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8125             symbol_c *IN_type_symbol = NULL;
       
  8126             
       
  8127             /* Get the value from a foo(<param_value>) style call */
       
  8128             if (IN_param_value == NULL)
       
  8129               IN_param_value = function_call_param_iterator.next();
       
  8130             if (IN_param_value != NULL) {
       
  8131               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8132               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8133             }
       
  8134             
       
  8135             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8136             {
       
  8137         
       
  8138                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8139                 return return_type_symbol;
       
  8140                 
       
  8141             }
       
  8142             
       
  8143             
       
  8144             ERROR;
       
  8145         }
       
  8146         
       
  8147     }/*function_uint_to_udint*/
       
  8148     break;
       
  8149 
       
  8150 /****
       
  8151  *UINT_TO_WORD
       
  8152  */
       
  8153     case function_uint_to_word :
       
  8154     {
       
  8155         symbol_c *last_type_symbol = NULL;
       
  8156 
       
  8157         {
       
  8158             identifier_c param_name("IN");
       
  8159             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8160             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8161             symbol_c *IN_type_symbol = NULL;
       
  8162             
       
  8163             /* Get the value from a foo(<param_value>) style call */
       
  8164             if (IN_param_value == NULL)
       
  8165               IN_param_value = function_call_param_iterator.next();
       
  8166             if (IN_param_value != NULL) {
       
  8167               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8168               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8169             }
       
  8170             
       
  8171             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8172             {
       
  8173         
       
  8174                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8175                 return return_type_symbol;
       
  8176                 
       
  8177             }
       
  8178             
       
  8179             
       
  8180             ERROR;
       
  8181         }
       
  8182         
       
  8183     }/*function_uint_to_word*/
       
  8184     break;
       
  8185 
       
  8186 /****
       
  8187  *UINT_TO_STRING
       
  8188  */
       
  8189     case function_uint_to_string :
       
  8190     {
       
  8191         symbol_c *last_type_symbol = NULL;
       
  8192 
       
  8193         {
       
  8194             identifier_c param_name("IN");
       
  8195             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8196             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8197             symbol_c *IN_type_symbol = NULL;
       
  8198             
       
  8199             /* Get the value from a foo(<param_value>) style call */
       
  8200             if (IN_param_value == NULL)
       
  8201               IN_param_value = function_call_param_iterator.next();
       
  8202             if (IN_param_value != NULL) {
       
  8203               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8204               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8205             }
       
  8206             
       
  8207             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8208             {
       
  8209         
       
  8210                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8211                 return return_type_symbol;
       
  8212                 
       
  8213             }
       
  8214             
       
  8215             
       
  8216             ERROR;
       
  8217         }
       
  8218         
       
  8219     }/*function_uint_to_string*/
       
  8220     break;
       
  8221 
       
  8222 /****
       
  8223  *UINT_TO_LWORD
       
  8224  */
       
  8225     case function_uint_to_lword :
       
  8226     {
       
  8227         symbol_c *last_type_symbol = NULL;
       
  8228 
       
  8229         {
       
  8230             identifier_c param_name("IN");
       
  8231             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8232             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8233             symbol_c *IN_type_symbol = NULL;
       
  8234             
       
  8235             /* Get the value from a foo(<param_value>) style call */
       
  8236             if (IN_param_value == NULL)
       
  8237               IN_param_value = function_call_param_iterator.next();
       
  8238             if (IN_param_value != NULL) {
       
  8239               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8240               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8241             }
       
  8242             
       
  8243             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8244             {
       
  8245         
       
  8246                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8247                 return return_type_symbol;
       
  8248                 
       
  8249             }
       
  8250             
       
  8251             
       
  8252             ERROR;
       
  8253         }
       
  8254         
       
  8255     }/*function_uint_to_lword*/
       
  8256     break;
       
  8257 
       
  8258 /****
       
  8259  *UINT_TO_LREAL
       
  8260  */
       
  8261     case function_uint_to_lreal :
       
  8262     {
       
  8263         symbol_c *last_type_symbol = NULL;
       
  8264 
       
  8265         {
       
  8266             identifier_c param_name("IN");
       
  8267             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8268             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8269             symbol_c *IN_type_symbol = NULL;
       
  8270             
       
  8271             /* Get the value from a foo(<param_value>) style call */
       
  8272             if (IN_param_value == NULL)
       
  8273               IN_param_value = function_call_param_iterator.next();
       
  8274             if (IN_param_value != NULL) {
       
  8275               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8276               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8277             }
       
  8278             
       
  8279             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8280             {
       
  8281         
       
  8282                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8283                 return return_type_symbol;
       
  8284                 
       
  8285             }
       
  8286             
       
  8287             
       
  8288             ERROR;
       
  8289         }
       
  8290         
       
  8291     }/*function_uint_to_lreal*/
       
  8292     break;
       
  8293 
       
  8294 /****
       
  8295  *UINT_TO_BYTE
       
  8296  */
       
  8297     case function_uint_to_byte :
       
  8298     {
       
  8299         symbol_c *last_type_symbol = NULL;
       
  8300 
       
  8301         {
       
  8302             identifier_c param_name("IN");
       
  8303             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8304             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8305             symbol_c *IN_type_symbol = NULL;
       
  8306             
       
  8307             /* Get the value from a foo(<param_value>) style call */
       
  8308             if (IN_param_value == NULL)
       
  8309               IN_param_value = function_call_param_iterator.next();
       
  8310             if (IN_param_value != NULL) {
       
  8311               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8312               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8313             }
       
  8314             
       
  8315             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8316             {
       
  8317         
       
  8318                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8319                 return return_type_symbol;
       
  8320                 
       
  8321             }
       
  8322             
       
  8323             
       
  8324             ERROR;
       
  8325         }
       
  8326         
       
  8327     }/*function_uint_to_byte*/
       
  8328     break;
       
  8329 
       
  8330 /****
       
  8331  *UINT_TO_USINT
       
  8332  */
       
  8333     case function_uint_to_usint :
       
  8334     {
       
  8335         symbol_c *last_type_symbol = NULL;
       
  8336 
       
  8337         {
       
  8338             identifier_c param_name("IN");
       
  8339             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8340             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8341             symbol_c *IN_type_symbol = NULL;
       
  8342             
       
  8343             /* Get the value from a foo(<param_value>) style call */
       
  8344             if (IN_param_value == NULL)
       
  8345               IN_param_value = function_call_param_iterator.next();
       
  8346             if (IN_param_value != NULL) {
       
  8347               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8348               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8349             }
       
  8350             
       
  8351             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8352             {
       
  8353         
       
  8354                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8355                 return return_type_symbol;
       
  8356                 
       
  8357             }
       
  8358             
       
  8359             
       
  8360             ERROR;
       
  8361         }
       
  8362         
       
  8363     }/*function_uint_to_usint*/
       
  8364     break;
       
  8365 
       
  8366 /****
       
  8367  *UINT_TO_ULINT
       
  8368  */
       
  8369     case function_uint_to_ulint :
       
  8370     {
       
  8371         symbol_c *last_type_symbol = NULL;
       
  8372 
       
  8373         {
       
  8374             identifier_c param_name("IN");
       
  8375             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8376             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8377             symbol_c *IN_type_symbol = NULL;
       
  8378             
       
  8379             /* Get the value from a foo(<param_value>) style call */
       
  8380             if (IN_param_value == NULL)
       
  8381               IN_param_value = function_call_param_iterator.next();
       
  8382             if (IN_param_value != NULL) {
       
  8383               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8384               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8385             }
       
  8386             
       
  8387             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8388             {
       
  8389         
       
  8390                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8391                 return return_type_symbol;
       
  8392                 
       
  8393             }
       
  8394             
       
  8395             
       
  8396             ERROR;
       
  8397         }
       
  8398         
       
  8399     }/*function_uint_to_ulint*/
       
  8400     break;
       
  8401 
       
  8402 /****
       
  8403  *UINT_TO_BOOL
       
  8404  */
       
  8405     case function_uint_to_bool :
       
  8406     {
       
  8407         symbol_c *last_type_symbol = NULL;
       
  8408 
       
  8409         {
       
  8410             identifier_c param_name("IN");
       
  8411             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8412             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8413             symbol_c *IN_type_symbol = NULL;
       
  8414             
       
  8415             /* Get the value from a foo(<param_value>) style call */
       
  8416             if (IN_param_value == NULL)
       
  8417               IN_param_value = function_call_param_iterator.next();
       
  8418             if (IN_param_value != NULL) {
       
  8419               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8420               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8421             }
       
  8422             
       
  8423             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8424             {
       
  8425         
       
  8426                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8427                 return return_type_symbol;
       
  8428                 
       
  8429             }
       
  8430             
       
  8431             
       
  8432             ERROR;
       
  8433         }
       
  8434         
       
  8435     }/*function_uint_to_bool*/
       
  8436     break;
       
  8437 
       
  8438 /****
       
  8439  *UINT_TO_TIME
       
  8440  */
       
  8441     case function_uint_to_time :
       
  8442     {
       
  8443         symbol_c *last_type_symbol = NULL;
       
  8444 
       
  8445         {
       
  8446             identifier_c param_name("IN");
       
  8447             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8448             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8449             symbol_c *IN_type_symbol = NULL;
       
  8450             
       
  8451             /* Get the value from a foo(<param_value>) style call */
       
  8452             if (IN_param_value == NULL)
       
  8453               IN_param_value = function_call_param_iterator.next();
       
  8454             if (IN_param_value != NULL) {
       
  8455               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8456               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8457             }
       
  8458             
       
  8459             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8460             {
       
  8461         
       
  8462                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8463                 return return_type_symbol;
       
  8464                 
       
  8465             }
       
  8466             
       
  8467             
       
  8468             ERROR;
       
  8469         }
       
  8470         
       
  8471     }/*function_uint_to_time*/
       
  8472     break;
       
  8473 
       
  8474 /****
       
  8475  *UINT_TO_INT
       
  8476  */
       
  8477     case function_uint_to_int :
       
  8478     {
       
  8479         symbol_c *last_type_symbol = NULL;
       
  8480 
       
  8481         {
       
  8482             identifier_c param_name("IN");
       
  8483             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8484             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8485             symbol_c *IN_type_symbol = NULL;
       
  8486             
       
  8487             /* Get the value from a foo(<param_value>) style call */
       
  8488             if (IN_param_value == NULL)
       
  8489               IN_param_value = function_call_param_iterator.next();
       
  8490             if (IN_param_value != NULL) {
       
  8491               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8492               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8493             }
       
  8494             
       
  8495             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  8496             {
       
  8497         
       
  8498                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8499                 return return_type_symbol;
       
  8500                 
       
  8501             }
       
  8502             
       
  8503             
       
  8504             ERROR;
       
  8505         }
       
  8506         
       
  8507     }/*function_uint_to_int*/
       
  8508     break;
       
  8509 
       
  8510 /****
       
  8511  *LREAL_TO_REAL
       
  8512  */
       
  8513     case function_lreal_to_real :
       
  8514     {
       
  8515         symbol_c *last_type_symbol = NULL;
       
  8516 
       
  8517         {
       
  8518             identifier_c param_name("IN");
       
  8519             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8520             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8521             symbol_c *IN_type_symbol = NULL;
       
  8522             
       
  8523             /* Get the value from a foo(<param_value>) style call */
       
  8524             if (IN_param_value == NULL)
       
  8525               IN_param_value = function_call_param_iterator.next();
       
  8526             if (IN_param_value != NULL) {
       
  8527               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8528               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8529             }
       
  8530             
       
  8531             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8532             {
       
  8533         
       
  8534                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8535                 return return_type_symbol;
       
  8536                 
       
  8537             }
       
  8538             
       
  8539             
       
  8540             ERROR;
       
  8541         }
       
  8542         
       
  8543     }/*function_lreal_to_real*/
       
  8544     break;
       
  8545 
       
  8546 /****
       
  8547  *LREAL_TO_SINT
       
  8548  */
       
  8549     case function_lreal_to_sint :
       
  8550     {
       
  8551         symbol_c *last_type_symbol = NULL;
       
  8552 
       
  8553         {
       
  8554             identifier_c param_name("IN");
       
  8555             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8556             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8557             symbol_c *IN_type_symbol = NULL;
       
  8558             
       
  8559             /* Get the value from a foo(<param_value>) style call */
       
  8560             if (IN_param_value == NULL)
       
  8561               IN_param_value = function_call_param_iterator.next();
       
  8562             if (IN_param_value != NULL) {
       
  8563               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8564               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8565             }
       
  8566             
       
  8567             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8568             {
       
  8569         
       
  8570                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8571                 return return_type_symbol;
       
  8572                 
       
  8573             }
       
  8574             
       
  8575             
       
  8576             ERROR;
       
  8577         }
       
  8578         
       
  8579     }/*function_lreal_to_sint*/
       
  8580     break;
       
  8581 
       
  8582 /****
       
  8583  *LREAL_TO_LINT
       
  8584  */
       
  8585     case function_lreal_to_lint :
       
  8586     {
       
  8587         symbol_c *last_type_symbol = NULL;
       
  8588 
       
  8589         {
       
  8590             identifier_c param_name("IN");
       
  8591             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8592             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8593             symbol_c *IN_type_symbol = NULL;
       
  8594             
       
  8595             /* Get the value from a foo(<param_value>) style call */
       
  8596             if (IN_param_value == NULL)
       
  8597               IN_param_value = function_call_param_iterator.next();
       
  8598             if (IN_param_value != NULL) {
       
  8599               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8600               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8601             }
       
  8602             
       
  8603             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8604             {
       
  8605         
       
  8606                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8607                 return return_type_symbol;
       
  8608                 
       
  8609             }
       
  8610             
       
  8611             
       
  8612             ERROR;
       
  8613         }
       
  8614         
       
  8615     }/*function_lreal_to_lint*/
       
  8616     break;
       
  8617 
       
  8618 /****
       
  8619  *LREAL_TO_DINT
       
  8620  */
       
  8621     case function_lreal_to_dint :
       
  8622     {
       
  8623         symbol_c *last_type_symbol = NULL;
       
  8624 
       
  8625         {
       
  8626             identifier_c param_name("IN");
       
  8627             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8628             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8629             symbol_c *IN_type_symbol = NULL;
       
  8630             
       
  8631             /* Get the value from a foo(<param_value>) style call */
       
  8632             if (IN_param_value == NULL)
       
  8633               IN_param_value = function_call_param_iterator.next();
       
  8634             if (IN_param_value != NULL) {
       
  8635               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8636               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8637             }
       
  8638             
       
  8639             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8640             {
       
  8641         
       
  8642                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8643                 return return_type_symbol;
       
  8644                 
       
  8645             }
       
  8646             
       
  8647             
       
  8648             ERROR;
       
  8649         }
       
  8650         
       
  8651     }/*function_lreal_to_dint*/
       
  8652     break;
       
  8653 
       
  8654 /****
       
  8655  *LREAL_TO_DATE
       
  8656  */
       
  8657     case function_lreal_to_date :
       
  8658     {
       
  8659         symbol_c *last_type_symbol = NULL;
       
  8660 
       
  8661         {
       
  8662             identifier_c param_name("IN");
       
  8663             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8664             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8665             symbol_c *IN_type_symbol = NULL;
       
  8666             
       
  8667             /* Get the value from a foo(<param_value>) style call */
       
  8668             if (IN_param_value == NULL)
       
  8669               IN_param_value = function_call_param_iterator.next();
       
  8670             if (IN_param_value != NULL) {
       
  8671               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8672               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8673             }
       
  8674             
       
  8675             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8676             {
       
  8677         
       
  8678                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8679                 return return_type_symbol;
       
  8680                 
       
  8681             }
       
  8682             
       
  8683             
       
  8684             ERROR;
       
  8685         }
       
  8686         
       
  8687     }/*function_lreal_to_date*/
       
  8688     break;
       
  8689 
       
  8690 /****
       
  8691  *LREAL_TO_DWORD
       
  8692  */
       
  8693     case function_lreal_to_dword :
       
  8694     {
       
  8695         symbol_c *last_type_symbol = NULL;
       
  8696 
       
  8697         {
       
  8698             identifier_c param_name("IN");
       
  8699             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8700             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8701             symbol_c *IN_type_symbol = NULL;
       
  8702             
       
  8703             /* Get the value from a foo(<param_value>) style call */
       
  8704             if (IN_param_value == NULL)
       
  8705               IN_param_value = function_call_param_iterator.next();
       
  8706             if (IN_param_value != NULL) {
       
  8707               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8708               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8709             }
       
  8710             
       
  8711             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8712             {
       
  8713         
       
  8714                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8715                 return return_type_symbol;
       
  8716                 
       
  8717             }
       
  8718             
       
  8719             
       
  8720             ERROR;
       
  8721         }
       
  8722         
       
  8723     }/*function_lreal_to_dword*/
       
  8724     break;
       
  8725 
       
  8726 /****
       
  8727  *LREAL_TO_DT
       
  8728  */
       
  8729     case function_lreal_to_dt :
       
  8730     {
       
  8731         symbol_c *last_type_symbol = NULL;
       
  8732 
       
  8733         {
       
  8734             identifier_c param_name("IN");
       
  8735             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8736             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8737             symbol_c *IN_type_symbol = NULL;
       
  8738             
       
  8739             /* Get the value from a foo(<param_value>) style call */
       
  8740             if (IN_param_value == NULL)
       
  8741               IN_param_value = function_call_param_iterator.next();
       
  8742             if (IN_param_value != NULL) {
       
  8743               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8744               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8745             }
       
  8746             
       
  8747             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8748             {
       
  8749         
       
  8750                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8751                 return return_type_symbol;
       
  8752                 
       
  8753             }
       
  8754             
       
  8755             
       
  8756             ERROR;
       
  8757         }
       
  8758         
       
  8759     }/*function_lreal_to_dt*/
       
  8760     break;
       
  8761 
       
  8762 /****
       
  8763  *LREAL_TO_TOD
       
  8764  */
       
  8765     case function_lreal_to_tod :
       
  8766     {
       
  8767         symbol_c *last_type_symbol = NULL;
       
  8768 
       
  8769         {
       
  8770             identifier_c param_name("IN");
       
  8771             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8772             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8773             symbol_c *IN_type_symbol = NULL;
       
  8774             
       
  8775             /* Get the value from a foo(<param_value>) style call */
       
  8776             if (IN_param_value == NULL)
       
  8777               IN_param_value = function_call_param_iterator.next();
       
  8778             if (IN_param_value != NULL) {
       
  8779               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8780               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8781             }
       
  8782             
       
  8783             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8784             {
       
  8785         
       
  8786                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8787                 return return_type_symbol;
       
  8788                 
       
  8789             }
       
  8790             
       
  8791             
       
  8792             ERROR;
       
  8793         }
       
  8794         
       
  8795     }/*function_lreal_to_tod*/
       
  8796     break;
       
  8797 
       
  8798 /****
       
  8799  *LREAL_TO_UDINT
       
  8800  */
       
  8801     case function_lreal_to_udint :
       
  8802     {
       
  8803         symbol_c *last_type_symbol = NULL;
       
  8804 
       
  8805         {
       
  8806             identifier_c param_name("IN");
       
  8807             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8808             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8809             symbol_c *IN_type_symbol = NULL;
       
  8810             
       
  8811             /* Get the value from a foo(<param_value>) style call */
       
  8812             if (IN_param_value == NULL)
       
  8813               IN_param_value = function_call_param_iterator.next();
       
  8814             if (IN_param_value != NULL) {
       
  8815               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8816               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8817             }
       
  8818             
       
  8819             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8820             {
       
  8821         
       
  8822                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8823                 return return_type_symbol;
       
  8824                 
       
  8825             }
       
  8826             
       
  8827             
       
  8828             ERROR;
       
  8829         }
       
  8830         
       
  8831     }/*function_lreal_to_udint*/
       
  8832     break;
       
  8833 
       
  8834 /****
       
  8835  *LREAL_TO_WORD
       
  8836  */
       
  8837     case function_lreal_to_word :
       
  8838     {
       
  8839         symbol_c *last_type_symbol = NULL;
       
  8840 
       
  8841         {
       
  8842             identifier_c param_name("IN");
       
  8843             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8844             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8845             symbol_c *IN_type_symbol = NULL;
       
  8846             
       
  8847             /* Get the value from a foo(<param_value>) style call */
       
  8848             if (IN_param_value == NULL)
       
  8849               IN_param_value = function_call_param_iterator.next();
       
  8850             if (IN_param_value != NULL) {
       
  8851               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8852               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8853             }
       
  8854             
       
  8855             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8856             {
       
  8857         
       
  8858                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8859                 return return_type_symbol;
       
  8860                 
       
  8861             }
       
  8862             
       
  8863             
       
  8864             ERROR;
       
  8865         }
       
  8866         
       
  8867     }/*function_lreal_to_word*/
       
  8868     break;
       
  8869 
       
  8870 /****
       
  8871  *LREAL_TO_STRING
       
  8872  */
       
  8873     case function_lreal_to_string :
       
  8874     {
       
  8875         symbol_c *last_type_symbol = NULL;
       
  8876 
       
  8877         {
       
  8878             identifier_c param_name("IN");
       
  8879             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8880             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8881             symbol_c *IN_type_symbol = NULL;
       
  8882             
       
  8883             /* Get the value from a foo(<param_value>) style call */
       
  8884             if (IN_param_value == NULL)
       
  8885               IN_param_value = function_call_param_iterator.next();
       
  8886             if (IN_param_value != NULL) {
       
  8887               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8888               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8889             }
       
  8890             
       
  8891             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8892             {
       
  8893         
       
  8894                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8895                 return return_type_symbol;
       
  8896                 
       
  8897             }
       
  8898             
       
  8899             
       
  8900             ERROR;
       
  8901         }
       
  8902         
       
  8903     }/*function_lreal_to_string*/
       
  8904     break;
       
  8905 
       
  8906 /****
       
  8907  *LREAL_TO_LWORD
       
  8908  */
       
  8909     case function_lreal_to_lword :
       
  8910     {
       
  8911         symbol_c *last_type_symbol = NULL;
       
  8912 
       
  8913         {
       
  8914             identifier_c param_name("IN");
       
  8915             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8916             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8917             symbol_c *IN_type_symbol = NULL;
       
  8918             
       
  8919             /* Get the value from a foo(<param_value>) style call */
       
  8920             if (IN_param_value == NULL)
       
  8921               IN_param_value = function_call_param_iterator.next();
       
  8922             if (IN_param_value != NULL) {
       
  8923               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8924               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8925             }
       
  8926             
       
  8927             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8928             {
       
  8929         
       
  8930                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8931                 return return_type_symbol;
       
  8932                 
       
  8933             }
       
  8934             
       
  8935             
       
  8936             ERROR;
       
  8937         }
       
  8938         
       
  8939     }/*function_lreal_to_lword*/
       
  8940     break;
       
  8941 
       
  8942 /****
       
  8943  *LREAL_TO_UINT
       
  8944  */
       
  8945     case function_lreal_to_uint :
       
  8946     {
       
  8947         symbol_c *last_type_symbol = NULL;
       
  8948 
       
  8949         {
       
  8950             identifier_c param_name("IN");
       
  8951             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8952             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8953             symbol_c *IN_type_symbol = NULL;
       
  8954             
       
  8955             /* Get the value from a foo(<param_value>) style call */
       
  8956             if (IN_param_value == NULL)
       
  8957               IN_param_value = function_call_param_iterator.next();
       
  8958             if (IN_param_value != NULL) {
       
  8959               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8960               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8961             }
       
  8962             
       
  8963             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8964             {
       
  8965         
       
  8966                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8967                 return return_type_symbol;
       
  8968                 
       
  8969             }
       
  8970             
       
  8971             
       
  8972             ERROR;
       
  8973         }
       
  8974         
       
  8975     }/*function_lreal_to_uint*/
       
  8976     break;
       
  8977 
       
  8978 /****
       
  8979  *LREAL_TO_BYTE
       
  8980  */
       
  8981     case function_lreal_to_byte :
       
  8982     {
       
  8983         symbol_c *last_type_symbol = NULL;
       
  8984 
       
  8985         {
       
  8986             identifier_c param_name("IN");
       
  8987             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8988             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8989             symbol_c *IN_type_symbol = NULL;
       
  8990             
       
  8991             /* Get the value from a foo(<param_value>) style call */
       
  8992             if (IN_param_value == NULL)
       
  8993               IN_param_value = function_call_param_iterator.next();
       
  8994             if (IN_param_value != NULL) {
       
  8995               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8996               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8997             }
       
  8998             
       
  8999             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  9000             {
       
  9001         
       
  9002                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9003                 return return_type_symbol;
       
  9004                 
       
  9005             }
       
  9006             
       
  9007             
       
  9008             ERROR;
       
  9009         }
       
  9010         
       
  9011     }/*function_lreal_to_byte*/
       
  9012     break;
       
  9013 
       
  9014 /****
       
  9015  *LREAL_TO_USINT
       
  9016  */
       
  9017     case function_lreal_to_usint :
       
  9018     {
       
  9019         symbol_c *last_type_symbol = NULL;
       
  9020 
       
  9021         {
       
  9022             identifier_c param_name("IN");
       
  9023             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9024             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9025             symbol_c *IN_type_symbol = NULL;
       
  9026             
       
  9027             /* Get the value from a foo(<param_value>) style call */
       
  9028             if (IN_param_value == NULL)
       
  9029               IN_param_value = function_call_param_iterator.next();
       
  9030             if (IN_param_value != NULL) {
       
  9031               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9032               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9033             }
       
  9034             
       
  9035             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  9036             {
       
  9037         
       
  9038                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9039                 return return_type_symbol;
       
  9040                 
       
  9041             }
       
  9042             
       
  9043             
       
  9044             ERROR;
       
  9045         }
       
  9046         
       
  9047     }/*function_lreal_to_usint*/
       
  9048     break;
       
  9049 
       
  9050 /****
       
  9051  *LREAL_TO_ULINT
       
  9052  */
       
  9053     case function_lreal_to_ulint :
       
  9054     {
       
  9055         symbol_c *last_type_symbol = NULL;
       
  9056 
       
  9057         {
       
  9058             identifier_c param_name("IN");
       
  9059             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9060             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9061             symbol_c *IN_type_symbol = NULL;
       
  9062             
       
  9063             /* Get the value from a foo(<param_value>) style call */
       
  9064             if (IN_param_value == NULL)
       
  9065               IN_param_value = function_call_param_iterator.next();
       
  9066             if (IN_param_value != NULL) {
       
  9067               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9068               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9069             }
       
  9070             
       
  9071             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  9072             {
       
  9073         
       
  9074                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9075                 return return_type_symbol;
       
  9076                 
       
  9077             }
       
  9078             
       
  9079             
       
  9080             ERROR;
       
  9081         }
       
  9082         
       
  9083     }/*function_lreal_to_ulint*/
       
  9084     break;
       
  9085 
       
  9086 /****
       
  9087  *LREAL_TO_BOOL
       
  9088  */
       
  9089     case function_lreal_to_bool :
       
  9090     {
       
  9091         symbol_c *last_type_symbol = NULL;
       
  9092 
       
  9093         {
       
  9094             identifier_c param_name("IN");
       
  9095             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9096             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9097             symbol_c *IN_type_symbol = NULL;
       
  9098             
       
  9099             /* Get the value from a foo(<param_value>) style call */
       
  9100             if (IN_param_value == NULL)
       
  9101               IN_param_value = function_call_param_iterator.next();
       
  9102             if (IN_param_value != NULL) {
       
  9103               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9104               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9105             }
       
  9106             
       
  9107             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  9108             {
       
  9109         
       
  9110                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9111                 return return_type_symbol;
       
  9112                 
       
  9113             }
       
  9114             
       
  9115             
       
  9116             ERROR;
       
  9117         }
       
  9118         
       
  9119     }/*function_lreal_to_bool*/
       
  9120     break;
       
  9121 
       
  9122 /****
       
  9123  *LREAL_TO_TIME
       
  9124  */
       
  9125     case function_lreal_to_time :
       
  9126     {
       
  9127         symbol_c *last_type_symbol = NULL;
       
  9128 
       
  9129         {
       
  9130             identifier_c param_name("IN");
       
  9131             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9132             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9133             symbol_c *IN_type_symbol = NULL;
       
  9134             
       
  9135             /* Get the value from a foo(<param_value>) style call */
       
  9136             if (IN_param_value == NULL)
       
  9137               IN_param_value = function_call_param_iterator.next();
       
  9138             if (IN_param_value != NULL) {
       
  9139               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9140               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9141             }
       
  9142             
       
  9143             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  9144             {
       
  9145         
       
  9146                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9147                 return return_type_symbol;
       
  9148                 
       
  9149             }
       
  9150             
       
  9151             
       
  9152             ERROR;
       
  9153         }
       
  9154         
       
  9155     }/*function_lreal_to_time*/
       
  9156     break;
       
  9157 
       
  9158 /****
       
  9159  *LREAL_TO_INT
       
  9160  */
       
  9161     case function_lreal_to_int :
       
  9162     {
       
  9163         symbol_c *last_type_symbol = NULL;
       
  9164 
       
  9165         {
       
  9166             identifier_c param_name("IN");
       
  9167             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9168             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9169             symbol_c *IN_type_symbol = NULL;
       
  9170             
       
  9171             /* Get the value from a foo(<param_value>) style call */
       
  9172             if (IN_param_value == NULL)
       
  9173               IN_param_value = function_call_param_iterator.next();
       
  9174             if (IN_param_value != NULL) {
       
  9175               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9176               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9177             }
       
  9178             
       
  9179             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  9180             {
       
  9181         
       
  9182                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9183                 return return_type_symbol;
       
  9184                 
       
  9185             }
       
  9186             
       
  9187             
       
  9188             ERROR;
       
  9189         }
       
  9190         
       
  9191     }/*function_lreal_to_int*/
       
  9192     break;
       
  9193 
       
  9194 /****
       
  9195  *BYTE_TO_REAL
       
  9196  */
       
  9197     case function_byte_to_real :
       
  9198     {
       
  9199         symbol_c *last_type_symbol = NULL;
       
  9200 
       
  9201         {
       
  9202             identifier_c param_name("IN");
       
  9203             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9204             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9205             symbol_c *IN_type_symbol = NULL;
       
  9206             
       
  9207             /* Get the value from a foo(<param_value>) style call */
       
  9208             if (IN_param_value == NULL)
       
  9209               IN_param_value = function_call_param_iterator.next();
       
  9210             if (IN_param_value != NULL) {
       
  9211               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9212               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9213             }
       
  9214             
       
  9215             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9216             {
       
  9217         
       
  9218                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9219                 return return_type_symbol;
       
  9220                 
       
  9221             }
       
  9222             
       
  9223             
       
  9224             ERROR;
       
  9225         }
       
  9226         
       
  9227     }/*function_byte_to_real*/
       
  9228     break;
       
  9229 
       
  9230 /****
       
  9231  *BYTE_TO_SINT
       
  9232  */
       
  9233     case function_byte_to_sint :
       
  9234     {
       
  9235         symbol_c *last_type_symbol = NULL;
       
  9236 
       
  9237         {
       
  9238             identifier_c param_name("IN");
       
  9239             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9240             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9241             symbol_c *IN_type_symbol = NULL;
       
  9242             
       
  9243             /* Get the value from a foo(<param_value>) style call */
       
  9244             if (IN_param_value == NULL)
       
  9245               IN_param_value = function_call_param_iterator.next();
       
  9246             if (IN_param_value != NULL) {
       
  9247               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9248               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9249             }
       
  9250             
       
  9251             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9252             {
       
  9253         
       
  9254                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9255                 return return_type_symbol;
       
  9256                 
       
  9257             }
       
  9258             
       
  9259             
       
  9260             ERROR;
       
  9261         }
       
  9262         
       
  9263     }/*function_byte_to_sint*/
       
  9264     break;
       
  9265 
       
  9266 /****
       
  9267  *BYTE_TO_LINT
       
  9268  */
       
  9269     case function_byte_to_lint :
       
  9270     {
       
  9271         symbol_c *last_type_symbol = NULL;
       
  9272 
       
  9273         {
       
  9274             identifier_c param_name("IN");
       
  9275             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9276             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9277             symbol_c *IN_type_symbol = NULL;
       
  9278             
       
  9279             /* Get the value from a foo(<param_value>) style call */
       
  9280             if (IN_param_value == NULL)
       
  9281               IN_param_value = function_call_param_iterator.next();
       
  9282             if (IN_param_value != NULL) {
       
  9283               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9284               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9285             }
       
  9286             
       
  9287             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9288             {
       
  9289         
       
  9290                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9291                 return return_type_symbol;
       
  9292                 
       
  9293             }
       
  9294             
       
  9295             
       
  9296             ERROR;
       
  9297         }
       
  9298         
       
  9299     }/*function_byte_to_lint*/
       
  9300     break;
       
  9301 
       
  9302 /****
       
  9303  *BYTE_TO_DINT
       
  9304  */
       
  9305     case function_byte_to_dint :
       
  9306     {
       
  9307         symbol_c *last_type_symbol = NULL;
       
  9308 
       
  9309         {
       
  9310             identifier_c param_name("IN");
       
  9311             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9312             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9313             symbol_c *IN_type_symbol = NULL;
       
  9314             
       
  9315             /* Get the value from a foo(<param_value>) style call */
       
  9316             if (IN_param_value == NULL)
       
  9317               IN_param_value = function_call_param_iterator.next();
       
  9318             if (IN_param_value != NULL) {
       
  9319               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9320               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9321             }
       
  9322             
       
  9323             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9324             {
       
  9325         
       
  9326                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9327                 return return_type_symbol;
       
  9328                 
       
  9329             }
       
  9330             
       
  9331             
       
  9332             ERROR;
       
  9333         }
       
  9334         
       
  9335     }/*function_byte_to_dint*/
       
  9336     break;
       
  9337 
       
  9338 /****
       
  9339  *BYTE_TO_DATE
       
  9340  */
       
  9341     case function_byte_to_date :
       
  9342     {
       
  9343         symbol_c *last_type_symbol = NULL;
       
  9344 
       
  9345         {
       
  9346             identifier_c param_name("IN");
       
  9347             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9348             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9349             symbol_c *IN_type_symbol = NULL;
       
  9350             
       
  9351             /* Get the value from a foo(<param_value>) style call */
       
  9352             if (IN_param_value == NULL)
       
  9353               IN_param_value = function_call_param_iterator.next();
       
  9354             if (IN_param_value != NULL) {
       
  9355               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9356               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9357             }
       
  9358             
       
  9359             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9360             {
       
  9361         
       
  9362                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9363                 return return_type_symbol;
       
  9364                 
       
  9365             }
       
  9366             
       
  9367             
       
  9368             ERROR;
       
  9369         }
       
  9370         
       
  9371     }/*function_byte_to_date*/
       
  9372     break;
       
  9373 
       
  9374 /****
       
  9375  *BYTE_TO_DWORD
       
  9376  */
       
  9377     case function_byte_to_dword :
       
  9378     {
       
  9379         symbol_c *last_type_symbol = NULL;
       
  9380 
       
  9381         {
       
  9382             identifier_c param_name("IN");
       
  9383             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9384             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9385             symbol_c *IN_type_symbol = NULL;
       
  9386             
       
  9387             /* Get the value from a foo(<param_value>) style call */
       
  9388             if (IN_param_value == NULL)
       
  9389               IN_param_value = function_call_param_iterator.next();
       
  9390             if (IN_param_value != NULL) {
       
  9391               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9392               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9393             }
       
  9394             
       
  9395             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9396             {
       
  9397         
       
  9398                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9399                 return return_type_symbol;
       
  9400                 
       
  9401             }
       
  9402             
       
  9403             
       
  9404             ERROR;
       
  9405         }
       
  9406         
       
  9407     }/*function_byte_to_dword*/
       
  9408     break;
       
  9409 
       
  9410 /****
       
  9411  *BYTE_TO_DT
       
  9412  */
       
  9413     case function_byte_to_dt :
       
  9414     {
       
  9415         symbol_c *last_type_symbol = NULL;
       
  9416 
       
  9417         {
       
  9418             identifier_c param_name("IN");
       
  9419             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9420             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9421             symbol_c *IN_type_symbol = NULL;
       
  9422             
       
  9423             /* Get the value from a foo(<param_value>) style call */
       
  9424             if (IN_param_value == NULL)
       
  9425               IN_param_value = function_call_param_iterator.next();
       
  9426             if (IN_param_value != NULL) {
       
  9427               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9428               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9429             }
       
  9430             
       
  9431             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9432             {
       
  9433         
       
  9434                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9435                 return return_type_symbol;
       
  9436                 
       
  9437             }
       
  9438             
       
  9439             
       
  9440             ERROR;
       
  9441         }
       
  9442         
       
  9443     }/*function_byte_to_dt*/
       
  9444     break;
       
  9445 
       
  9446 /****
       
  9447  *BYTE_TO_TOD
       
  9448  */
       
  9449     case function_byte_to_tod :
       
  9450     {
       
  9451         symbol_c *last_type_symbol = NULL;
       
  9452 
       
  9453         {
       
  9454             identifier_c param_name("IN");
       
  9455             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9456             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9457             symbol_c *IN_type_symbol = NULL;
       
  9458             
       
  9459             /* Get the value from a foo(<param_value>) style call */
       
  9460             if (IN_param_value == NULL)
       
  9461               IN_param_value = function_call_param_iterator.next();
       
  9462             if (IN_param_value != NULL) {
       
  9463               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9464               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9465             }
       
  9466             
       
  9467             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9468             {
       
  9469         
       
  9470                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9471                 return return_type_symbol;
       
  9472                 
       
  9473             }
       
  9474             
       
  9475             
       
  9476             ERROR;
       
  9477         }
       
  9478         
       
  9479     }/*function_byte_to_tod*/
       
  9480     break;
       
  9481 
       
  9482 /****
       
  9483  *BYTE_TO_UDINT
       
  9484  */
       
  9485     case function_byte_to_udint :
       
  9486     {
       
  9487         symbol_c *last_type_symbol = NULL;
       
  9488 
       
  9489         {
       
  9490             identifier_c param_name("IN");
       
  9491             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9492             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9493             symbol_c *IN_type_symbol = NULL;
       
  9494             
       
  9495             /* Get the value from a foo(<param_value>) style call */
       
  9496             if (IN_param_value == NULL)
       
  9497               IN_param_value = function_call_param_iterator.next();
       
  9498             if (IN_param_value != NULL) {
       
  9499               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9500               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9501             }
       
  9502             
       
  9503             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9504             {
       
  9505         
       
  9506                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9507                 return return_type_symbol;
       
  9508                 
       
  9509             }
       
  9510             
       
  9511             
       
  9512             ERROR;
       
  9513         }
       
  9514         
       
  9515     }/*function_byte_to_udint*/
       
  9516     break;
       
  9517 
       
  9518 /****
       
  9519  *BYTE_TO_WORD
       
  9520  */
       
  9521     case function_byte_to_word :
       
  9522     {
       
  9523         symbol_c *last_type_symbol = NULL;
       
  9524 
       
  9525         {
       
  9526             identifier_c param_name("IN");
       
  9527             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9528             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9529             symbol_c *IN_type_symbol = NULL;
       
  9530             
       
  9531             /* Get the value from a foo(<param_value>) style call */
       
  9532             if (IN_param_value == NULL)
       
  9533               IN_param_value = function_call_param_iterator.next();
       
  9534             if (IN_param_value != NULL) {
       
  9535               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9536               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9537             }
       
  9538             
       
  9539             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9540             {
       
  9541         
       
  9542                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9543                 return return_type_symbol;
       
  9544                 
       
  9545             }
       
  9546             
       
  9547             
       
  9548             ERROR;
       
  9549         }
       
  9550         
       
  9551     }/*function_byte_to_word*/
       
  9552     break;
       
  9553 
       
  9554 /****
       
  9555  *BYTE_TO_STRING
       
  9556  */
       
  9557     case function_byte_to_string :
       
  9558     {
       
  9559         symbol_c *last_type_symbol = NULL;
       
  9560 
       
  9561         {
       
  9562             identifier_c param_name("IN");
       
  9563             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9564             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9565             symbol_c *IN_type_symbol = NULL;
       
  9566             
       
  9567             /* Get the value from a foo(<param_value>) style call */
       
  9568             if (IN_param_value == NULL)
       
  9569               IN_param_value = function_call_param_iterator.next();
       
  9570             if (IN_param_value != NULL) {
       
  9571               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9572               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9573             }
       
  9574             
       
  9575             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9576             {
       
  9577         
       
  9578                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9579                 return return_type_symbol;
       
  9580                 
       
  9581             }
       
  9582             
       
  9583             
       
  9584             ERROR;
       
  9585         }
       
  9586         
       
  9587     }/*function_byte_to_string*/
       
  9588     break;
       
  9589 
       
  9590 /****
       
  9591  *BYTE_TO_LWORD
       
  9592  */
       
  9593     case function_byte_to_lword :
       
  9594     {
       
  9595         symbol_c *last_type_symbol = NULL;
       
  9596 
       
  9597         {
       
  9598             identifier_c param_name("IN");
       
  9599             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9600             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9601             symbol_c *IN_type_symbol = NULL;
       
  9602             
       
  9603             /* Get the value from a foo(<param_value>) style call */
       
  9604             if (IN_param_value == NULL)
       
  9605               IN_param_value = function_call_param_iterator.next();
       
  9606             if (IN_param_value != NULL) {
       
  9607               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9608               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9609             }
       
  9610             
       
  9611             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9612             {
       
  9613         
       
  9614                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9615                 return return_type_symbol;
       
  9616                 
       
  9617             }
       
  9618             
       
  9619             
       
  9620             ERROR;
       
  9621         }
       
  9622         
       
  9623     }/*function_byte_to_lword*/
       
  9624     break;
       
  9625 
       
  9626 /****
       
  9627  *BYTE_TO_UINT
       
  9628  */
       
  9629     case function_byte_to_uint :
       
  9630     {
       
  9631         symbol_c *last_type_symbol = NULL;
       
  9632 
       
  9633         {
       
  9634             identifier_c param_name("IN");
       
  9635             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9636             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9637             symbol_c *IN_type_symbol = NULL;
       
  9638             
       
  9639             /* Get the value from a foo(<param_value>) style call */
       
  9640             if (IN_param_value == NULL)
       
  9641               IN_param_value = function_call_param_iterator.next();
       
  9642             if (IN_param_value != NULL) {
       
  9643               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9644               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9645             }
       
  9646             
       
  9647             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9648             {
       
  9649         
       
  9650                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9651                 return return_type_symbol;
       
  9652                 
       
  9653             }
       
  9654             
       
  9655             
       
  9656             ERROR;
       
  9657         }
       
  9658         
       
  9659     }/*function_byte_to_uint*/
       
  9660     break;
       
  9661 
       
  9662 /****
       
  9663  *BYTE_TO_LREAL
       
  9664  */
       
  9665     case function_byte_to_lreal :
       
  9666     {
       
  9667         symbol_c *last_type_symbol = NULL;
       
  9668 
       
  9669         {
       
  9670             identifier_c param_name("IN");
       
  9671             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9672             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9673             symbol_c *IN_type_symbol = NULL;
       
  9674             
       
  9675             /* Get the value from a foo(<param_value>) style call */
       
  9676             if (IN_param_value == NULL)
       
  9677               IN_param_value = function_call_param_iterator.next();
       
  9678             if (IN_param_value != NULL) {
       
  9679               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9680               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9681             }
       
  9682             
       
  9683             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9684             {
       
  9685         
       
  9686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9687                 return return_type_symbol;
       
  9688                 
       
  9689             }
       
  9690             
       
  9691             
       
  9692             ERROR;
       
  9693         }
       
  9694         
       
  9695     }/*function_byte_to_lreal*/
       
  9696     break;
       
  9697 
       
  9698 /****
       
  9699  *BYTE_TO_USINT
       
  9700  */
       
  9701     case function_byte_to_usint :
       
  9702     {
       
  9703         symbol_c *last_type_symbol = NULL;
       
  9704 
       
  9705         {
       
  9706             identifier_c param_name("IN");
       
  9707             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9708             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9709             symbol_c *IN_type_symbol = NULL;
       
  9710             
       
  9711             /* Get the value from a foo(<param_value>) style call */
       
  9712             if (IN_param_value == NULL)
       
  9713               IN_param_value = function_call_param_iterator.next();
       
  9714             if (IN_param_value != NULL) {
       
  9715               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9716               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9717             }
       
  9718             
       
  9719             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9720             {
       
  9721         
       
  9722                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9723                 return return_type_symbol;
       
  9724                 
       
  9725             }
       
  9726             
       
  9727             
       
  9728             ERROR;
       
  9729         }
       
  9730         
       
  9731     }/*function_byte_to_usint*/
       
  9732     break;
       
  9733 
       
  9734 /****
       
  9735  *BYTE_TO_ULINT
       
  9736  */
       
  9737     case function_byte_to_ulint :
       
  9738     {
       
  9739         symbol_c *last_type_symbol = NULL;
       
  9740 
       
  9741         {
       
  9742             identifier_c param_name("IN");
       
  9743             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9744             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9745             symbol_c *IN_type_symbol = NULL;
       
  9746             
       
  9747             /* Get the value from a foo(<param_value>) style call */
       
  9748             if (IN_param_value == NULL)
       
  9749               IN_param_value = function_call_param_iterator.next();
       
  9750             if (IN_param_value != NULL) {
       
  9751               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9752               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9753             }
       
  9754             
       
  9755             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9756             {
       
  9757         
       
  9758                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9759                 return return_type_symbol;
       
  9760                 
       
  9761             }
       
  9762             
       
  9763             
       
  9764             ERROR;
       
  9765         }
       
  9766         
       
  9767     }/*function_byte_to_ulint*/
       
  9768     break;
       
  9769 
       
  9770 /****
       
  9771  *BYTE_TO_BOOL
       
  9772  */
       
  9773     case function_byte_to_bool :
       
  9774     {
       
  9775         symbol_c *last_type_symbol = NULL;
       
  9776 
       
  9777         {
       
  9778             identifier_c param_name("IN");
       
  9779             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9780             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9781             symbol_c *IN_type_symbol = NULL;
       
  9782             
       
  9783             /* Get the value from a foo(<param_value>) style call */
       
  9784             if (IN_param_value == NULL)
       
  9785               IN_param_value = function_call_param_iterator.next();
       
  9786             if (IN_param_value != NULL) {
       
  9787               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9788               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9789             }
       
  9790             
       
  9791             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9792             {
       
  9793         
       
  9794                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9795                 return return_type_symbol;
       
  9796                 
       
  9797             }
       
  9798             
       
  9799             
       
  9800             ERROR;
       
  9801         }
       
  9802         
       
  9803     }/*function_byte_to_bool*/
       
  9804     break;
       
  9805 
       
  9806 /****
       
  9807  *BYTE_TO_TIME
       
  9808  */
       
  9809     case function_byte_to_time :
       
  9810     {
       
  9811         symbol_c *last_type_symbol = NULL;
       
  9812 
       
  9813         {
       
  9814             identifier_c param_name("IN");
       
  9815             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9816             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9817             symbol_c *IN_type_symbol = NULL;
       
  9818             
       
  9819             /* Get the value from a foo(<param_value>) style call */
       
  9820             if (IN_param_value == NULL)
       
  9821               IN_param_value = function_call_param_iterator.next();
       
  9822             if (IN_param_value != NULL) {
       
  9823               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9824               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9825             }
       
  9826             
       
  9827             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9828             {
       
  9829         
       
  9830                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9831                 return return_type_symbol;
       
  9832                 
       
  9833             }
       
  9834             
       
  9835             
       
  9836             ERROR;
       
  9837         }
       
  9838         
       
  9839     }/*function_byte_to_time*/
       
  9840     break;
       
  9841 
       
  9842 /****
       
  9843  *BYTE_TO_INT
       
  9844  */
       
  9845     case function_byte_to_int :
       
  9846     {
       
  9847         symbol_c *last_type_symbol = NULL;
       
  9848 
       
  9849         {
       
  9850             identifier_c param_name("IN");
       
  9851             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9852             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9853             symbol_c *IN_type_symbol = NULL;
       
  9854             
       
  9855             /* Get the value from a foo(<param_value>) style call */
       
  9856             if (IN_param_value == NULL)
       
  9857               IN_param_value = function_call_param_iterator.next();
       
  9858             if (IN_param_value != NULL) {
       
  9859               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9860               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9861             }
       
  9862             
       
  9863             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9864             {
       
  9865         
       
  9866                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9867                 return return_type_symbol;
       
  9868                 
       
  9869             }
       
  9870             
       
  9871             
       
  9872             ERROR;
       
  9873         }
       
  9874         
       
  9875     }/*function_byte_to_int*/
       
  9876     break;
       
  9877 
       
  9878 /****
       
  9879  *USINT_TO_REAL
       
  9880  */
       
  9881     case function_usint_to_real :
       
  9882     {
       
  9883         symbol_c *last_type_symbol = NULL;
       
  9884 
       
  9885         {
       
  9886             identifier_c param_name("IN");
       
  9887             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9888             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9889             symbol_c *IN_type_symbol = NULL;
       
  9890             
       
  9891             /* Get the value from a foo(<param_value>) style call */
       
  9892             if (IN_param_value == NULL)
       
  9893               IN_param_value = function_call_param_iterator.next();
       
  9894             if (IN_param_value != NULL) {
       
  9895               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9896               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9897             }
       
  9898             
       
  9899             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9900             {
       
  9901         
       
  9902                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9903                 return return_type_symbol;
       
  9904                 
       
  9905             }
       
  9906             
       
  9907             
       
  9908             ERROR;
       
  9909         }
       
  9910         
       
  9911     }/*function_usint_to_real*/
       
  9912     break;
       
  9913 
       
  9914 /****
       
  9915  *USINT_TO_SINT
       
  9916  */
       
  9917     case function_usint_to_sint :
       
  9918     {
       
  9919         symbol_c *last_type_symbol = NULL;
       
  9920 
       
  9921         {
       
  9922             identifier_c param_name("IN");
       
  9923             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9924             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9925             symbol_c *IN_type_symbol = NULL;
       
  9926             
       
  9927             /* Get the value from a foo(<param_value>) style call */
       
  9928             if (IN_param_value == NULL)
       
  9929               IN_param_value = function_call_param_iterator.next();
       
  9930             if (IN_param_value != NULL) {
       
  9931               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9932               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9933             }
       
  9934             
       
  9935             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9936             {
       
  9937         
       
  9938                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9939                 return return_type_symbol;
       
  9940                 
       
  9941             }
       
  9942             
       
  9943             
       
  9944             ERROR;
       
  9945         }
       
  9946         
       
  9947     }/*function_usint_to_sint*/
       
  9948     break;
       
  9949 
       
  9950 /****
       
  9951  *USINT_TO_LINT
       
  9952  */
       
  9953     case function_usint_to_lint :
       
  9954     {
       
  9955         symbol_c *last_type_symbol = NULL;
       
  9956 
       
  9957         {
       
  9958             identifier_c param_name("IN");
       
  9959             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9960             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9961             symbol_c *IN_type_symbol = NULL;
       
  9962             
       
  9963             /* Get the value from a foo(<param_value>) style call */
       
  9964             if (IN_param_value == NULL)
       
  9965               IN_param_value = function_call_param_iterator.next();
       
  9966             if (IN_param_value != NULL) {
       
  9967               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9968               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9969             }
       
  9970             
       
  9971             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9972             {
       
  9973         
       
  9974                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9975                 return return_type_symbol;
       
  9976                 
       
  9977             }
       
  9978             
       
  9979             
       
  9980             ERROR;
       
  9981         }
       
  9982         
       
  9983     }/*function_usint_to_lint*/
       
  9984     break;
       
  9985 
       
  9986 /****
       
  9987  *USINT_TO_DINT
       
  9988  */
       
  9989     case function_usint_to_dint :
       
  9990     {
       
  9991         symbol_c *last_type_symbol = NULL;
       
  9992 
       
  9993         {
       
  9994             identifier_c param_name("IN");
       
  9995             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9996             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9997             symbol_c *IN_type_symbol = NULL;
       
  9998             
       
  9999             /* Get the value from a foo(<param_value>) style call */
       
 10000             if (IN_param_value == NULL)
       
 10001               IN_param_value = function_call_param_iterator.next();
       
 10002             if (IN_param_value != NULL) {
       
 10003               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10004               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10005             }
       
 10006             
       
 10007             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10008             {
       
 10009         
       
 10010                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10011                 return return_type_symbol;
       
 10012                 
       
 10013             }
       
 10014             
       
 10015             
       
 10016             ERROR;
       
 10017         }
       
 10018         
       
 10019     }/*function_usint_to_dint*/
       
 10020     break;
       
 10021 
       
 10022 /****
       
 10023  *USINT_TO_DATE
       
 10024  */
       
 10025     case function_usint_to_date :
       
 10026     {
       
 10027         symbol_c *last_type_symbol = NULL;
       
 10028 
       
 10029         {
       
 10030             identifier_c param_name("IN");
       
 10031             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10032             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10033             symbol_c *IN_type_symbol = NULL;
       
 10034             
       
 10035             /* Get the value from a foo(<param_value>) style call */
       
 10036             if (IN_param_value == NULL)
       
 10037               IN_param_value = function_call_param_iterator.next();
       
 10038             if (IN_param_value != NULL) {
       
 10039               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10040               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10041             }
       
 10042             
       
 10043             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10044             {
       
 10045         
       
 10046                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10047                 return return_type_symbol;
       
 10048                 
       
 10049             }
       
 10050             
       
 10051             
       
 10052             ERROR;
       
 10053         }
       
 10054         
       
 10055     }/*function_usint_to_date*/
       
 10056     break;
       
 10057 
       
 10058 /****
       
 10059  *USINT_TO_DWORD
       
 10060  */
       
 10061     case function_usint_to_dword :
       
 10062     {
       
 10063         symbol_c *last_type_symbol = NULL;
       
 10064 
       
 10065         {
       
 10066             identifier_c param_name("IN");
       
 10067             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10068             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10069             symbol_c *IN_type_symbol = NULL;
       
 10070             
       
 10071             /* Get the value from a foo(<param_value>) style call */
       
 10072             if (IN_param_value == NULL)
       
 10073               IN_param_value = function_call_param_iterator.next();
       
 10074             if (IN_param_value != NULL) {
       
 10075               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10076               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10077             }
       
 10078             
       
 10079             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10080             {
       
 10081         
       
 10082                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10083                 return return_type_symbol;
       
 10084                 
       
 10085             }
       
 10086             
       
 10087             
       
 10088             ERROR;
       
 10089         }
       
 10090         
       
 10091     }/*function_usint_to_dword*/
       
 10092     break;
       
 10093 
       
 10094 /****
       
 10095  *USINT_TO_DT
       
 10096  */
       
 10097     case function_usint_to_dt :
       
 10098     {
       
 10099         symbol_c *last_type_symbol = NULL;
       
 10100 
       
 10101         {
       
 10102             identifier_c param_name("IN");
       
 10103             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10104             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10105             symbol_c *IN_type_symbol = NULL;
       
 10106             
       
 10107             /* Get the value from a foo(<param_value>) style call */
       
 10108             if (IN_param_value == NULL)
       
 10109               IN_param_value = function_call_param_iterator.next();
       
 10110             if (IN_param_value != NULL) {
       
 10111               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10112               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10113             }
       
 10114             
       
 10115             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10116             {
       
 10117         
       
 10118                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10119                 return return_type_symbol;
       
 10120                 
       
 10121             }
       
 10122             
       
 10123             
       
 10124             ERROR;
       
 10125         }
       
 10126         
       
 10127     }/*function_usint_to_dt*/
       
 10128     break;
       
 10129 
       
 10130 /****
       
 10131  *USINT_TO_TOD
       
 10132  */
       
 10133     case function_usint_to_tod :
       
 10134     {
       
 10135         symbol_c *last_type_symbol = NULL;
       
 10136 
       
 10137         {
       
 10138             identifier_c param_name("IN");
       
 10139             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10140             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10141             symbol_c *IN_type_symbol = NULL;
       
 10142             
       
 10143             /* Get the value from a foo(<param_value>) style call */
       
 10144             if (IN_param_value == NULL)
       
 10145               IN_param_value = function_call_param_iterator.next();
       
 10146             if (IN_param_value != NULL) {
       
 10147               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10148               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10149             }
       
 10150             
       
 10151             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10152             {
       
 10153         
       
 10154                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10155                 return return_type_symbol;
       
 10156                 
       
 10157             }
       
 10158             
       
 10159             
       
 10160             ERROR;
       
 10161         }
       
 10162         
       
 10163     }/*function_usint_to_tod*/
       
 10164     break;
       
 10165 
       
 10166 /****
       
 10167  *USINT_TO_UDINT
       
 10168  */
       
 10169     case function_usint_to_udint :
       
 10170     {
       
 10171         symbol_c *last_type_symbol = NULL;
       
 10172 
       
 10173         {
       
 10174             identifier_c param_name("IN");
       
 10175             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10176             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10177             symbol_c *IN_type_symbol = NULL;
       
 10178             
       
 10179             /* Get the value from a foo(<param_value>) style call */
       
 10180             if (IN_param_value == NULL)
       
 10181               IN_param_value = function_call_param_iterator.next();
       
 10182             if (IN_param_value != NULL) {
       
 10183               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10184               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10185             }
       
 10186             
       
 10187             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10188             {
       
 10189         
       
 10190                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10191                 return return_type_symbol;
       
 10192                 
       
 10193             }
       
 10194             
       
 10195             
       
 10196             ERROR;
       
 10197         }
       
 10198         
       
 10199     }/*function_usint_to_udint*/
       
 10200     break;
       
 10201 
       
 10202 /****
       
 10203  *USINT_TO_WORD
       
 10204  */
       
 10205     case function_usint_to_word :
       
 10206     {
       
 10207         symbol_c *last_type_symbol = NULL;
       
 10208 
       
 10209         {
       
 10210             identifier_c param_name("IN");
       
 10211             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10212             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10213             symbol_c *IN_type_symbol = NULL;
       
 10214             
       
 10215             /* Get the value from a foo(<param_value>) style call */
       
 10216             if (IN_param_value == NULL)
       
 10217               IN_param_value = function_call_param_iterator.next();
       
 10218             if (IN_param_value != NULL) {
       
 10219               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10220               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10221             }
       
 10222             
       
 10223             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10224             {
       
 10225         
       
 10226                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10227                 return return_type_symbol;
       
 10228                 
       
 10229             }
       
 10230             
       
 10231             
       
 10232             ERROR;
       
 10233         }
       
 10234         
       
 10235     }/*function_usint_to_word*/
       
 10236     break;
       
 10237 
       
 10238 /****
       
 10239  *USINT_TO_STRING
       
 10240  */
       
 10241     case function_usint_to_string :
       
 10242     {
       
 10243         symbol_c *last_type_symbol = NULL;
       
 10244 
       
 10245         {
       
 10246             identifier_c param_name("IN");
       
 10247             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10248             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10249             symbol_c *IN_type_symbol = NULL;
       
 10250             
       
 10251             /* Get the value from a foo(<param_value>) style call */
       
 10252             if (IN_param_value == NULL)
       
 10253               IN_param_value = function_call_param_iterator.next();
       
 10254             if (IN_param_value != NULL) {
       
 10255               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10256               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10257             }
       
 10258             
       
 10259             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10260             {
       
 10261         
       
 10262                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10263                 return return_type_symbol;
       
 10264                 
       
 10265             }
       
 10266             
       
 10267             
       
 10268             ERROR;
       
 10269         }
       
 10270         
       
 10271     }/*function_usint_to_string*/
       
 10272     break;
       
 10273 
       
 10274 /****
       
 10275  *USINT_TO_LWORD
       
 10276  */
       
 10277     case function_usint_to_lword :
       
 10278     {
       
 10279         symbol_c *last_type_symbol = NULL;
       
 10280 
       
 10281         {
       
 10282             identifier_c param_name("IN");
       
 10283             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10284             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10285             symbol_c *IN_type_symbol = NULL;
       
 10286             
       
 10287             /* Get the value from a foo(<param_value>) style call */
       
 10288             if (IN_param_value == NULL)
       
 10289               IN_param_value = function_call_param_iterator.next();
       
 10290             if (IN_param_value != NULL) {
       
 10291               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10292               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10293             }
       
 10294             
       
 10295             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10296             {
       
 10297         
       
 10298                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10299                 return return_type_symbol;
       
 10300                 
       
 10301             }
       
 10302             
       
 10303             
       
 10304             ERROR;
       
 10305         }
       
 10306         
       
 10307     }/*function_usint_to_lword*/
       
 10308     break;
       
 10309 
       
 10310 /****
       
 10311  *USINT_TO_UINT
       
 10312  */
       
 10313     case function_usint_to_uint :
       
 10314     {
       
 10315         symbol_c *last_type_symbol = NULL;
       
 10316 
       
 10317         {
       
 10318             identifier_c param_name("IN");
       
 10319             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10320             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10321             symbol_c *IN_type_symbol = NULL;
       
 10322             
       
 10323             /* Get the value from a foo(<param_value>) style call */
       
 10324             if (IN_param_value == NULL)
       
 10325               IN_param_value = function_call_param_iterator.next();
       
 10326             if (IN_param_value != NULL) {
       
 10327               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10328               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10329             }
       
 10330             
       
 10331             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10332             {
       
 10333         
       
 10334                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10335                 return return_type_symbol;
       
 10336                 
       
 10337             }
       
 10338             
       
 10339             
       
 10340             ERROR;
       
 10341         }
       
 10342         
       
 10343     }/*function_usint_to_uint*/
       
 10344     break;
       
 10345 
       
 10346 /****
       
 10347  *USINT_TO_LREAL
       
 10348  */
       
 10349     case function_usint_to_lreal :
       
 10350     {
       
 10351         symbol_c *last_type_symbol = NULL;
       
 10352 
       
 10353         {
       
 10354             identifier_c param_name("IN");
       
 10355             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10356             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10357             symbol_c *IN_type_symbol = NULL;
       
 10358             
       
 10359             /* Get the value from a foo(<param_value>) style call */
       
 10360             if (IN_param_value == NULL)
       
 10361               IN_param_value = function_call_param_iterator.next();
       
 10362             if (IN_param_value != NULL) {
       
 10363               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10364               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10365             }
       
 10366             
       
 10367             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10368             {
       
 10369         
       
 10370                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10371                 return return_type_symbol;
       
 10372                 
       
 10373             }
       
 10374             
       
 10375             
       
 10376             ERROR;
       
 10377         }
       
 10378         
       
 10379     }/*function_usint_to_lreal*/
       
 10380     break;
       
 10381 
       
 10382 /****
       
 10383  *USINT_TO_BYTE
       
 10384  */
       
 10385     case function_usint_to_byte :
       
 10386     {
       
 10387         symbol_c *last_type_symbol = NULL;
       
 10388 
       
 10389         {
       
 10390             identifier_c param_name("IN");
       
 10391             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10392             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10393             symbol_c *IN_type_symbol = NULL;
       
 10394             
       
 10395             /* Get the value from a foo(<param_value>) style call */
       
 10396             if (IN_param_value == NULL)
       
 10397               IN_param_value = function_call_param_iterator.next();
       
 10398             if (IN_param_value != NULL) {
       
 10399               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10400               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10401             }
       
 10402             
       
 10403             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10404             {
       
 10405         
       
 10406                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10407                 return return_type_symbol;
       
 10408                 
       
 10409             }
       
 10410             
       
 10411             
       
 10412             ERROR;
       
 10413         }
       
 10414         
       
 10415     }/*function_usint_to_byte*/
       
 10416     break;
       
 10417 
       
 10418 /****
       
 10419  *USINT_TO_ULINT
       
 10420  */
       
 10421     case function_usint_to_ulint :
       
 10422     {
       
 10423         symbol_c *last_type_symbol = NULL;
       
 10424 
       
 10425         {
       
 10426             identifier_c param_name("IN");
       
 10427             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10428             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10429             symbol_c *IN_type_symbol = NULL;
       
 10430             
       
 10431             /* Get the value from a foo(<param_value>) style call */
       
 10432             if (IN_param_value == NULL)
       
 10433               IN_param_value = function_call_param_iterator.next();
       
 10434             if (IN_param_value != NULL) {
       
 10435               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10436               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10437             }
       
 10438             
       
 10439             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10440             {
       
 10441         
       
 10442                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10443                 return return_type_symbol;
       
 10444                 
       
 10445             }
       
 10446             
       
 10447             
       
 10448             ERROR;
       
 10449         }
       
 10450         
       
 10451     }/*function_usint_to_ulint*/
       
 10452     break;
       
 10453 
       
 10454 /****
       
 10455  *USINT_TO_BOOL
       
 10456  */
       
 10457     case function_usint_to_bool :
       
 10458     {
       
 10459         symbol_c *last_type_symbol = NULL;
       
 10460 
       
 10461         {
       
 10462             identifier_c param_name("IN");
       
 10463             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10464             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10465             symbol_c *IN_type_symbol = NULL;
       
 10466             
       
 10467             /* Get the value from a foo(<param_value>) style call */
       
 10468             if (IN_param_value == NULL)
       
 10469               IN_param_value = function_call_param_iterator.next();
       
 10470             if (IN_param_value != NULL) {
       
 10471               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10472               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10473             }
       
 10474             
       
 10475             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10476             {
       
 10477         
       
 10478                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10479                 return return_type_symbol;
       
 10480                 
       
 10481             }
       
 10482             
       
 10483             
       
 10484             ERROR;
       
 10485         }
       
 10486         
       
 10487     }/*function_usint_to_bool*/
       
 10488     break;
       
 10489 
       
 10490 /****
       
 10491  *USINT_TO_TIME
       
 10492  */
       
 10493     case function_usint_to_time :
       
 10494     {
       
 10495         symbol_c *last_type_symbol = NULL;
       
 10496 
       
 10497         {
       
 10498             identifier_c param_name("IN");
       
 10499             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10500             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10501             symbol_c *IN_type_symbol = NULL;
       
 10502             
       
 10503             /* Get the value from a foo(<param_value>) style call */
       
 10504             if (IN_param_value == NULL)
       
 10505               IN_param_value = function_call_param_iterator.next();
       
 10506             if (IN_param_value != NULL) {
       
 10507               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10508               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10509             }
       
 10510             
       
 10511             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10512             {
       
 10513         
       
 10514                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10515                 return return_type_symbol;
       
 10516                 
       
 10517             }
       
 10518             
       
 10519             
       
 10520             ERROR;
       
 10521         }
       
 10522         
       
 10523     }/*function_usint_to_time*/
       
 10524     break;
       
 10525 
       
 10526 /****
       
 10527  *USINT_TO_INT
       
 10528  */
       
 10529     case function_usint_to_int :
       
 10530     {
       
 10531         symbol_c *last_type_symbol = NULL;
       
 10532 
       
 10533         {
       
 10534             identifier_c param_name("IN");
       
 10535             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10536             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10537             symbol_c *IN_type_symbol = NULL;
       
 10538             
       
 10539             /* Get the value from a foo(<param_value>) style call */
       
 10540             if (IN_param_value == NULL)
       
 10541               IN_param_value = function_call_param_iterator.next();
       
 10542             if (IN_param_value != NULL) {
       
 10543               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10544               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10545             }
       
 10546             
       
 10547             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 10548             {
       
 10549         
       
 10550                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10551                 return return_type_symbol;
       
 10552                 
       
 10553             }
       
 10554             
       
 10555             
       
 10556             ERROR;
       
 10557         }
       
 10558         
       
 10559     }/*function_usint_to_int*/
       
 10560     break;
       
 10561 
       
 10562 /****
       
 10563  *ULINT_TO_REAL
       
 10564  */
       
 10565     case function_ulint_to_real :
       
 10566     {
       
 10567         symbol_c *last_type_symbol = NULL;
       
 10568 
       
 10569         {
       
 10570             identifier_c param_name("IN");
       
 10571             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10572             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10573             symbol_c *IN_type_symbol = NULL;
       
 10574             
       
 10575             /* Get the value from a foo(<param_value>) style call */
       
 10576             if (IN_param_value == NULL)
       
 10577               IN_param_value = function_call_param_iterator.next();
       
 10578             if (IN_param_value != NULL) {
       
 10579               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10580               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10581             }
       
 10582             
       
 10583             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10584             {
       
 10585         
       
 10586                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10587                 return return_type_symbol;
       
 10588                 
       
 10589             }
       
 10590             
       
 10591             
       
 10592             ERROR;
       
 10593         }
       
 10594         
       
 10595     }/*function_ulint_to_real*/
       
 10596     break;
       
 10597 
       
 10598 /****
       
 10599  *ULINT_TO_SINT
       
 10600  */
       
 10601     case function_ulint_to_sint :
       
 10602     {
       
 10603         symbol_c *last_type_symbol = NULL;
       
 10604 
       
 10605         {
       
 10606             identifier_c param_name("IN");
       
 10607             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10608             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10609             symbol_c *IN_type_symbol = NULL;
       
 10610             
       
 10611             /* Get the value from a foo(<param_value>) style call */
       
 10612             if (IN_param_value == NULL)
       
 10613               IN_param_value = function_call_param_iterator.next();
       
 10614             if (IN_param_value != NULL) {
       
 10615               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10616               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10617             }
       
 10618             
       
 10619             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10620             {
       
 10621         
       
 10622                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10623                 return return_type_symbol;
       
 10624                 
       
 10625             }
       
 10626             
       
 10627             
       
 10628             ERROR;
       
 10629         }
       
 10630         
       
 10631     }/*function_ulint_to_sint*/
       
 10632     break;
       
 10633 
       
 10634 /****
       
 10635  *ULINT_TO_LINT
       
 10636  */
       
 10637     case function_ulint_to_lint :
       
 10638     {
       
 10639         symbol_c *last_type_symbol = NULL;
       
 10640 
       
 10641         {
       
 10642             identifier_c param_name("IN");
       
 10643             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10644             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10645             symbol_c *IN_type_symbol = NULL;
       
 10646             
       
 10647             /* Get the value from a foo(<param_value>) style call */
       
 10648             if (IN_param_value == NULL)
       
 10649               IN_param_value = function_call_param_iterator.next();
       
 10650             if (IN_param_value != NULL) {
       
 10651               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10652               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10653             }
       
 10654             
       
 10655             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10656             {
       
 10657         
       
 10658                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10659                 return return_type_symbol;
       
 10660                 
       
 10661             }
       
 10662             
       
 10663             
       
 10664             ERROR;
       
 10665         }
       
 10666         
       
 10667     }/*function_ulint_to_lint*/
       
 10668     break;
       
 10669 
       
 10670 /****
       
 10671  *ULINT_TO_DINT
       
 10672  */
       
 10673     case function_ulint_to_dint :
       
 10674     {
       
 10675         symbol_c *last_type_symbol = NULL;
       
 10676 
       
 10677         {
       
 10678             identifier_c param_name("IN");
       
 10679             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10680             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10681             symbol_c *IN_type_symbol = NULL;
       
 10682             
       
 10683             /* Get the value from a foo(<param_value>) style call */
       
 10684             if (IN_param_value == NULL)
       
 10685               IN_param_value = function_call_param_iterator.next();
       
 10686             if (IN_param_value != NULL) {
       
 10687               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10688               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10689             }
       
 10690             
       
 10691             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10692             {
       
 10693         
       
 10694                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10695                 return return_type_symbol;
       
 10696                 
       
 10697             }
       
 10698             
       
 10699             
       
 10700             ERROR;
       
 10701         }
       
 10702         
       
 10703     }/*function_ulint_to_dint*/
       
 10704     break;
       
 10705 
       
 10706 /****
       
 10707  *ULINT_TO_DATE
       
 10708  */
       
 10709     case function_ulint_to_date :
       
 10710     {
       
 10711         symbol_c *last_type_symbol = NULL;
       
 10712 
       
 10713         {
       
 10714             identifier_c param_name("IN");
       
 10715             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10716             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10717             symbol_c *IN_type_symbol = NULL;
       
 10718             
       
 10719             /* Get the value from a foo(<param_value>) style call */
       
 10720             if (IN_param_value == NULL)
       
 10721               IN_param_value = function_call_param_iterator.next();
       
 10722             if (IN_param_value != NULL) {
       
 10723               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10724               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10725             }
       
 10726             
       
 10727             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10728             {
       
 10729         
       
 10730                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10731                 return return_type_symbol;
       
 10732                 
       
 10733             }
       
 10734             
       
 10735             
       
 10736             ERROR;
       
 10737         }
       
 10738         
       
 10739     }/*function_ulint_to_date*/
       
 10740     break;
       
 10741 
       
 10742 /****
       
 10743  *ULINT_TO_DWORD
       
 10744  */
       
 10745     case function_ulint_to_dword :
       
 10746     {
       
 10747         symbol_c *last_type_symbol = NULL;
       
 10748 
       
 10749         {
       
 10750             identifier_c param_name("IN");
       
 10751             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10752             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10753             symbol_c *IN_type_symbol = NULL;
       
 10754             
       
 10755             /* Get the value from a foo(<param_value>) style call */
       
 10756             if (IN_param_value == NULL)
       
 10757               IN_param_value = function_call_param_iterator.next();
       
 10758             if (IN_param_value != NULL) {
       
 10759               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10760               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10761             }
       
 10762             
       
 10763             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10764             {
       
 10765         
       
 10766                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10767                 return return_type_symbol;
       
 10768                 
       
 10769             }
       
 10770             
       
 10771             
       
 10772             ERROR;
       
 10773         }
       
 10774         
       
 10775     }/*function_ulint_to_dword*/
       
 10776     break;
       
 10777 
       
 10778 /****
       
 10779  *ULINT_TO_DT
       
 10780  */
       
 10781     case function_ulint_to_dt :
       
 10782     {
       
 10783         symbol_c *last_type_symbol = NULL;
       
 10784 
       
 10785         {
       
 10786             identifier_c param_name("IN");
       
 10787             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10788             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10789             symbol_c *IN_type_symbol = NULL;
       
 10790             
       
 10791             /* Get the value from a foo(<param_value>) style call */
       
 10792             if (IN_param_value == NULL)
       
 10793               IN_param_value = function_call_param_iterator.next();
       
 10794             if (IN_param_value != NULL) {
       
 10795               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10796               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10797             }
       
 10798             
       
 10799             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10800             {
       
 10801         
       
 10802                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10803                 return return_type_symbol;
       
 10804                 
       
 10805             }
       
 10806             
       
 10807             
       
 10808             ERROR;
       
 10809         }
       
 10810         
       
 10811     }/*function_ulint_to_dt*/
       
 10812     break;
       
 10813 
       
 10814 /****
       
 10815  *ULINT_TO_TOD
       
 10816  */
       
 10817     case function_ulint_to_tod :
       
 10818     {
       
 10819         symbol_c *last_type_symbol = NULL;
       
 10820 
       
 10821         {
       
 10822             identifier_c param_name("IN");
       
 10823             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10824             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10825             symbol_c *IN_type_symbol = NULL;
       
 10826             
       
 10827             /* Get the value from a foo(<param_value>) style call */
       
 10828             if (IN_param_value == NULL)
       
 10829               IN_param_value = function_call_param_iterator.next();
       
 10830             if (IN_param_value != NULL) {
       
 10831               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10832               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10833             }
       
 10834             
       
 10835             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10836             {
       
 10837         
       
 10838                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10839                 return return_type_symbol;
       
 10840                 
       
 10841             }
       
 10842             
       
 10843             
       
 10844             ERROR;
       
 10845         }
       
 10846         
       
 10847     }/*function_ulint_to_tod*/
       
 10848     break;
       
 10849 
       
 10850 /****
       
 10851  *ULINT_TO_UDINT
       
 10852  */
       
 10853     case function_ulint_to_udint :
       
 10854     {
       
 10855         symbol_c *last_type_symbol = NULL;
       
 10856 
       
 10857         {
       
 10858             identifier_c param_name("IN");
       
 10859             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10860             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10861             symbol_c *IN_type_symbol = NULL;
       
 10862             
       
 10863             /* Get the value from a foo(<param_value>) style call */
       
 10864             if (IN_param_value == NULL)
       
 10865               IN_param_value = function_call_param_iterator.next();
       
 10866             if (IN_param_value != NULL) {
       
 10867               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10868               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10869             }
       
 10870             
       
 10871             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10872             {
       
 10873         
       
 10874                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10875                 return return_type_symbol;
       
 10876                 
       
 10877             }
       
 10878             
       
 10879             
       
 10880             ERROR;
       
 10881         }
       
 10882         
       
 10883     }/*function_ulint_to_udint*/
       
 10884     break;
       
 10885 
       
 10886 /****
       
 10887  *ULINT_TO_WORD
       
 10888  */
       
 10889     case function_ulint_to_word :
       
 10890     {
       
 10891         symbol_c *last_type_symbol = NULL;
       
 10892 
       
 10893         {
       
 10894             identifier_c param_name("IN");
       
 10895             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10896             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10897             symbol_c *IN_type_symbol = NULL;
       
 10898             
       
 10899             /* Get the value from a foo(<param_value>) style call */
       
 10900             if (IN_param_value == NULL)
       
 10901               IN_param_value = function_call_param_iterator.next();
       
 10902             if (IN_param_value != NULL) {
       
 10903               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10904               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10905             }
       
 10906             
       
 10907             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10908             {
       
 10909         
       
 10910                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10911                 return return_type_symbol;
       
 10912                 
       
 10913             }
       
 10914             
       
 10915             
       
 10916             ERROR;
       
 10917         }
       
 10918         
       
 10919     }/*function_ulint_to_word*/
       
 10920     break;
       
 10921 
       
 10922 /****
       
 10923  *ULINT_TO_STRING
       
 10924  */
       
 10925     case function_ulint_to_string :
       
 10926     {
       
 10927         symbol_c *last_type_symbol = NULL;
       
 10928 
       
 10929         {
       
 10930             identifier_c param_name("IN");
       
 10931             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10932             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10933             symbol_c *IN_type_symbol = NULL;
       
 10934             
       
 10935             /* Get the value from a foo(<param_value>) style call */
       
 10936             if (IN_param_value == NULL)
       
 10937               IN_param_value = function_call_param_iterator.next();
       
 10938             if (IN_param_value != NULL) {
       
 10939               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10940               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10941             }
       
 10942             
       
 10943             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10944             {
       
 10945         
       
 10946                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10947                 return return_type_symbol;
       
 10948                 
       
 10949             }
       
 10950             
       
 10951             
       
 10952             ERROR;
       
 10953         }
       
 10954         
       
 10955     }/*function_ulint_to_string*/
       
 10956     break;
       
 10957 
       
 10958 /****
       
 10959  *ULINT_TO_LWORD
       
 10960  */
       
 10961     case function_ulint_to_lword :
       
 10962     {
       
 10963         symbol_c *last_type_symbol = NULL;
       
 10964 
       
 10965         {
       
 10966             identifier_c param_name("IN");
       
 10967             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10968             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10969             symbol_c *IN_type_symbol = NULL;
       
 10970             
       
 10971             /* Get the value from a foo(<param_value>) style call */
       
 10972             if (IN_param_value == NULL)
       
 10973               IN_param_value = function_call_param_iterator.next();
       
 10974             if (IN_param_value != NULL) {
       
 10975               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10976               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10977             }
       
 10978             
       
 10979             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10980             {
       
 10981         
       
 10982                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10983                 return return_type_symbol;
       
 10984                 
       
 10985             }
       
 10986             
       
 10987             
       
 10988             ERROR;
       
 10989         }
       
 10990         
       
 10991     }/*function_ulint_to_lword*/
       
 10992     break;
       
 10993 
       
 10994 /****
       
 10995  *ULINT_TO_UINT
       
 10996  */
       
 10997     case function_ulint_to_uint :
       
 10998     {
       
 10999         symbol_c *last_type_symbol = NULL;
       
 11000 
       
 11001         {
       
 11002             identifier_c param_name("IN");
       
 11003             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11004             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11005             symbol_c *IN_type_symbol = NULL;
       
 11006             
       
 11007             /* Get the value from a foo(<param_value>) style call */
       
 11008             if (IN_param_value == NULL)
       
 11009               IN_param_value = function_call_param_iterator.next();
       
 11010             if (IN_param_value != NULL) {
       
 11011               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11012               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11013             }
       
 11014             
       
 11015             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 11016             {
       
 11017         
       
 11018                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11019                 return return_type_symbol;
       
 11020                 
       
 11021             }
       
 11022             
       
 11023             
       
 11024             ERROR;
       
 11025         }
       
 11026         
       
 11027     }/*function_ulint_to_uint*/
       
 11028     break;
       
 11029 
       
 11030 /****
       
 11031  *ULINT_TO_LREAL
       
 11032  */
       
 11033     case function_ulint_to_lreal :
       
 11034     {
       
 11035         symbol_c *last_type_symbol = NULL;
       
 11036 
       
 11037         {
       
 11038             identifier_c param_name("IN");
       
 11039             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11040             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11041             symbol_c *IN_type_symbol = NULL;
       
 11042             
       
 11043             /* Get the value from a foo(<param_value>) style call */
       
 11044             if (IN_param_value == NULL)
       
 11045               IN_param_value = function_call_param_iterator.next();
       
 11046             if (IN_param_value != NULL) {
       
 11047               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11048               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11049             }
       
 11050             
       
 11051             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 11052             {
       
 11053         
       
 11054                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11055                 return return_type_symbol;
       
 11056                 
       
 11057             }
       
 11058             
       
 11059             
       
 11060             ERROR;
       
 11061         }
       
 11062         
       
 11063     }/*function_ulint_to_lreal*/
       
 11064     break;
       
 11065 
       
 11066 /****
       
 11067  *ULINT_TO_BYTE
       
 11068  */
       
 11069     case function_ulint_to_byte :
       
 11070     {
       
 11071         symbol_c *last_type_symbol = NULL;
       
 11072 
       
 11073         {
       
 11074             identifier_c param_name("IN");
       
 11075             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11076             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11077             symbol_c *IN_type_symbol = NULL;
       
 11078             
       
 11079             /* Get the value from a foo(<param_value>) style call */
       
 11080             if (IN_param_value == NULL)
       
 11081               IN_param_value = function_call_param_iterator.next();
       
 11082             if (IN_param_value != NULL) {
       
 11083               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11084               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11085             }
       
 11086             
       
 11087             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 11088             {
       
 11089         
       
 11090                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11091                 return return_type_symbol;
       
 11092                 
       
 11093             }
       
 11094             
       
 11095             
       
 11096             ERROR;
       
 11097         }
       
 11098         
       
 11099     }/*function_ulint_to_byte*/
       
 11100     break;
       
 11101 
       
 11102 /****
       
 11103  *ULINT_TO_USINT
       
 11104  */
       
 11105     case function_ulint_to_usint :
       
 11106     {
       
 11107         symbol_c *last_type_symbol = NULL;
       
 11108 
       
 11109         {
       
 11110             identifier_c param_name("IN");
       
 11111             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11112             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11113             symbol_c *IN_type_symbol = NULL;
       
 11114             
       
 11115             /* Get the value from a foo(<param_value>) style call */
       
 11116             if (IN_param_value == NULL)
       
 11117               IN_param_value = function_call_param_iterator.next();
       
 11118             if (IN_param_value != NULL) {
       
 11119               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11120               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11121             }
       
 11122             
       
 11123             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 11124             {
       
 11125         
       
 11126                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11127                 return return_type_symbol;
       
 11128                 
       
 11129             }
       
 11130             
       
 11131             
       
 11132             ERROR;
       
 11133         }
       
 11134         
       
 11135     }/*function_ulint_to_usint*/
       
 11136     break;
       
 11137 
       
 11138 /****
       
 11139  *ULINT_TO_BOOL
       
 11140  */
       
 11141     case function_ulint_to_bool :
       
 11142     {
       
 11143         symbol_c *last_type_symbol = NULL;
       
 11144 
       
 11145         {
       
 11146             identifier_c param_name("IN");
       
 11147             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11148             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11149             symbol_c *IN_type_symbol = NULL;
       
 11150             
       
 11151             /* Get the value from a foo(<param_value>) style call */
       
 11152             if (IN_param_value == NULL)
       
 11153               IN_param_value = function_call_param_iterator.next();
       
 11154             if (IN_param_value != NULL) {
       
 11155               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11156               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11157             }
       
 11158             
       
 11159             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 11160             {
       
 11161         
       
 11162                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11163                 return return_type_symbol;
       
 11164                 
       
 11165             }
       
 11166             
       
 11167             
       
 11168             ERROR;
       
 11169         }
       
 11170         
       
 11171     }/*function_ulint_to_bool*/
       
 11172     break;
       
 11173 
       
 11174 /****
       
 11175  *ULINT_TO_TIME
       
 11176  */
       
 11177     case function_ulint_to_time :
       
 11178     {
       
 11179         symbol_c *last_type_symbol = NULL;
       
 11180 
       
 11181         {
       
 11182             identifier_c param_name("IN");
       
 11183             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11184             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11185             symbol_c *IN_type_symbol = NULL;
       
 11186             
       
 11187             /* Get the value from a foo(<param_value>) style call */
       
 11188             if (IN_param_value == NULL)
       
 11189               IN_param_value = function_call_param_iterator.next();
       
 11190             if (IN_param_value != NULL) {
       
 11191               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11192               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11193             }
       
 11194             
       
 11195             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 11196             {
       
 11197         
       
 11198                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11199                 return return_type_symbol;
       
 11200                 
       
 11201             }
       
 11202             
       
 11203             
       
 11204             ERROR;
       
 11205         }
       
 11206         
       
 11207     }/*function_ulint_to_time*/
       
 11208     break;
       
 11209 
       
 11210 /****
       
 11211  *ULINT_TO_INT
       
 11212  */
       
 11213     case function_ulint_to_int :
       
 11214     {
       
 11215         symbol_c *last_type_symbol = NULL;
       
 11216 
       
 11217         {
       
 11218             identifier_c param_name("IN");
       
 11219             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11220             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11221             symbol_c *IN_type_symbol = NULL;
       
 11222             
       
 11223             /* Get the value from a foo(<param_value>) style call */
       
 11224             if (IN_param_value == NULL)
       
 11225               IN_param_value = function_call_param_iterator.next();
       
 11226             if (IN_param_value != NULL) {
       
 11227               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11228               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11229             }
       
 11230             
       
 11231             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 11232             {
       
 11233         
       
 11234                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11235                 return return_type_symbol;
       
 11236                 
       
 11237             }
       
 11238             
       
 11239             
       
 11240             ERROR;
       
 11241         }
       
 11242         
       
 11243     }/*function_ulint_to_int*/
       
 11244     break;
       
 11245 
       
 11246 /****
       
 11247  *BOOL_TO_REAL
       
 11248  */
       
 11249     case function_bool_to_real :
       
 11250     {
       
 11251         symbol_c *last_type_symbol = NULL;
       
 11252 
       
 11253         {
       
 11254             identifier_c param_name("IN");
       
 11255             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11256             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11257             symbol_c *IN_type_symbol = NULL;
       
 11258             
       
 11259             /* Get the value from a foo(<param_value>) style call */
       
 11260             if (IN_param_value == NULL)
       
 11261               IN_param_value = function_call_param_iterator.next();
       
 11262             if (IN_param_value != NULL) {
       
 11263               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11264               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11265             }
       
 11266             
       
 11267             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11268             {
       
 11269         
       
 11270                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11271                 return return_type_symbol;
       
 11272                 
       
 11273             }
       
 11274             
       
 11275             
       
 11276             ERROR;
       
 11277         }
       
 11278         
       
 11279     }/*function_bool_to_real*/
       
 11280     break;
       
 11281 
       
 11282 /****
       
 11283  *BOOL_TO_SINT
       
 11284  */
       
 11285     case function_bool_to_sint :
       
 11286     {
       
 11287         symbol_c *last_type_symbol = NULL;
       
 11288 
       
 11289         {
       
 11290             identifier_c param_name("IN");
       
 11291             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11292             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11293             symbol_c *IN_type_symbol = NULL;
       
 11294             
       
 11295             /* Get the value from a foo(<param_value>) style call */
       
 11296             if (IN_param_value == NULL)
       
 11297               IN_param_value = function_call_param_iterator.next();
       
 11298             if (IN_param_value != NULL) {
       
 11299               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11300               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11301             }
       
 11302             
       
 11303             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11304             {
       
 11305         
       
 11306                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11307                 return return_type_symbol;
       
 11308                 
       
 11309             }
       
 11310             
       
 11311             
       
 11312             ERROR;
       
 11313         }
       
 11314         
       
 11315     }/*function_bool_to_sint*/
       
 11316     break;
       
 11317 
       
 11318 /****
       
 11319  *BOOL_TO_LINT
       
 11320  */
       
 11321     case function_bool_to_lint :
       
 11322     {
       
 11323         symbol_c *last_type_symbol = NULL;
       
 11324 
       
 11325         {
       
 11326             identifier_c param_name("IN");
       
 11327             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11328             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11329             symbol_c *IN_type_symbol = NULL;
       
 11330             
       
 11331             /* Get the value from a foo(<param_value>) style call */
       
 11332             if (IN_param_value == NULL)
       
 11333               IN_param_value = function_call_param_iterator.next();
       
 11334             if (IN_param_value != NULL) {
       
 11335               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11336               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11337             }
       
 11338             
       
 11339             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11340             {
       
 11341         
       
 11342                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11343                 return return_type_symbol;
       
 11344                 
       
 11345             }
       
 11346             
       
 11347             
       
 11348             ERROR;
       
 11349         }
       
 11350         
       
 11351     }/*function_bool_to_lint*/
       
 11352     break;
       
 11353 
       
 11354 /****
       
 11355  *BOOL_TO_DINT
       
 11356  */
       
 11357     case function_bool_to_dint :
       
 11358     {
       
 11359         symbol_c *last_type_symbol = NULL;
       
 11360 
       
 11361         {
       
 11362             identifier_c param_name("IN");
       
 11363             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11364             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11365             symbol_c *IN_type_symbol = NULL;
       
 11366             
       
 11367             /* Get the value from a foo(<param_value>) style call */
       
 11368             if (IN_param_value == NULL)
       
 11369               IN_param_value = function_call_param_iterator.next();
       
 11370             if (IN_param_value != NULL) {
       
 11371               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11372               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11373             }
       
 11374             
       
 11375             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11376             {
       
 11377         
       
 11378                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11379                 return return_type_symbol;
       
 11380                 
       
 11381             }
       
 11382             
       
 11383             
       
 11384             ERROR;
       
 11385         }
       
 11386         
       
 11387     }/*function_bool_to_dint*/
       
 11388     break;
       
 11389 
       
 11390 /****
       
 11391  *BOOL_TO_DATE
       
 11392  */
       
 11393     case function_bool_to_date :
       
 11394     {
       
 11395         symbol_c *last_type_symbol = NULL;
       
 11396 
       
 11397         {
       
 11398             identifier_c param_name("IN");
       
 11399             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11400             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11401             symbol_c *IN_type_symbol = NULL;
       
 11402             
       
 11403             /* Get the value from a foo(<param_value>) style call */
       
 11404             if (IN_param_value == NULL)
       
 11405               IN_param_value = function_call_param_iterator.next();
       
 11406             if (IN_param_value != NULL) {
       
 11407               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11408               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11409             }
       
 11410             
       
 11411             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11412             {
       
 11413         
       
 11414                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11415                 return return_type_symbol;
       
 11416                 
       
 11417             }
       
 11418             
       
 11419             
       
 11420             ERROR;
       
 11421         }
       
 11422         
       
 11423     }/*function_bool_to_date*/
       
 11424     break;
       
 11425 
       
 11426 /****
       
 11427  *BOOL_TO_DWORD
       
 11428  */
       
 11429     case function_bool_to_dword :
       
 11430     {
       
 11431         symbol_c *last_type_symbol = NULL;
       
 11432 
       
 11433         {
       
 11434             identifier_c param_name("IN");
       
 11435             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11436             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11437             symbol_c *IN_type_symbol = NULL;
       
 11438             
       
 11439             /* Get the value from a foo(<param_value>) style call */
       
 11440             if (IN_param_value == NULL)
       
 11441               IN_param_value = function_call_param_iterator.next();
       
 11442             if (IN_param_value != NULL) {
       
 11443               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11444               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11445             }
       
 11446             
       
 11447             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11448             {
       
 11449         
       
 11450                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11451                 return return_type_symbol;
       
 11452                 
       
 11453             }
       
 11454             
       
 11455             
       
 11456             ERROR;
       
 11457         }
       
 11458         
       
 11459     }/*function_bool_to_dword*/
       
 11460     break;
       
 11461 
       
 11462 /****
       
 11463  *BOOL_TO_DT
       
 11464  */
       
 11465     case function_bool_to_dt :
       
 11466     {
       
 11467         symbol_c *last_type_symbol = NULL;
       
 11468 
       
 11469         {
       
 11470             identifier_c param_name("IN");
       
 11471             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11472             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11473             symbol_c *IN_type_symbol = NULL;
       
 11474             
       
 11475             /* Get the value from a foo(<param_value>) style call */
       
 11476             if (IN_param_value == NULL)
       
 11477               IN_param_value = function_call_param_iterator.next();
       
 11478             if (IN_param_value != NULL) {
       
 11479               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11480               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11481             }
       
 11482             
       
 11483             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11484             {
       
 11485         
       
 11486                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11487                 return return_type_symbol;
       
 11488                 
       
 11489             }
       
 11490             
       
 11491             
       
 11492             ERROR;
       
 11493         }
       
 11494         
       
 11495     }/*function_bool_to_dt*/
       
 11496     break;
       
 11497 
       
 11498 /****
       
 11499  *BOOL_TO_TOD
       
 11500  */
       
 11501     case function_bool_to_tod :
       
 11502     {
       
 11503         symbol_c *last_type_symbol = NULL;
       
 11504 
       
 11505         {
       
 11506             identifier_c param_name("IN");
       
 11507             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11508             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11509             symbol_c *IN_type_symbol = NULL;
       
 11510             
       
 11511             /* Get the value from a foo(<param_value>) style call */
       
 11512             if (IN_param_value == NULL)
       
 11513               IN_param_value = function_call_param_iterator.next();
       
 11514             if (IN_param_value != NULL) {
       
 11515               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11516               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11517             }
       
 11518             
       
 11519             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11520             {
       
 11521         
       
 11522                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11523                 return return_type_symbol;
       
 11524                 
       
 11525             }
       
 11526             
       
 11527             
       
 11528             ERROR;
       
 11529         }
       
 11530         
       
 11531     }/*function_bool_to_tod*/
       
 11532     break;
       
 11533 
       
 11534 /****
       
 11535  *BOOL_TO_UDINT
       
 11536  */
       
 11537     case function_bool_to_udint :
       
 11538     {
       
 11539         symbol_c *last_type_symbol = NULL;
       
 11540 
       
 11541         {
       
 11542             identifier_c param_name("IN");
       
 11543             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11544             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11545             symbol_c *IN_type_symbol = NULL;
       
 11546             
       
 11547             /* Get the value from a foo(<param_value>) style call */
       
 11548             if (IN_param_value == NULL)
       
 11549               IN_param_value = function_call_param_iterator.next();
       
 11550             if (IN_param_value != NULL) {
       
 11551               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11552               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11553             }
       
 11554             
       
 11555             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11556             {
       
 11557         
       
 11558                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11559                 return return_type_symbol;
       
 11560                 
       
 11561             }
       
 11562             
       
 11563             
       
 11564             ERROR;
       
 11565         }
       
 11566         
       
 11567     }/*function_bool_to_udint*/
       
 11568     break;
       
 11569 
       
 11570 /****
       
 11571  *BOOL_TO_WORD
       
 11572  */
       
 11573     case function_bool_to_word :
       
 11574     {
       
 11575         symbol_c *last_type_symbol = NULL;
       
 11576 
       
 11577         {
       
 11578             identifier_c param_name("IN");
       
 11579             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11580             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11581             symbol_c *IN_type_symbol = NULL;
       
 11582             
       
 11583             /* Get the value from a foo(<param_value>) style call */
       
 11584             if (IN_param_value == NULL)
       
 11585               IN_param_value = function_call_param_iterator.next();
       
 11586             if (IN_param_value != NULL) {
       
 11587               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11588               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11589             }
       
 11590             
       
 11591             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11592             {
       
 11593         
       
 11594                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11595                 return return_type_symbol;
       
 11596                 
       
 11597             }
       
 11598             
       
 11599             
       
 11600             ERROR;
       
 11601         }
       
 11602         
       
 11603     }/*function_bool_to_word*/
       
 11604     break;
       
 11605 
       
 11606 /****
       
 11607  *BOOL_TO_STRING
       
 11608  */
       
 11609     case function_bool_to_string :
       
 11610     {
       
 11611         symbol_c *last_type_symbol = NULL;
       
 11612 
       
 11613         {
       
 11614             identifier_c param_name("IN");
       
 11615             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11616             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11617             symbol_c *IN_type_symbol = NULL;
       
 11618             
       
 11619             /* Get the value from a foo(<param_value>) style call */
       
 11620             if (IN_param_value == NULL)
       
 11621               IN_param_value = function_call_param_iterator.next();
       
 11622             if (IN_param_value != NULL) {
       
 11623               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11624               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11625             }
       
 11626             
       
 11627             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11628             {
       
 11629         
       
 11630                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11631                 return return_type_symbol;
       
 11632                 
       
 11633             }
       
 11634             
       
 11635             
       
 11636             ERROR;
       
 11637         }
       
 11638         
       
 11639     }/*function_bool_to_string*/
       
 11640     break;
       
 11641 
       
 11642 /****
       
 11643  *BOOL_TO_LWORD
       
 11644  */
       
 11645     case function_bool_to_lword :
       
 11646     {
       
 11647         symbol_c *last_type_symbol = NULL;
       
 11648 
       
 11649         {
       
 11650             identifier_c param_name("IN");
       
 11651             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11652             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11653             symbol_c *IN_type_symbol = NULL;
       
 11654             
       
 11655             /* Get the value from a foo(<param_value>) style call */
       
 11656             if (IN_param_value == NULL)
       
 11657               IN_param_value = function_call_param_iterator.next();
       
 11658             if (IN_param_value != NULL) {
       
 11659               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11660               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11661             }
       
 11662             
       
 11663             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11664             {
       
 11665         
       
 11666                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11667                 return return_type_symbol;
       
 11668                 
       
 11669             }
       
 11670             
       
 11671             
       
 11672             ERROR;
       
 11673         }
       
 11674         
       
 11675     }/*function_bool_to_lword*/
       
 11676     break;
       
 11677 
       
 11678 /****
       
 11679  *BOOL_TO_UINT
       
 11680  */
       
 11681     case function_bool_to_uint :
       
 11682     {
       
 11683         symbol_c *last_type_symbol = NULL;
       
 11684 
       
 11685         {
       
 11686             identifier_c param_name("IN");
       
 11687             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11688             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11689             symbol_c *IN_type_symbol = NULL;
       
 11690             
       
 11691             /* Get the value from a foo(<param_value>) style call */
       
 11692             if (IN_param_value == NULL)
       
 11693               IN_param_value = function_call_param_iterator.next();
       
 11694             if (IN_param_value != NULL) {
       
 11695               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11696               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11697             }
       
 11698             
       
 11699             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11700             {
       
 11701         
       
 11702                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11703                 return return_type_symbol;
       
 11704                 
       
 11705             }
       
 11706             
       
 11707             
       
 11708             ERROR;
       
 11709         }
       
 11710         
       
 11711     }/*function_bool_to_uint*/
       
 11712     break;
       
 11713 
       
 11714 /****
       
 11715  *BOOL_TO_LREAL
       
 11716  */
       
 11717     case function_bool_to_lreal :
       
 11718     {
       
 11719         symbol_c *last_type_symbol = NULL;
       
 11720 
       
 11721         {
       
 11722             identifier_c param_name("IN");
       
 11723             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11724             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11725             symbol_c *IN_type_symbol = NULL;
       
 11726             
       
 11727             /* Get the value from a foo(<param_value>) style call */
       
 11728             if (IN_param_value == NULL)
       
 11729               IN_param_value = function_call_param_iterator.next();
       
 11730             if (IN_param_value != NULL) {
       
 11731               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11732               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11733             }
       
 11734             
       
 11735             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11736             {
       
 11737         
       
 11738                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11739                 return return_type_symbol;
       
 11740                 
       
 11741             }
       
 11742             
       
 11743             
       
 11744             ERROR;
       
 11745         }
       
 11746         
       
 11747     }/*function_bool_to_lreal*/
       
 11748     break;
       
 11749 
       
 11750 /****
       
 11751  *BOOL_TO_BYTE
       
 11752  */
       
 11753     case function_bool_to_byte :
       
 11754     {
       
 11755         symbol_c *last_type_symbol = NULL;
       
 11756 
       
 11757         {
       
 11758             identifier_c param_name("IN");
       
 11759             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11760             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11761             symbol_c *IN_type_symbol = NULL;
       
 11762             
       
 11763             /* Get the value from a foo(<param_value>) style call */
       
 11764             if (IN_param_value == NULL)
       
 11765               IN_param_value = function_call_param_iterator.next();
       
 11766             if (IN_param_value != NULL) {
       
 11767               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11768               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11769             }
       
 11770             
       
 11771             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11772             {
       
 11773         
       
 11774                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11775                 return return_type_symbol;
       
 11776                 
       
 11777             }
       
 11778             
       
 11779             
       
 11780             ERROR;
       
 11781         }
       
 11782         
       
 11783     }/*function_bool_to_byte*/
       
 11784     break;
       
 11785 
       
 11786 /****
       
 11787  *BOOL_TO_USINT
       
 11788  */
       
 11789     case function_bool_to_usint :
       
 11790     {
       
 11791         symbol_c *last_type_symbol = NULL;
       
 11792 
       
 11793         {
       
 11794             identifier_c param_name("IN");
       
 11795             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11796             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11797             symbol_c *IN_type_symbol = NULL;
       
 11798             
       
 11799             /* Get the value from a foo(<param_value>) style call */
       
 11800             if (IN_param_value == NULL)
       
 11801               IN_param_value = function_call_param_iterator.next();
       
 11802             if (IN_param_value != NULL) {
       
 11803               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11804               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11805             }
       
 11806             
       
 11807             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11808             {
       
 11809         
       
 11810                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11811                 return return_type_symbol;
       
 11812                 
       
 11813             }
       
 11814             
       
 11815             
       
 11816             ERROR;
       
 11817         }
       
 11818         
       
 11819     }/*function_bool_to_usint*/
       
 11820     break;
       
 11821 
       
 11822 /****
       
 11823  *BOOL_TO_ULINT
       
 11824  */
       
 11825     case function_bool_to_ulint :
       
 11826     {
       
 11827         symbol_c *last_type_symbol = NULL;
       
 11828 
       
 11829         {
       
 11830             identifier_c param_name("IN");
       
 11831             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11832             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11833             symbol_c *IN_type_symbol = NULL;
       
 11834             
       
 11835             /* Get the value from a foo(<param_value>) style call */
       
 11836             if (IN_param_value == NULL)
       
 11837               IN_param_value = function_call_param_iterator.next();
       
 11838             if (IN_param_value != NULL) {
       
 11839               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11840               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11841             }
       
 11842             
       
 11843             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11844             {
       
 11845         
       
 11846                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11847                 return return_type_symbol;
       
 11848                 
       
 11849             }
       
 11850             
       
 11851             
       
 11852             ERROR;
       
 11853         }
       
 11854         
       
 11855     }/*function_bool_to_ulint*/
       
 11856     break;
       
 11857 
       
 11858 /****
       
 11859  *BOOL_TO_TIME
       
 11860  */
       
 11861     case function_bool_to_time :
       
 11862     {
       
 11863         symbol_c *last_type_symbol = NULL;
       
 11864 
       
 11865         {
       
 11866             identifier_c param_name("IN");
       
 11867             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11868             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11869             symbol_c *IN_type_symbol = NULL;
       
 11870             
       
 11871             /* Get the value from a foo(<param_value>) style call */
       
 11872             if (IN_param_value == NULL)
       
 11873               IN_param_value = function_call_param_iterator.next();
       
 11874             if (IN_param_value != NULL) {
       
 11875               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11876               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11877             }
       
 11878             
       
 11879             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11880             {
       
 11881         
       
 11882                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11883                 return return_type_symbol;
       
 11884                 
       
 11885             }
       
 11886             
       
 11887             
       
 11888             ERROR;
       
 11889         }
       
 11890         
       
 11891     }/*function_bool_to_time*/
       
 11892     break;
       
 11893 
       
 11894 /****
       
 11895  *BOOL_TO_INT
       
 11896  */
       
 11897     case function_bool_to_int :
       
 11898     {
       
 11899         symbol_c *last_type_symbol = NULL;
       
 11900 
       
 11901         {
       
 11902             identifier_c param_name("IN");
       
 11903             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11904             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11905             symbol_c *IN_type_symbol = NULL;
       
 11906             
       
 11907             /* Get the value from a foo(<param_value>) style call */
       
 11908             if (IN_param_value == NULL)
       
 11909               IN_param_value = function_call_param_iterator.next();
       
 11910             if (IN_param_value != NULL) {
       
 11911               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11912               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11913             }
       
 11914             
       
 11915             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 11916             {
       
 11917         
       
 11918                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11919                 return return_type_symbol;
       
 11920                 
       
 11921             }
       
 11922             
       
 11923             
       
 11924             ERROR;
       
 11925         }
       
 11926         
       
 11927     }/*function_bool_to_int*/
       
 11928     break;
       
 11929 
       
 11930 /****
       
 11931  *TIME_TO_REAL
       
 11932  */
       
 11933     case function_time_to_real :
       
 11934     {
       
 11935         symbol_c *last_type_symbol = NULL;
       
 11936 
       
 11937         {
       
 11938             identifier_c param_name("IN");
       
 11939             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11940             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11941             symbol_c *IN_type_symbol = NULL;
       
 11942             
       
 11943             /* Get the value from a foo(<param_value>) style call */
       
 11944             if (IN_param_value == NULL)
       
 11945               IN_param_value = function_call_param_iterator.next();
       
 11946             if (IN_param_value != NULL) {
       
 11947               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11948               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11949             }
       
 11950             
       
 11951             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11952             {
       
 11953         
       
 11954                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11955                 return return_type_symbol;
       
 11956                 
       
 11957             }
       
 11958             
       
 11959             
       
 11960             ERROR;
       
 11961         }
       
 11962         
       
 11963     }/*function_time_to_real*/
       
 11964     break;
       
 11965 
       
 11966 /****
       
 11967  *TIME_TO_SINT
       
 11968  */
       
 11969     case function_time_to_sint :
       
 11970     {
       
 11971         symbol_c *last_type_symbol = NULL;
       
 11972 
       
 11973         {
       
 11974             identifier_c param_name("IN");
       
 11975             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11976             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11977             symbol_c *IN_type_symbol = NULL;
       
 11978             
       
 11979             /* Get the value from a foo(<param_value>) style call */
       
 11980             if (IN_param_value == NULL)
       
 11981               IN_param_value = function_call_param_iterator.next();
       
 11982             if (IN_param_value != NULL) {
       
 11983               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11984               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11985             }
       
 11986             
       
 11987             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11988             {
       
 11989         
       
 11990                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11991                 return return_type_symbol;
       
 11992                 
       
 11993             }
       
 11994             
       
 11995             
       
 11996             ERROR;
       
 11997         }
       
 11998         
       
 11999     }/*function_time_to_sint*/
       
 12000     break;
       
 12001 
       
 12002 /****
       
 12003  *TIME_TO_LINT
       
 12004  */
       
 12005     case function_time_to_lint :
       
 12006     {
       
 12007         symbol_c *last_type_symbol = NULL;
       
 12008 
       
 12009         {
       
 12010             identifier_c param_name("IN");
       
 12011             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12012             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12013             symbol_c *IN_type_symbol = NULL;
       
 12014             
       
 12015             /* Get the value from a foo(<param_value>) style call */
       
 12016             if (IN_param_value == NULL)
       
 12017               IN_param_value = function_call_param_iterator.next();
       
 12018             if (IN_param_value != NULL) {
       
 12019               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12020               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12021             }
       
 12022             
       
 12023             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12024             {
       
 12025         
       
 12026                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12027                 return return_type_symbol;
       
 12028                 
       
 12029             }
       
 12030             
       
 12031             
       
 12032             ERROR;
       
 12033         }
       
 12034         
       
 12035     }/*function_time_to_lint*/
       
 12036     break;
       
 12037 
       
 12038 /****
       
 12039  *TIME_TO_DINT
       
 12040  */
       
 12041     case function_time_to_dint :
       
 12042     {
       
 12043         symbol_c *last_type_symbol = NULL;
       
 12044 
       
 12045         {
       
 12046             identifier_c param_name("IN");
       
 12047             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12048             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12049             symbol_c *IN_type_symbol = NULL;
       
 12050             
       
 12051             /* Get the value from a foo(<param_value>) style call */
       
 12052             if (IN_param_value == NULL)
       
 12053               IN_param_value = function_call_param_iterator.next();
       
 12054             if (IN_param_value != NULL) {
       
 12055               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12056               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12057             }
       
 12058             
       
 12059             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12060             {
       
 12061         
       
 12062                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12063                 return return_type_symbol;
       
 12064                 
       
 12065             }
       
 12066             
       
 12067             
       
 12068             ERROR;
       
 12069         }
       
 12070         
       
 12071     }/*function_time_to_dint*/
       
 12072     break;
       
 12073 
       
 12074 /****
       
 12075  *TIME_TO_DWORD
       
 12076  */
       
 12077     case function_time_to_dword :
       
 12078     {
       
 12079         symbol_c *last_type_symbol = NULL;
       
 12080 
       
 12081         {
       
 12082             identifier_c param_name("IN");
       
 12083             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12084             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12085             symbol_c *IN_type_symbol = NULL;
       
 12086             
       
 12087             /* Get the value from a foo(<param_value>) style call */
       
 12088             if (IN_param_value == NULL)
       
 12089               IN_param_value = function_call_param_iterator.next();
       
 12090             if (IN_param_value != NULL) {
       
 12091               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12092               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12093             }
       
 12094             
       
 12095             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12096             {
       
 12097         
       
 12098                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12099                 return return_type_symbol;
       
 12100                 
       
 12101             }
       
 12102             
       
 12103             
       
 12104             ERROR;
       
 12105         }
       
 12106         
       
 12107     }/*function_time_to_dword*/
       
 12108     break;
       
 12109 
       
 12110 /****
       
 12111  *TIME_TO_UDINT
       
 12112  */
       
 12113     case function_time_to_udint :
       
 12114     {
       
 12115         symbol_c *last_type_symbol = NULL;
       
 12116 
       
 12117         {
       
 12118             identifier_c param_name("IN");
       
 12119             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12120             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12121             symbol_c *IN_type_symbol = NULL;
       
 12122             
       
 12123             /* Get the value from a foo(<param_value>) style call */
       
 12124             if (IN_param_value == NULL)
       
 12125               IN_param_value = function_call_param_iterator.next();
       
 12126             if (IN_param_value != NULL) {
       
 12127               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12128               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12129             }
       
 12130             
       
 12131             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12132             {
       
 12133         
       
 12134                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12135                 return return_type_symbol;
       
 12136                 
       
 12137             }
       
 12138             
       
 12139             
       
 12140             ERROR;
       
 12141         }
       
 12142         
       
 12143     }/*function_time_to_udint*/
       
 12144     break;
       
 12145 
       
 12146 /****
       
 12147  *TIME_TO_WORD
       
 12148  */
       
 12149     case function_time_to_word :
       
 12150     {
       
 12151         symbol_c *last_type_symbol = NULL;
       
 12152 
       
 12153         {
       
 12154             identifier_c param_name("IN");
       
 12155             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12156             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12157             symbol_c *IN_type_symbol = NULL;
       
 12158             
       
 12159             /* Get the value from a foo(<param_value>) style call */
       
 12160             if (IN_param_value == NULL)
       
 12161               IN_param_value = function_call_param_iterator.next();
       
 12162             if (IN_param_value != NULL) {
       
 12163               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12164               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12165             }
       
 12166             
       
 12167             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12168             {
       
 12169         
       
 12170                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12171                 return return_type_symbol;
       
 12172                 
       
 12173             }
       
 12174             
       
 12175             
       
 12176             ERROR;
       
 12177         }
       
 12178         
       
 12179     }/*function_time_to_word*/
       
 12180     break;
       
 12181 
       
 12182 /****
       
 12183  *TIME_TO_STRING
       
 12184  */
       
 12185     case function_time_to_string :
       
 12186     {
       
 12187         symbol_c *last_type_symbol = NULL;
       
 12188 
       
 12189         {
       
 12190             identifier_c param_name("IN");
       
 12191             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12192             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12193             symbol_c *IN_type_symbol = NULL;
       
 12194             
       
 12195             /* Get the value from a foo(<param_value>) style call */
       
 12196             if (IN_param_value == NULL)
       
 12197               IN_param_value = function_call_param_iterator.next();
       
 12198             if (IN_param_value != NULL) {
       
 12199               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12200               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12201             }
       
 12202             
       
 12203             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12204             {
       
 12205         
       
 12206                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12207                 return return_type_symbol;
       
 12208                 
       
 12209             }
       
 12210             
       
 12211             
       
 12212             ERROR;
       
 12213         }
       
 12214         
       
 12215     }/*function_time_to_string*/
       
 12216     break;
       
 12217 
       
 12218 /****
       
 12219  *TIME_TO_LWORD
       
 12220  */
       
 12221     case function_time_to_lword :
       
 12222     {
       
 12223         symbol_c *last_type_symbol = NULL;
       
 12224 
       
 12225         {
       
 12226             identifier_c param_name("IN");
       
 12227             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12228             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12229             symbol_c *IN_type_symbol = NULL;
       
 12230             
       
 12231             /* Get the value from a foo(<param_value>) style call */
       
 12232             if (IN_param_value == NULL)
       
 12233               IN_param_value = function_call_param_iterator.next();
       
 12234             if (IN_param_value != NULL) {
       
 12235               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12236               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12237             }
       
 12238             
       
 12239             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12240             {
       
 12241         
       
 12242                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12243                 return return_type_symbol;
       
 12244                 
       
 12245             }
       
 12246             
       
 12247             
       
 12248             ERROR;
       
 12249         }
       
 12250         
       
 12251     }/*function_time_to_lword*/
       
 12252     break;
       
 12253 
       
 12254 /****
       
 12255  *TIME_TO_UINT
       
 12256  */
       
 12257     case function_time_to_uint :
       
 12258     {
       
 12259         symbol_c *last_type_symbol = NULL;
       
 12260 
       
 12261         {
       
 12262             identifier_c param_name("IN");
       
 12263             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12264             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12265             symbol_c *IN_type_symbol = NULL;
       
 12266             
       
 12267             /* Get the value from a foo(<param_value>) style call */
       
 12268             if (IN_param_value == NULL)
       
 12269               IN_param_value = function_call_param_iterator.next();
       
 12270             if (IN_param_value != NULL) {
       
 12271               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12272               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12273             }
       
 12274             
       
 12275             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12276             {
       
 12277         
       
 12278                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12279                 return return_type_symbol;
       
 12280                 
       
 12281             }
       
 12282             
       
 12283             
       
 12284             ERROR;
       
 12285         }
       
 12286         
       
 12287     }/*function_time_to_uint*/
       
 12288     break;
       
 12289 
       
 12290 /****
       
 12291  *TIME_TO_LREAL
       
 12292  */
       
 12293     case function_time_to_lreal :
       
 12294     {
       
 12295         symbol_c *last_type_symbol = NULL;
       
 12296 
       
 12297         {
       
 12298             identifier_c param_name("IN");
       
 12299             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12300             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12301             symbol_c *IN_type_symbol = NULL;
       
 12302             
       
 12303             /* Get the value from a foo(<param_value>) style call */
       
 12304             if (IN_param_value == NULL)
       
 12305               IN_param_value = function_call_param_iterator.next();
       
 12306             if (IN_param_value != NULL) {
       
 12307               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12308               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12309             }
       
 12310             
       
 12311             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12312             {
       
 12313         
       
 12314                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12315                 return return_type_symbol;
       
 12316                 
       
 12317             }
       
 12318             
       
 12319             
       
 12320             ERROR;
       
 12321         }
       
 12322         
       
 12323     }/*function_time_to_lreal*/
       
 12324     break;
       
 12325 
       
 12326 /****
       
 12327  *TIME_TO_BYTE
       
 12328  */
       
 12329     case function_time_to_byte :
       
 12330     {
       
 12331         symbol_c *last_type_symbol = NULL;
       
 12332 
       
 12333         {
       
 12334             identifier_c param_name("IN");
       
 12335             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12336             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12337             symbol_c *IN_type_symbol = NULL;
       
 12338             
       
 12339             /* Get the value from a foo(<param_value>) style call */
       
 12340             if (IN_param_value == NULL)
       
 12341               IN_param_value = function_call_param_iterator.next();
       
 12342             if (IN_param_value != NULL) {
       
 12343               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12344               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12345             }
       
 12346             
       
 12347             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12348             {
       
 12349         
       
 12350                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12351                 return return_type_symbol;
       
 12352                 
       
 12353             }
       
 12354             
       
 12355             
       
 12356             ERROR;
       
 12357         }
       
 12358         
       
 12359     }/*function_time_to_byte*/
       
 12360     break;
       
 12361 
       
 12362 /****
       
 12363  *TIME_TO_USINT
       
 12364  */
       
 12365     case function_time_to_usint :
       
 12366     {
       
 12367         symbol_c *last_type_symbol = NULL;
       
 12368 
       
 12369         {
       
 12370             identifier_c param_name("IN");
       
 12371             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12372             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12373             symbol_c *IN_type_symbol = NULL;
       
 12374             
       
 12375             /* Get the value from a foo(<param_value>) style call */
       
 12376             if (IN_param_value == NULL)
       
 12377               IN_param_value = function_call_param_iterator.next();
       
 12378             if (IN_param_value != NULL) {
       
 12379               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12380               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12381             }
       
 12382             
       
 12383             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12384             {
       
 12385         
       
 12386                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 12387                 return return_type_symbol;
       
 12388                 
       
 12389             }
       
 12390             
       
 12391             
       
 12392             ERROR;
       
 12393         }
       
 12394         
       
 12395     }/*function_time_to_usint*/
       
 12396     break;
       
 12397 
       
 12398 /****
       
 12399  *TIME_TO_ULINT
       
 12400  */
       
 12401     case function_time_to_ulint :
       
 12402     {
       
 12403         symbol_c *last_type_symbol = NULL;
       
 12404 
       
 12405         {
       
 12406             identifier_c param_name("IN");
       
 12407             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12408             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12409             symbol_c *IN_type_symbol = NULL;
       
 12410             
       
 12411             /* Get the value from a foo(<param_value>) style call */
       
 12412             if (IN_param_value == NULL)
       
 12413               IN_param_value = function_call_param_iterator.next();
       
 12414             if (IN_param_value != NULL) {
       
 12415               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12416               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12417             }
       
 12418             
       
 12419             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12420             {
       
 12421         
       
 12422                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 12423                 return return_type_symbol;
       
 12424                 
       
 12425             }
       
 12426             
       
 12427             
       
 12428             ERROR;
       
 12429         }
       
 12430         
       
 12431     }/*function_time_to_ulint*/
       
 12432     break;
       
 12433 
       
 12434 /****
       
 12435  *TIME_TO_INT
       
 12436  */
       
 12437     case function_time_to_int :
       
 12438     {
       
 12439         symbol_c *last_type_symbol = NULL;
       
 12440 
       
 12441         {
       
 12442             identifier_c param_name("IN");
       
 12443             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12444             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12445             symbol_c *IN_type_symbol = NULL;
       
 12446             
       
 12447             /* Get the value from a foo(<param_value>) style call */
       
 12448             if (IN_param_value == NULL)
       
 12449               IN_param_value = function_call_param_iterator.next();
       
 12450             if (IN_param_value != NULL) {
       
 12451               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12452               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12453             }
       
 12454             
       
 12455             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12456             {
       
 12457         
       
 12458                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 12459                 return return_type_symbol;
       
 12460                 
       
 12461             }
       
 12462             
       
 12463             
       
 12464             ERROR;
       
 12465         }
       
 12466         
       
 12467     }/*function_time_to_int*/
       
 12468     break;
       
 12469 
       
 12470 /****
       
 12471  *INT_TO_REAL
       
 12472  */
       
 12473     case function_int_to_real :
       
 12474     {
       
 12475         symbol_c *last_type_symbol = NULL;
       
 12476 
       
 12477         {
       
 12478             identifier_c param_name("IN");
       
 12479             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12480             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12481             symbol_c *IN_type_symbol = NULL;
       
 12482             
       
 12483             /* Get the value from a foo(<param_value>) style call */
       
 12484             if (IN_param_value == NULL)
       
 12485               IN_param_value = function_call_param_iterator.next();
       
 12486             if (IN_param_value != NULL) {
       
 12487               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12488               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12489             }
       
 12490             
       
 12491             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12492             {
       
 12493         
       
 12494                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 12495                 return return_type_symbol;
       
 12496                 
       
 12497             }
       
 12498             
       
 12499             
       
 12500             ERROR;
       
 12501         }
       
 12502         
       
 12503     }/*function_int_to_real*/
       
 12504     break;
       
 12505 
       
 12506 /****
       
 12507  *INT_TO_SINT
       
 12508  */
       
 12509     case function_int_to_sint :
       
 12510     {
       
 12511         symbol_c *last_type_symbol = NULL;
       
 12512 
       
 12513         {
       
 12514             identifier_c param_name("IN");
       
 12515             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12516             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12517             symbol_c *IN_type_symbol = NULL;
       
 12518             
       
 12519             /* Get the value from a foo(<param_value>) style call */
       
 12520             if (IN_param_value == NULL)
       
 12521               IN_param_value = function_call_param_iterator.next();
       
 12522             if (IN_param_value != NULL) {
       
 12523               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12524               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12525             }
       
 12526             
       
 12527             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12528             {
       
 12529         
       
 12530                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 12531                 return return_type_symbol;
       
 12532                 
       
 12533             }
       
 12534             
       
 12535             
       
 12536             ERROR;
       
 12537         }
       
 12538         
       
 12539     }/*function_int_to_sint*/
       
 12540     break;
       
 12541 
       
 12542 /****
       
 12543  *INT_TO_LINT
       
 12544  */
       
 12545     case function_int_to_lint :
       
 12546     {
       
 12547         symbol_c *last_type_symbol = NULL;
       
 12548 
       
 12549         {
       
 12550             identifier_c param_name("IN");
       
 12551             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12552             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12553             symbol_c *IN_type_symbol = NULL;
       
 12554             
       
 12555             /* Get the value from a foo(<param_value>) style call */
       
 12556             if (IN_param_value == NULL)
       
 12557               IN_param_value = function_call_param_iterator.next();
       
 12558             if (IN_param_value != NULL) {
       
 12559               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12560               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12561             }
       
 12562             
       
 12563             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12564             {
       
 12565         
       
 12566                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 12567                 return return_type_symbol;
       
 12568                 
       
 12569             }
       
 12570             
       
 12571             
       
 12572             ERROR;
       
 12573         }
       
 12574         
       
 12575     }/*function_int_to_lint*/
       
 12576     break;
       
 12577 
       
 12578 /****
       
 12579  *INT_TO_DINT
       
 12580  */
       
 12581     case function_int_to_dint :
       
 12582     {
       
 12583         symbol_c *last_type_symbol = NULL;
       
 12584 
       
 12585         {
       
 12586             identifier_c param_name("IN");
       
 12587             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12588             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12589             symbol_c *IN_type_symbol = NULL;
       
 12590             
       
 12591             /* Get the value from a foo(<param_value>) style call */
       
 12592             if (IN_param_value == NULL)
       
 12593               IN_param_value = function_call_param_iterator.next();
       
 12594             if (IN_param_value != NULL) {
       
 12595               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12596               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12597             }
       
 12598             
       
 12599             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12600             {
       
 12601         
       
 12602                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 12603                 return return_type_symbol;
       
 12604                 
       
 12605             }
       
 12606             
       
 12607             
       
 12608             ERROR;
       
 12609         }
       
 12610         
       
 12611     }/*function_int_to_dint*/
       
 12612     break;
       
 12613 
       
 12614 /****
       
 12615  *INT_TO_DATE
       
 12616  */
       
 12617     case function_int_to_date :
       
 12618     {
       
 12619         symbol_c *last_type_symbol = NULL;
       
 12620 
       
 12621         {
       
 12622             identifier_c param_name("IN");
       
 12623             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12624             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12625             symbol_c *IN_type_symbol = NULL;
       
 12626             
       
 12627             /* Get the value from a foo(<param_value>) style call */
       
 12628             if (IN_param_value == NULL)
       
 12629               IN_param_value = function_call_param_iterator.next();
       
 12630             if (IN_param_value != NULL) {
       
 12631               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12632               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12633             }
       
 12634             
       
 12635             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12636             {
       
 12637         
       
 12638                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12639                 return return_type_symbol;
       
 12640                 
       
 12641             }
       
 12642             
       
 12643             
       
 12644             ERROR;
       
 12645         }
       
 12646         
       
 12647     }/*function_int_to_date*/
       
 12648     break;
       
 12649 
       
 12650 /****
       
 12651  *INT_TO_DWORD
       
 12652  */
       
 12653     case function_int_to_dword :
       
 12654     {
       
 12655         symbol_c *last_type_symbol = NULL;
       
 12656 
       
 12657         {
       
 12658             identifier_c param_name("IN");
       
 12659             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12660             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12661             symbol_c *IN_type_symbol = NULL;
       
 12662             
       
 12663             /* Get the value from a foo(<param_value>) style call */
       
 12664             if (IN_param_value == NULL)
       
 12665               IN_param_value = function_call_param_iterator.next();
       
 12666             if (IN_param_value != NULL) {
       
 12667               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12668               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12669             }
       
 12670             
       
 12671             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12672             {
       
 12673         
       
 12674                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 12675                 return return_type_symbol;
       
 12676                 
       
 12677             }
       
 12678             
       
 12679             
       
 12680             ERROR;
       
 12681         }
       
 12682         
       
 12683     }/*function_int_to_dword*/
       
 12684     break;
       
 12685 
       
 12686 /****
       
 12687  *INT_TO_DT
       
 12688  */
       
 12689     case function_int_to_dt :
       
 12690     {
       
 12691         symbol_c *last_type_symbol = NULL;
       
 12692 
       
 12693         {
       
 12694             identifier_c param_name("IN");
       
 12695             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12696             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12697             symbol_c *IN_type_symbol = NULL;
       
 12698             
       
 12699             /* Get the value from a foo(<param_value>) style call */
       
 12700             if (IN_param_value == NULL)
       
 12701               IN_param_value = function_call_param_iterator.next();
       
 12702             if (IN_param_value != NULL) {
       
 12703               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12704               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12705             }
       
 12706             
       
 12707             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12708             {
       
 12709         
       
 12710                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12711                 return return_type_symbol;
       
 12712                 
       
 12713             }
       
 12714             
       
 12715             
       
 12716             ERROR;
       
 12717         }
       
 12718         
       
 12719     }/*function_int_to_dt*/
       
 12720     break;
       
 12721 
       
 12722 /****
       
 12723  *INT_TO_TOD
       
 12724  */
       
 12725     case function_int_to_tod :
       
 12726     {
       
 12727         symbol_c *last_type_symbol = NULL;
       
 12728 
       
 12729         {
       
 12730             identifier_c param_name("IN");
       
 12731             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12732             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12733             symbol_c *IN_type_symbol = NULL;
       
 12734             
       
 12735             /* Get the value from a foo(<param_value>) style call */
       
 12736             if (IN_param_value == NULL)
       
 12737               IN_param_value = function_call_param_iterator.next();
       
 12738             if (IN_param_value != NULL) {
       
 12739               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12740               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12741             }
       
 12742             
       
 12743             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12744             {
       
 12745         
       
 12746                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12747                 return return_type_symbol;
       
 12748                 
       
 12749             }
       
 12750             
       
 12751             
       
 12752             ERROR;
       
 12753         }
       
 12754         
       
 12755     }/*function_int_to_tod*/
       
 12756     break;
       
 12757 
       
 12758 /****
       
 12759  *INT_TO_UDINT
       
 12760  */
       
 12761     case function_int_to_udint :
       
 12762     {
       
 12763         symbol_c *last_type_symbol = NULL;
       
 12764 
       
 12765         {
       
 12766             identifier_c param_name("IN");
       
 12767             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12768             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12769             symbol_c *IN_type_symbol = NULL;
       
 12770             
       
 12771             /* Get the value from a foo(<param_value>) style call */
       
 12772             if (IN_param_value == NULL)
       
 12773               IN_param_value = function_call_param_iterator.next();
       
 12774             if (IN_param_value != NULL) {
       
 12775               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12776               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12777             }
       
 12778             
       
 12779             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12780             {
       
 12781         
       
 12782                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12783                 return return_type_symbol;
       
 12784                 
       
 12785             }
       
 12786             
       
 12787             
       
 12788             ERROR;
       
 12789         }
       
 12790         
       
 12791     }/*function_int_to_udint*/
       
 12792     break;
       
 12793 
       
 12794 /****
       
 12795  *INT_TO_WORD
       
 12796  */
       
 12797     case function_int_to_word :
       
 12798     {
       
 12799         symbol_c *last_type_symbol = NULL;
       
 12800 
       
 12801         {
       
 12802             identifier_c param_name("IN");
       
 12803             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12804             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12805             symbol_c *IN_type_symbol = NULL;
       
 12806             
       
 12807             /* Get the value from a foo(<param_value>) style call */
       
 12808             if (IN_param_value == NULL)
       
 12809               IN_param_value = function_call_param_iterator.next();
       
 12810             if (IN_param_value != NULL) {
       
 12811               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12812               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12813             }
       
 12814             
       
 12815             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12816             {
       
 12817         
       
 12818                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 12819                 return return_type_symbol;
       
 12820                 
       
 12821             }
       
 12822             
       
 12823             
       
 12824             ERROR;
       
 12825         }
       
 12826         
       
 12827     }/*function_int_to_word*/
       
 12828     break;
       
 12829 
       
 12830 /****
       
 12831  *INT_TO_STRING
       
 12832  */
       
 12833     case function_int_to_string :
       
 12834     {
       
 12835         symbol_c *last_type_symbol = NULL;
       
 12836 
       
 12837         {
       
 12838             identifier_c param_name("IN");
       
 12839             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12840             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12841             symbol_c *IN_type_symbol = NULL;
       
 12842             
       
 12843             /* Get the value from a foo(<param_value>) style call */
       
 12844             if (IN_param_value == NULL)
       
 12845               IN_param_value = function_call_param_iterator.next();
       
 12846             if (IN_param_value != NULL) {
       
 12847               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12848               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12849             }
       
 12850             
       
 12851             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12852             {
       
 12853         
       
 12854                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 12855                 return return_type_symbol;
       
 12856                 
       
 12857             }
       
 12858             
       
 12859             
       
 12860             ERROR;
       
 12861         }
       
 12862         
       
 12863     }/*function_int_to_string*/
       
 12864     break;
       
 12865 
       
 12866 /****
       
 12867  *INT_TO_LWORD
       
 12868  */
       
 12869     case function_int_to_lword :
       
 12870     {
       
 12871         symbol_c *last_type_symbol = NULL;
       
 12872 
       
 12873         {
       
 12874             identifier_c param_name("IN");
       
 12875             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12876             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12877             symbol_c *IN_type_symbol = NULL;
       
 12878             
       
 12879             /* Get the value from a foo(<param_value>) style call */
       
 12880             if (IN_param_value == NULL)
       
 12881               IN_param_value = function_call_param_iterator.next();
       
 12882             if (IN_param_value != NULL) {
       
 12883               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12884               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12885             }
       
 12886             
       
 12887             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12888             {
       
 12889         
       
 12890                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 12891                 return return_type_symbol;
       
 12892                 
       
 12893             }
       
 12894             
       
 12895             
       
 12896             ERROR;
       
 12897         }
       
 12898         
       
 12899     }/*function_int_to_lword*/
       
 12900     break;
       
 12901 
       
 12902 /****
       
 12903  *INT_TO_UINT
       
 12904  */
       
 12905     case function_int_to_uint :
       
 12906     {
       
 12907         symbol_c *last_type_symbol = NULL;
       
 12908 
       
 12909         {
       
 12910             identifier_c param_name("IN");
       
 12911             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12912             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12913             symbol_c *IN_type_symbol = NULL;
       
 12914             
       
 12915             /* Get the value from a foo(<param_value>) style call */
       
 12916             if (IN_param_value == NULL)
       
 12917               IN_param_value = function_call_param_iterator.next();
       
 12918             if (IN_param_value != NULL) {
       
 12919               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12920               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12921             }
       
 12922             
       
 12923             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12924             {
       
 12925         
       
 12926                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 12927                 return return_type_symbol;
       
 12928                 
       
 12929             }
       
 12930             
       
 12931             
       
 12932             ERROR;
       
 12933         }
       
 12934         
       
 12935     }/*function_int_to_uint*/
       
 12936     break;
       
 12937 
       
 12938 /****
       
 12939  *INT_TO_LREAL
       
 12940  */
       
 12941     case function_int_to_lreal :
       
 12942     {
       
 12943         symbol_c *last_type_symbol = NULL;
       
 12944 
       
 12945         {
       
 12946             identifier_c param_name("IN");
       
 12947             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12948             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12949             symbol_c *IN_type_symbol = NULL;
       
 12950             
       
 12951             /* Get the value from a foo(<param_value>) style call */
       
 12952             if (IN_param_value == NULL)
       
 12953               IN_param_value = function_call_param_iterator.next();
       
 12954             if (IN_param_value != NULL) {
       
 12955               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12956               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12957             }
       
 12958             
       
 12959             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12960             {
       
 12961         
       
 12962                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 12963                 return return_type_symbol;
       
 12964                 
       
 12965             }
       
 12966             
       
 12967             
       
 12968             ERROR;
       
 12969         }
       
 12970         
       
 12971     }/*function_int_to_lreal*/
       
 12972     break;
       
 12973 
       
 12974 /****
       
 12975  *INT_TO_BYTE
       
 12976  */
       
 12977     case function_int_to_byte :
       
 12978     {
       
 12979         symbol_c *last_type_symbol = NULL;
       
 12980 
       
 12981         {
       
 12982             identifier_c param_name("IN");
       
 12983             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12984             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12985             symbol_c *IN_type_symbol = NULL;
       
 12986             
       
 12987             /* Get the value from a foo(<param_value>) style call */
       
 12988             if (IN_param_value == NULL)
       
 12989               IN_param_value = function_call_param_iterator.next();
       
 12990             if (IN_param_value != NULL) {
       
 12991               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12992               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12993             }
       
 12994             
       
 12995             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12996             {
       
 12997         
       
 12998                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 12999                 return return_type_symbol;
       
 13000                 
       
 13001             }
       
 13002             
       
 13003             
       
 13004             ERROR;
       
 13005         }
       
 13006         
       
 13007     }/*function_int_to_byte*/
       
 13008     break;
       
 13009 
       
 13010 /****
       
 13011  *INT_TO_USINT
       
 13012  */
       
 13013     case function_int_to_usint :
       
 13014     {
       
 13015         symbol_c *last_type_symbol = NULL;
       
 13016 
       
 13017         {
       
 13018             identifier_c param_name("IN");
       
 13019             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13020             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13021             symbol_c *IN_type_symbol = NULL;
       
 13022             
       
 13023             /* Get the value from a foo(<param_value>) style call */
       
 13024             if (IN_param_value == NULL)
       
 13025               IN_param_value = function_call_param_iterator.next();
       
 13026             if (IN_param_value != NULL) {
       
 13027               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13028               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13029             }
       
 13030             
       
 13031             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 13032             {
       
 13033         
       
 13034                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13035                 return return_type_symbol;
       
 13036                 
       
 13037             }
       
 13038             
       
 13039             
       
 13040             ERROR;
       
 13041         }
       
 13042         
       
 13043     }/*function_int_to_usint*/
       
 13044     break;
       
 13045 
       
 13046 /****
       
 13047  *INT_TO_ULINT
       
 13048  */
       
 13049     case function_int_to_ulint :
       
 13050     {
       
 13051         symbol_c *last_type_symbol = NULL;
       
 13052 
       
 13053         {
       
 13054             identifier_c param_name("IN");
       
 13055             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13056             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13057             symbol_c *IN_type_symbol = NULL;
       
 13058             
       
 13059             /* Get the value from a foo(<param_value>) style call */
       
 13060             if (IN_param_value == NULL)
       
 13061               IN_param_value = function_call_param_iterator.next();
       
 13062             if (IN_param_value != NULL) {
       
 13063               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13064               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13065             }
       
 13066             
       
 13067             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 13068             {
       
 13069         
       
 13070                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13071                 return return_type_symbol;
       
 13072                 
       
 13073             }
       
 13074             
       
 13075             
       
 13076             ERROR;
       
 13077         }
       
 13078         
       
 13079     }/*function_int_to_ulint*/
       
 13080     break;
       
 13081 
       
 13082 /****
       
 13083  *INT_TO_BOOL
       
 13084  */
       
 13085     case function_int_to_bool :
       
 13086     {
       
 13087         symbol_c *last_type_symbol = NULL;
       
 13088 
       
 13089         {
       
 13090             identifier_c param_name("IN");
       
 13091             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13092             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13093             symbol_c *IN_type_symbol = NULL;
       
 13094             
       
 13095             /* Get the value from a foo(<param_value>) style call */
       
 13096             if (IN_param_value == NULL)
       
 13097               IN_param_value = function_call_param_iterator.next();
       
 13098             if (IN_param_value != NULL) {
       
 13099               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13100               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13101             }
       
 13102             
       
 13103             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 13104             {
       
 13105         
       
 13106                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13107                 return return_type_symbol;
       
 13108                 
       
 13109             }
       
 13110             
       
 13111             
       
 13112             ERROR;
       
 13113         }
       
 13114         
       
 13115     }/*function_int_to_bool*/
       
 13116     break;
       
 13117 
       
 13118 /****
       
 13119  *INT_TO_TIME
       
 13120  */
       
 13121     case function_int_to_time :
       
 13122     {
       
 13123         symbol_c *last_type_symbol = NULL;
       
 13124 
       
 13125         {
       
 13126             identifier_c param_name("IN");
       
 13127             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13128             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13129             symbol_c *IN_type_symbol = NULL;
       
 13130             
       
 13131             /* Get the value from a foo(<param_value>) style call */
       
 13132             if (IN_param_value == NULL)
       
 13133               IN_param_value = function_call_param_iterator.next();
       
 13134             if (IN_param_value != NULL) {
       
 13135               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13136               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13137             }
       
 13138             
       
 13139             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 13140             {
       
 13141         
       
 13142                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 13143                 return return_type_symbol;
       
 13144                 
       
 13145             }
       
 13146             
       
 13147             
       
 13148             ERROR;
       
 13149         }
       
 13150         
       
 13151     }/*function_int_to_time*/
       
 13152     break;
       
 13153 
       
 13154 /****
       
 13155  *TRUNC
       
 13156  */
       
 13157     case function_trunc :
       
 13158     {
       
 13159         symbol_c *last_type_symbol = NULL;
       
 13160 
       
 13161         {
       
 13162             identifier_c param_name("IN");
       
 13163             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13164             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13165             symbol_c *IN_type_symbol = NULL;
       
 13166             
       
 13167             /* Get the value from a foo(<param_value>) style call */
       
 13168             if (IN_param_value == NULL)
       
 13169               IN_param_value = function_call_param_iterator.next();
       
 13170             if (IN_param_value != NULL) {
       
 13171               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13172               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13173             }
       
 13174             
       
 13175             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13176             {
       
 13177         
       
 13178                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13179                 return return_type_symbol;
       
 13180                 
       
 13181             }
       
 13182             
       
 13183             
       
 13184             ERROR;
       
 13185         }
       
 13186         
       
 13187     }/*function_trunc*/
       
 13188     break;
       
 13189 
       
 13190 /****
       
 13191  *BCD_TO_UDINT
       
 13192  */
       
 13193     case function_bcd_to_udint :
       
 13194     {
       
 13195         symbol_c *last_type_symbol = NULL;
       
 13196 
       
 13197         {
       
 13198             identifier_c param_name("IN");
       
 13199             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13200             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13201             symbol_c *IN_type_symbol = NULL;
       
 13202             
       
 13203             /* Get the value from a foo(<param_value>) style call */
       
 13204             if (IN_param_value == NULL)
       
 13205               IN_param_value = function_call_param_iterator.next();
       
 13206             if (IN_param_value != NULL) {
       
 13207               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13208               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13209             }
       
 13210             
       
 13211             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 13212             {
       
 13213         
       
 13214                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 13215                 return return_type_symbol;
       
 13216                 
       
 13217             }
       
 13218             
       
 13219             
       
 13220             ERROR;
       
 13221         }
       
 13222         
       
 13223     }/*function_bcd_to_udint*/
       
 13224     break;
       
 13225 
       
 13226 /****
       
 13227  *BCD_TO_UINT
       
 13228  */
       
 13229     case function_bcd_to_uint :
       
 13230     {
       
 13231         symbol_c *last_type_symbol = NULL;
       
 13232 
       
 13233         {
       
 13234             identifier_c param_name("IN");
       
 13235             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13236             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13237             symbol_c *IN_type_symbol = NULL;
       
 13238             
       
 13239             /* Get the value from a foo(<param_value>) style call */
       
 13240             if (IN_param_value == NULL)
       
 13241               IN_param_value = function_call_param_iterator.next();
       
 13242             if (IN_param_value != NULL) {
       
 13243               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13244               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13245             }
       
 13246             
       
 13247             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 13248             {
       
 13249         
       
 13250                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 13251                 return return_type_symbol;
       
 13252                 
       
 13253             }
       
 13254             
       
 13255             
       
 13256             ERROR;
       
 13257         }
       
 13258         
       
 13259     }/*function_bcd_to_uint*/
       
 13260     break;
       
 13261 
       
 13262 /****
       
 13263  *BCD_TO_ULINT
       
 13264  */
       
 13265     case function_bcd_to_ulint :
       
 13266     {
       
 13267         symbol_c *last_type_symbol = NULL;
       
 13268 
       
 13269         {
       
 13270             identifier_c param_name("IN");
       
 13271             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13272             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13273             symbol_c *IN_type_symbol = NULL;
       
 13274             
       
 13275             /* Get the value from a foo(<param_value>) style call */
       
 13276             if (IN_param_value == NULL)
       
 13277               IN_param_value = function_call_param_iterator.next();
       
 13278             if (IN_param_value != NULL) {
       
 13279               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13280               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13281             }
       
 13282             
       
 13283             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 13284             {
       
 13285         
       
 13286                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 13287                 return return_type_symbol;
       
 13288                 
       
 13289             }
       
 13290             
       
 13291             
       
 13292             ERROR;
       
 13293         }
       
 13294         
       
 13295     }/*function_bcd_to_ulint*/
       
 13296     break;
       
 13297 
       
 13298 /****
       
 13299  *BCD_TO_USINT
       
 13300  */
       
 13301     case function_bcd_to_usint :
       
 13302     {
       
 13303         symbol_c *last_type_symbol = NULL;
       
 13304 
       
 13305         {
       
 13306             identifier_c param_name("IN");
       
 13307             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13308             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13309             symbol_c *IN_type_symbol = NULL;
       
 13310             
       
 13311             /* Get the value from a foo(<param_value>) style call */
       
 13312             if (IN_param_value == NULL)
       
 13313               IN_param_value = function_call_param_iterator.next();
       
 13314             if (IN_param_value != NULL) {
       
 13315               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13316               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13317             }
       
 13318             
       
 13319             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 13320             {
       
 13321         
       
 13322                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 13323                 return return_type_symbol;
       
 13324                 
       
 13325             }
       
 13326             
       
 13327             
       
 13328             ERROR;
       
 13329         }
       
 13330         
       
 13331     }/*function_bcd_to_usint*/
       
 13332     break;
       
 13333 
       
 13334 /****
       
 13335  *UDINT_TO_BCD
       
 13336  */
       
 13337     case function_udint_to_bcd :
       
 13338     {
       
 13339         symbol_c *last_type_symbol = NULL;
       
 13340 
       
 13341         {
       
 13342             identifier_c param_name("IN");
       
 13343             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13344             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13345             symbol_c *IN_type_symbol = NULL;
       
 13346             
       
 13347             /* Get the value from a foo(<param_value>) style call */
       
 13348             if (IN_param_value == NULL)
       
 13349               IN_param_value = function_call_param_iterator.next();
       
 13350             if (IN_param_value != NULL) {
       
 13351               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13352               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13353             }
       
 13354             
       
 13355             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 13356             {
       
 13357         
       
 13358                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13359                 return return_type_symbol;
       
 13360                 
       
 13361             }
       
 13362             
       
 13363             
       
 13364             ERROR;
       
 13365         }
       
 13366         
       
 13367     }/*function_udint_to_bcd*/
       
 13368     break;
       
 13369 
       
 13370 /****
       
 13371  *UINT_TO_BCD
       
 13372  */
       
 13373     case function_uint_to_bcd :
       
 13374     {
       
 13375         symbol_c *last_type_symbol = NULL;
       
 13376 
       
 13377         {
       
 13378             identifier_c param_name("IN");
       
 13379             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13380             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13381             symbol_c *IN_type_symbol = NULL;
       
 13382             
       
 13383             /* Get the value from a foo(<param_value>) style call */
       
 13384             if (IN_param_value == NULL)
       
 13385               IN_param_value = function_call_param_iterator.next();
       
 13386             if (IN_param_value != NULL) {
       
 13387               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13388               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13389             }
       
 13390             
       
 13391             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 13392             {
       
 13393         
       
 13394                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13395                 return return_type_symbol;
       
 13396                 
       
 13397             }
       
 13398             
       
 13399             
       
 13400             ERROR;
       
 13401         }
       
 13402         
       
 13403     }/*function_uint_to_bcd*/
       
 13404     break;
       
 13405 
       
 13406 /****
       
 13407  *USINT_TO_BCD
       
 13408  */
       
 13409     case function_usint_to_bcd :
       
 13410     {
       
 13411         symbol_c *last_type_symbol = NULL;
       
 13412 
       
 13413         {
       
 13414             identifier_c param_name("IN");
       
 13415             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13416             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13417             symbol_c *IN_type_symbol = NULL;
       
 13418             
       
 13419             /* Get the value from a foo(<param_value>) style call */
       
 13420             if (IN_param_value == NULL)
       
 13421               IN_param_value = function_call_param_iterator.next();
       
 13422             if (IN_param_value != NULL) {
       
 13423               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13424               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13425             }
       
 13426             
       
 13427             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 13428             {
       
 13429         
       
 13430                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13431                 return return_type_symbol;
       
 13432                 
       
 13433             }
       
 13434             
       
 13435             
       
 13436             ERROR;
       
 13437         }
       
 13438         
       
 13439     }/*function_usint_to_bcd*/
       
 13440     break;
       
 13441 
       
 13442 /****
       
 13443  *ULINT_TO_BCD
       
 13444  */
       
 13445     case function_ulint_to_bcd :
       
 13446     {
       
 13447         symbol_c *last_type_symbol = NULL;
       
 13448 
       
 13449         {
       
 13450             identifier_c param_name("IN");
       
 13451             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13452             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13453             symbol_c *IN_type_symbol = NULL;
       
 13454             
       
 13455             /* Get the value from a foo(<param_value>) style call */
       
 13456             if (IN_param_value == NULL)
       
 13457               IN_param_value = function_call_param_iterator.next();
       
 13458             if (IN_param_value != NULL) {
       
 13459               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13460               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13461             }
       
 13462             
       
 13463             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 13464             {
       
 13465         
       
 13466                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 13467                 return return_type_symbol;
       
 13468                 
       
 13469             }
       
 13470             
       
 13471             
       
 13472             ERROR;
       
 13473         }
       
 13474         
       
 13475     }/*function_ulint_to_bcd*/
       
 13476     break;
       
 13477 
       
 13478 /****
       
 13479  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 13480  */
       
 13481     case function_date_and_time_to_time_of_day :
       
 13482     {
       
 13483         symbol_c *last_type_symbol = NULL;
       
 13484 
       
 13485         {
       
 13486             identifier_c param_name("IN");
       
 13487             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13488             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13489             symbol_c *IN_type_symbol = NULL;
       
 13490             
       
 13491             /* Get the value from a foo(<param_value>) style call */
       
 13492             if (IN_param_value == NULL)
       
 13493               IN_param_value = function_call_param_iterator.next();
       
 13494             if (IN_param_value != NULL) {
       
 13495               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13496               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13497             }
       
 13498             
       
 13499             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 13500             {
       
 13501         
       
 13502                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 13503                 return return_type_symbol;
       
 13504                 
       
 13505             }
       
 13506             
       
 13507             
       
 13508             ERROR;
       
 13509         }
       
 13510         
       
 13511     }/*function_date_and_time_to_time_of_day*/
       
 13512     break;
       
 13513 
       
 13514 /****
       
 13515  *DATE_AND_TIME_TO_DATE
       
 13516  */
       
 13517     case function_date_and_time_to_date :
       
 13518     {
       
 13519         symbol_c *last_type_symbol = NULL;
       
 13520 
       
 13521         {
       
 13522             identifier_c param_name("IN");
       
 13523             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13524             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13525             symbol_c *IN_type_symbol = NULL;
       
 13526             
       
 13527             /* Get the value from a foo(<param_value>) style call */
       
 13528             if (IN_param_value == NULL)
       
 13529               IN_param_value = function_call_param_iterator.next();
       
 13530             if (IN_param_value != NULL) {
       
 13531               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13532               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13533             }
       
 13534             
       
 13535             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 13536             {
       
 13537         
       
 13538                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 13539                 return return_type_symbol;
       
 13540                 
       
 13541             }
       
 13542             
       
 13543             
       
 13544             ERROR;
       
 13545         }
       
 13546         
       
 13547     }/*function_date_and_time_to_date*/
       
 13548     break;
       
 13549 
       
 13550 /****
       
 13551  *ABS
       
 13552  */
       
 13553     case function_abs :
       
 13554     {
       
 13555         symbol_c *last_type_symbol = NULL;
       
 13556 
       
 13557         {
       
 13558             identifier_c param_name("IN");
       
 13559             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13560             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13561             symbol_c *IN_type_symbol = NULL;
       
 13562             
       
 13563             /* Get the value from a foo(<param_value>) style call */
       
 13564             if (IN_param_value == NULL)
       
 13565               IN_param_value = function_call_param_iterator.next();
       
 13566             if (IN_param_value != NULL) {
       
 13567               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13568               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13569             }
       
 13570             
       
 13571             if(IN_type_symbol == NULL || search_expression_type->is_num_type(IN_type_symbol))
       
 13572             {
       
 13573         
       
 13574                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13575                 return return_type_symbol;
       
 13576                 
       
 13577             }
       
 13578             
       
 13579             
       
 13580             ERROR;
       
 13581         }
       
 13582         
       
 13583     }/*function_abs*/
       
 13584     break;
       
 13585 
       
 13586 /****
       
 13587  *SQRT
       
 13588  */
       
 13589     case function_sqrt :
       
 13590     {
       
 13591         symbol_c *last_type_symbol = NULL;
       
 13592 
       
 13593         {
       
 13594             identifier_c param_name("IN");
       
 13595             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13596             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13597             symbol_c *IN_type_symbol = NULL;
       
 13598             
       
 13599             /* Get the value from a foo(<param_value>) style call */
       
 13600             if (IN_param_value == NULL)
       
 13601               IN_param_value = function_call_param_iterator.next();
       
 13602             if (IN_param_value != NULL) {
       
 13603               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13604               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13605             }
       
 13606             
       
 13607             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13608             {
       
 13609         
       
 13610                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13611                 return return_type_symbol;
       
 13612                 
       
 13613             }
       
 13614             
       
 13615             
       
 13616             ERROR;
       
 13617         }
       
 13618         
       
 13619     }/*function_sqrt*/
       
 13620     break;
       
 13621 
       
 13622 /****
       
 13623  *LN
       
 13624  */
       
 13625     case function_ln :
       
 13626     {
       
 13627         symbol_c *last_type_symbol = NULL;
       
 13628 
       
 13629         {
       
 13630             identifier_c param_name("IN");
       
 13631             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13632             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13633             symbol_c *IN_type_symbol = NULL;
       
 13634             
       
 13635             /* Get the value from a foo(<param_value>) style call */
       
 13636             if (IN_param_value == NULL)
       
 13637               IN_param_value = function_call_param_iterator.next();
       
 13638             if (IN_param_value != NULL) {
       
 13639               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13640               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13641             }
       
 13642             
       
 13643             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13644             {
       
 13645         
       
 13646                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13647                 return return_type_symbol;
       
 13648                 
       
 13649             }
       
 13650             
       
 13651             
       
 13652             ERROR;
       
 13653         }
       
 13654         
       
 13655     }/*function_ln*/
       
 13656     break;
       
 13657 
       
 13658 /****
       
 13659  *LOG
       
 13660  */
       
 13661     case function_log :
       
 13662     {
       
 13663         symbol_c *last_type_symbol = NULL;
       
 13664 
       
 13665         {
       
 13666             identifier_c param_name("IN");
       
 13667             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13668             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13669             symbol_c *IN_type_symbol = NULL;
       
 13670             
       
 13671             /* Get the value from a foo(<param_value>) style call */
       
 13672             if (IN_param_value == NULL)
       
 13673               IN_param_value = function_call_param_iterator.next();
       
 13674             if (IN_param_value != NULL) {
       
 13675               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13676               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13677             }
       
 13678             
       
 13679             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13680             {
       
 13681         
       
 13682                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13683                 return return_type_symbol;
       
 13684                 
       
 13685             }
       
 13686             
       
 13687             
       
 13688             ERROR;
       
 13689         }
       
 13690         
       
 13691     }/*function_log*/
       
 13692     break;
       
 13693 
       
 13694 /****
       
 13695  *EXP
       
 13696  */
       
 13697     case function_exp :
       
 13698     {
       
 13699         symbol_c *last_type_symbol = NULL;
       
 13700 
       
 13701         {
       
 13702             identifier_c param_name("IN");
       
 13703             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13704             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13705             symbol_c *IN_type_symbol = NULL;
       
 13706             
       
 13707             /* Get the value from a foo(<param_value>) style call */
       
 13708             if (IN_param_value == NULL)
       
 13709               IN_param_value = function_call_param_iterator.next();
       
 13710             if (IN_param_value != NULL) {
       
 13711               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13712               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13713             }
       
 13714             
       
 13715             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13716             {
       
 13717         
       
 13718                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13719                 return return_type_symbol;
       
 13720                 
       
 13721             }
       
 13722             
       
 13723             
       
 13724             ERROR;
       
 13725         }
       
 13726         
       
 13727     }/*function_exp*/
       
 13728     break;
       
 13729 
       
 13730 /****
       
 13731  *SIN
       
 13732  */
       
 13733     case function_sin :
       
 13734     {
       
 13735         symbol_c *last_type_symbol = NULL;
       
 13736 
       
 13737         {
       
 13738             identifier_c param_name("IN");
       
 13739             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13740             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13741             symbol_c *IN_type_symbol = NULL;
       
 13742             
       
 13743             /* Get the value from a foo(<param_value>) style call */
       
 13744             if (IN_param_value == NULL)
       
 13745               IN_param_value = function_call_param_iterator.next();
       
 13746             if (IN_param_value != NULL) {
       
 13747               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13748               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13749             }
       
 13750             
       
 13751             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13752             {
       
 13753         
       
 13754                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13755                 return return_type_symbol;
       
 13756                 
       
 13757             }
       
 13758             
       
 13759             
       
 13760             ERROR;
       
 13761         }
       
 13762         
       
 13763     }/*function_sin*/
       
 13764     break;
       
 13765 
       
 13766 /****
       
 13767  *COS
       
 13768  */
       
 13769     case function_cos :
       
 13770     {
       
 13771         symbol_c *last_type_symbol = NULL;
       
 13772 
       
 13773         {
       
 13774             identifier_c param_name("IN");
       
 13775             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13776             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13777             symbol_c *IN_type_symbol = NULL;
       
 13778             
       
 13779             /* Get the value from a foo(<param_value>) style call */
       
 13780             if (IN_param_value == NULL)
       
 13781               IN_param_value = function_call_param_iterator.next();
       
 13782             if (IN_param_value != NULL) {
       
 13783               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13784               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13785             }
       
 13786             
       
 13787             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13788             {
       
 13789         
       
 13790                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13791                 return return_type_symbol;
       
 13792                 
       
 13793             }
       
 13794             
       
 13795             
       
 13796             ERROR;
       
 13797         }
       
 13798         
       
 13799     }/*function_cos*/
       
 13800     break;
       
 13801 
       
 13802 /****
       
 13803  *TAN
       
 13804  */
       
 13805     case function_tan :
       
 13806     {
       
 13807         symbol_c *last_type_symbol = NULL;
       
 13808 
       
 13809         {
       
 13810             identifier_c param_name("IN");
       
 13811             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13812             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13813             symbol_c *IN_type_symbol = NULL;
       
 13814             
       
 13815             /* Get the value from a foo(<param_value>) style call */
       
 13816             if (IN_param_value == NULL)
       
 13817               IN_param_value = function_call_param_iterator.next();
       
 13818             if (IN_param_value != NULL) {
       
 13819               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13820               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13821             }
       
 13822             
       
 13823             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13824             {
       
 13825         
       
 13826                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13827                 return return_type_symbol;
       
 13828                 
       
 13829             }
       
 13830             
       
 13831             
       
 13832             ERROR;
       
 13833         }
       
 13834         
       
 13835     }/*function_tan*/
       
 13836     break;
       
 13837 
       
 13838 /****
       
 13839  *ASIN
       
 13840  */
       
 13841     case function_asin :
       
 13842     {
       
 13843         symbol_c *last_type_symbol = NULL;
       
 13844 
       
 13845         {
       
 13846             identifier_c param_name("IN");
       
 13847             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13848             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13849             symbol_c *IN_type_symbol = NULL;
       
 13850             
       
 13851             /* Get the value from a foo(<param_value>) style call */
       
 13852             if (IN_param_value == NULL)
       
 13853               IN_param_value = function_call_param_iterator.next();
       
 13854             if (IN_param_value != NULL) {
       
 13855               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13856               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13857             }
       
 13858             
       
 13859             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13860             {
       
 13861         
       
 13862                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13863                 return return_type_symbol;
       
 13864                 
       
 13865             }
       
 13866             
       
 13867             
       
 13868             ERROR;
       
 13869         }
       
 13870         
       
 13871     }/*function_asin*/
       
 13872     break;
       
 13873 
       
 13874 /****
       
 13875  *ACOS
       
 13876  */
       
 13877     case function_acos :
       
 13878     {
       
 13879         symbol_c *last_type_symbol = NULL;
       
 13880 
       
 13881         {
       
 13882             identifier_c param_name("IN");
       
 13883             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13884             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13885             symbol_c *IN_type_symbol = NULL;
       
 13886             
       
 13887             /* Get the value from a foo(<param_value>) style call */
       
 13888             if (IN_param_value == NULL)
       
 13889               IN_param_value = function_call_param_iterator.next();
       
 13890             if (IN_param_value != NULL) {
       
 13891               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13892               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13893             }
       
 13894             
       
 13895             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13896             {
       
 13897         
       
 13898                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13899                 return return_type_symbol;
       
 13900                 
       
 13901             }
       
 13902             
       
 13903             
       
 13904             ERROR;
       
 13905         }
       
 13906         
       
 13907     }/*function_acos*/
       
 13908     break;
       
 13909 
       
 13910 /****
       
 13911  *ATAN
       
 13912  */
       
 13913     case function_atan :
       
 13914     {
       
 13915         symbol_c *last_type_symbol = NULL;
       
 13916 
       
 13917         {
       
 13918             identifier_c param_name("IN");
       
 13919             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13920             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13921             symbol_c *IN_type_symbol = NULL;
       
 13922             
       
 13923             /* Get the value from a foo(<param_value>) style call */
       
 13924             if (IN_param_value == NULL)
       
 13925               IN_param_value = function_call_param_iterator.next();
       
 13926             if (IN_param_value != NULL) {
       
 13927               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13928               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13929             }
       
 13930             
       
 13931             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 13932             {
       
 13933         
       
 13934                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13935                 return return_type_symbol;
       
 13936                 
       
 13937             }
       
 13938             
       
 13939             
       
 13940             ERROR;
       
 13941         }
       
 13942         
       
 13943     }/*function_atan*/
       
 13944     break;
       
 13945 
       
 13946 /****
       
 13947  *ADD
       
 13948  */
       
 13949     case function_add :
       
 13950     {
       
 13951         symbol_c *last_type_symbol = NULL;
       
 13952 
       
 13953         {
       
 13954             identifier_c param_name("IN1");
       
 13955             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13956             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13957             symbol_c *IN1_type_symbol = NULL;
       
 13958             
       
 13959             /* Get the value from a foo(<param_value>) style call */
       
 13960             if (IN1_param_value == NULL)
       
 13961               IN1_param_value = function_call_param_iterator.next();
       
 13962             if (IN1_param_value != NULL) {
       
 13963               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13964               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 13965             }
       
 13966             
       
 13967             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 13968             {
       
 13969         
       
 13970                 {
       
 13971                     identifier_c param_name("IN2");
       
 13972                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13973                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13974                     symbol_c *IN2_type_symbol = NULL;
       
 13975                     
       
 13976                     /* Get the value from a foo(<param_value>) style call */
       
 13977                     if (IN2_param_value == NULL)
       
 13978                       IN2_param_value = function_call_param_iterator.next();
       
 13979                     if (IN2_param_value != NULL) {
       
 13980                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13981                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 13982                     }
       
 13983                     
       
 13984                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 13985                     {
       
 13986                 
       
 13987                         symbol_c * return_type_symbol = last_type_symbol;
       
 13988                         return return_type_symbol;
       
 13989                         
       
 13990                     }
       
 13991                     
       
 13992                     
       
 13993                     ERROR;
       
 13994                 }
       
 13995                 
       
 13996             }
       
 13997             
       
 13998             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 13999             {
       
 14000         
       
 14001                 {
       
 14002                     identifier_c param_name("IN2");
       
 14003                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14004                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14005                     symbol_c *IN2_type_symbol = NULL;
       
 14006                     
       
 14007                     /* Get the value from a foo(<param_value>) style call */
       
 14008                     if (IN2_param_value == NULL)
       
 14009                       IN2_param_value = function_call_param_iterator.next();
       
 14010                     if (IN2_param_value != NULL) {
       
 14011                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14012                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14013                     }
       
 14014                     
       
 14015                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14016                     {
       
 14017                 
       
 14018                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14019                         return return_type_symbol;
       
 14020                         
       
 14021                     }
       
 14022                     
       
 14023                     
       
 14024                     ERROR;
       
 14025                 }
       
 14026                 
       
 14027             }
       
 14028             
       
 14029             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 14030             {
       
 14031         
       
 14032                 {
       
 14033                     identifier_c param_name("IN2");
       
 14034                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14035                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14036                     symbol_c *IN2_type_symbol = NULL;
       
 14037                     
       
 14038                     /* Get the value from a foo(<param_value>) style call */
       
 14039                     if (IN2_param_value == NULL)
       
 14040                       IN2_param_value = function_call_param_iterator.next();
       
 14041                     if (IN2_param_value != NULL) {
       
 14042                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14043                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14044                     }
       
 14045                     
       
 14046                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14047                     {
       
 14048                 
       
 14049                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14050                         return return_type_symbol;
       
 14051                         
       
 14052                     }
       
 14053                     
       
 14054                     
       
 14055                     ERROR;
       
 14056                 }
       
 14057                 
       
 14058             }
       
 14059             
       
 14060             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14061             {
       
 14062         
       
 14063                 {
       
 14064                     identifier_c param_name("IN2");
       
 14065                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14066                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14067                     symbol_c *IN2_type_symbol = NULL;
       
 14068                     
       
 14069                     /* Get the value from a foo(<param_value>) style call */
       
 14070                     if (IN2_param_value == NULL)
       
 14071                       IN2_param_value = function_call_param_iterator.next();
       
 14072                     if (IN2_param_value != NULL) {
       
 14073                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14074                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14075                     }
       
 14076                     
       
 14077                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14078                     {
       
 14079                 
       
 14080                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14081                         return return_type_symbol;
       
 14082                         
       
 14083                     }
       
 14084                     
       
 14085                     
       
 14086                     ERROR;
       
 14087                 }
       
 14088                 
       
 14089             }
       
 14090             
       
 14091             
       
 14092             ERROR;
       
 14093         }
       
 14094         
       
 14095     }/*function_add*/
       
 14096     break;
       
 14097 
       
 14098 /****
       
 14099  *MUL
       
 14100  */
       
 14101     case function_mul :
       
 14102     {
       
 14103         symbol_c *last_type_symbol = NULL;
       
 14104 
       
 14105         {
       
 14106             identifier_c param_name("IN1");
       
 14107             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14108             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14109             symbol_c *IN1_type_symbol = NULL;
       
 14110             
       
 14111             /* Get the value from a foo(<param_value>) style call */
       
 14112             if (IN1_param_value == NULL)
       
 14113               IN1_param_value = function_call_param_iterator.next();
       
 14114             if (IN1_param_value != NULL) {
       
 14115               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14116               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14117             }
       
 14118             
       
 14119             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 14120             {
       
 14121         
       
 14122                 {
       
 14123                     identifier_c param_name("IN2");
       
 14124                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14125                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14126                     symbol_c *IN2_type_symbol = NULL;
       
 14127                     
       
 14128                     /* Get the value from a foo(<param_value>) style call */
       
 14129                     if (IN2_param_value == NULL)
       
 14130                       IN2_param_value = function_call_param_iterator.next();
       
 14131                     if (IN2_param_value != NULL) {
       
 14132                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14133                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14134                     }
       
 14135                     
       
 14136                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 14137                     {
       
 14138                 
       
 14139                         symbol_c * return_type_symbol = last_type_symbol;
       
 14140                         return return_type_symbol;
       
 14141                         
       
 14142                     }
       
 14143                     
       
 14144                     
       
 14145                     ERROR;
       
 14146                 }
       
 14147                 
       
 14148             }
       
 14149             
       
 14150             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14151             {
       
 14152         
       
 14153                 {
       
 14154                     identifier_c param_name("IN2");
       
 14155                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14156                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14157                     symbol_c *IN2_type_symbol = NULL;
       
 14158                     
       
 14159                     /* Get the value from a foo(<param_value>) style call */
       
 14160                     if (IN2_param_value == NULL)
       
 14161                       IN2_param_value = function_call_param_iterator.next();
       
 14162                     if (IN2_param_value != NULL) {
       
 14163                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14164                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14165                     }
       
 14166                     
       
 14167                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 14168                     {
       
 14169                 
       
 14170                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14171                         return return_type_symbol;
       
 14172                         
       
 14173                     }
       
 14174                     
       
 14175                     
       
 14176                     ERROR;
       
 14177                 }
       
 14178                 
       
 14179             }
       
 14180             
       
 14181             
       
 14182             ERROR;
       
 14183         }
       
 14184         
       
 14185     }/*function_mul*/
       
 14186     break;
       
 14187 
       
 14188 /****
       
 14189  *SUB
       
 14190  */
       
 14191     case function_sub :
       
 14192     {
       
 14193         symbol_c *last_type_symbol = NULL;
       
 14194 
       
 14195         {
       
 14196             identifier_c param_name("IN1");
       
 14197             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14198             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14199             symbol_c *IN1_type_symbol = NULL;
       
 14200             
       
 14201             /* Get the value from a foo(<param_value>) style call */
       
 14202             if (IN1_param_value == NULL)
       
 14203               IN1_param_value = function_call_param_iterator.next();
       
 14204             if (IN1_param_value != NULL) {
       
 14205               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14206               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14207             }
       
 14208             
       
 14209             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 14210             {
       
 14211         
       
 14212                 {
       
 14213                     identifier_c param_name("IN2");
       
 14214                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14215                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14216                     symbol_c *IN2_type_symbol = NULL;
       
 14217                     
       
 14218                     /* Get the value from a foo(<param_value>) style call */
       
 14219                     if (IN2_param_value == NULL)
       
 14220                       IN2_param_value = function_call_param_iterator.next();
       
 14221                     if (IN2_param_value != NULL) {
       
 14222                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14223                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14224                     }
       
 14225                     
       
 14226                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 14227                     {
       
 14228                 
       
 14229                         symbol_c * return_type_symbol = last_type_symbol;
       
 14230                         return return_type_symbol;
       
 14231                         
       
 14232                     }
       
 14233                     
       
 14234                     
       
 14235                     ERROR;
       
 14236                 }
       
 14237                 
       
 14238             }
       
 14239             
       
 14240             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 14241             {
       
 14242         
       
 14243                 {
       
 14244                     identifier_c param_name("IN2");
       
 14245                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14246                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14247                     symbol_c *IN2_type_symbol = NULL;
       
 14248                     
       
 14249                     /* Get the value from a foo(<param_value>) style call */
       
 14250                     if (IN2_param_value == NULL)
       
 14251                       IN2_param_value = function_call_param_iterator.next();
       
 14252                     if (IN2_param_value != NULL) {
       
 14253                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14254                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14255                     }
       
 14256                     
       
 14257                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 14258                     {
       
 14259                 
       
 14260                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14261                         return return_type_symbol;
       
 14262                         
       
 14263                     }
       
 14264                     
       
 14265                     
       
 14266                     ERROR;
       
 14267                 }
       
 14268                 
       
 14269             }
       
 14270             
       
 14271             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 14272             {
       
 14273         
       
 14274                 {
       
 14275                     identifier_c param_name("IN2");
       
 14276                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14277                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14278                     symbol_c *IN2_type_symbol = NULL;
       
 14279                     
       
 14280                     /* Get the value from a foo(<param_value>) style call */
       
 14281                     if (IN2_param_value == NULL)
       
 14282                       IN2_param_value = function_call_param_iterator.next();
       
 14283                     if (IN2_param_value != NULL) {
       
 14284                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14285                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14286                     }
       
 14287                     
       
 14288                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 14289                     {
       
 14290                 
       
 14291                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14292                         return return_type_symbol;
       
 14293                         
       
 14294                     }
       
 14295                     
       
 14296                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14297                     {
       
 14298                 
       
 14299                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14300                         return return_type_symbol;
       
 14301                         
       
 14302                     }
       
 14303                     
       
 14304                     
       
 14305                     ERROR;
       
 14306                 }
       
 14307                 
       
 14308             }
       
 14309             
       
 14310             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 14311             {
       
 14312         
       
 14313                 {
       
 14314                     identifier_c param_name("IN2");
       
 14315                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14316                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14317                     symbol_c *IN2_type_symbol = NULL;
       
 14318                     
       
 14319                     /* Get the value from a foo(<param_value>) style call */
       
 14320                     if (IN2_param_value == NULL)
       
 14321                       IN2_param_value = function_call_param_iterator.next();
       
 14322                     if (IN2_param_value != NULL) {
       
 14323                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14324                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14325                     }
       
 14326                     
       
 14327                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 14328                     {
       
 14329                 
       
 14330                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14331                         return return_type_symbol;
       
 14332                         
       
 14333                     }
       
 14334                     
       
 14335                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14336                     {
       
 14337                 
       
 14338                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14339                         return return_type_symbol;
       
 14340                         
       
 14341                     }
       
 14342                     
       
 14343                     
       
 14344                     ERROR;
       
 14345                 }
       
 14346                 
       
 14347             }
       
 14348             
       
 14349             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14350             {
       
 14351         
       
 14352                 {
       
 14353                     identifier_c param_name("IN2");
       
 14354                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14355                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14356                     symbol_c *IN2_type_symbol = NULL;
       
 14357                     
       
 14358                     /* Get the value from a foo(<param_value>) style call */
       
 14359                     if (IN2_param_value == NULL)
       
 14360                       IN2_param_value = function_call_param_iterator.next();
       
 14361                     if (IN2_param_value != NULL) {
       
 14362                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14363                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14364                     }
       
 14365                     
       
 14366                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14367                     {
       
 14368                 
       
 14369                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14370                         return return_type_symbol;
       
 14371                         
       
 14372                     }
       
 14373                     
       
 14374                     
       
 14375                     ERROR;
       
 14376                 }
       
 14377                 
       
 14378             }
       
 14379             
       
 14380             
       
 14381             ERROR;
       
 14382         }
       
 14383         
       
 14384     }/*function_sub*/
       
 14385     break;
       
 14386 
       
 14387 /****
       
 14388  *DIV
       
 14389  */
       
 14390     case function_div :
       
 14391     {
       
 14392         symbol_c *last_type_symbol = NULL;
       
 14393 
       
 14394         {
       
 14395             identifier_c param_name("IN1");
       
 14396             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14397             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14398             symbol_c *IN1_type_symbol = NULL;
       
 14399             
       
 14400             /* Get the value from a foo(<param_value>) style call */
       
 14401             if (IN1_param_value == NULL)
       
 14402               IN1_param_value = function_call_param_iterator.next();
       
 14403             if (IN1_param_value != NULL) {
       
 14404               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14405               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14406             }
       
 14407             
       
 14408             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 14409             {
       
 14410         
       
 14411                 {
       
 14412                     identifier_c param_name("IN2");
       
 14413                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14414                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14415                     symbol_c *IN2_type_symbol = NULL;
       
 14416                     
       
 14417                     /* Get the value from a foo(<param_value>) style call */
       
 14418                     if (IN2_param_value == NULL)
       
 14419                       IN2_param_value = function_call_param_iterator.next();
       
 14420                     if (IN2_param_value != NULL) {
       
 14421                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14422                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14423                     }
       
 14424                     
       
 14425                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 14426                     {
       
 14427                 
       
 14428                         symbol_c * return_type_symbol = last_type_symbol;
       
 14429                         return return_type_symbol;
       
 14430                         
       
 14431                     }
       
 14432                     
       
 14433                     
       
 14434                     ERROR;
       
 14435                 }
       
 14436                 
       
 14437             }
       
 14438             
       
 14439             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 14440             {
       
 14441         
       
 14442                 {
       
 14443                     identifier_c param_name("IN2");
       
 14444                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14445                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14446                     symbol_c *IN2_type_symbol = NULL;
       
 14447                     
       
 14448                     /* Get the value from a foo(<param_value>) style call */
       
 14449                     if (IN2_param_value == NULL)
       
 14450                       IN2_param_value = function_call_param_iterator.next();
       
 14451                     if (IN2_param_value != NULL) {
       
 14452                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14453                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14454                     }
       
 14455                     
       
 14456                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 14457                     {
       
 14458                 
       
 14459                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14460                         return return_type_symbol;
       
 14461                         
       
 14462                     }
       
 14463                     
       
 14464                     
       
 14465                     ERROR;
       
 14466                 }
       
 14467                 
       
 14468             }
       
 14469             
       
 14470             
       
 14471             ERROR;
       
 14472         }
       
 14473         
       
 14474     }/*function_div*/
       
 14475     break;
       
 14476 
       
 14477 /****
       
 14478  *MOD
       
 14479  */
       
 14480     case function_mod :
       
 14481     {
       
 14482         symbol_c *last_type_symbol = NULL;
       
 14483 
       
 14484         {
       
 14485             identifier_c param_name("IN1");
       
 14486             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14487             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14488             symbol_c *IN1_type_symbol = NULL;
       
 14489             
       
 14490             /* Get the value from a foo(<param_value>) style call */
       
 14491             if (IN1_param_value == NULL)
       
 14492               IN1_param_value = function_call_param_iterator.next();
       
 14493             if (IN1_param_value != NULL) {
       
 14494               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14495               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14496             }
       
 14497             
       
 14498             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 14499             {
       
 14500         
       
 14501                 {
       
 14502                     identifier_c param_name("IN2");
       
 14503                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14504                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14505                     symbol_c *IN2_type_symbol = NULL;
       
 14506                     
       
 14507                     /* Get the value from a foo(<param_value>) style call */
       
 14508                     if (IN2_param_value == NULL)
       
 14509                       IN2_param_value = function_call_param_iterator.next();
       
 14510                     if (IN2_param_value != NULL) {
       
 14511                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14512                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14513                     }
       
 14514                     
       
 14515                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 14516                     {
       
 14517                 
       
 14518                         symbol_c * return_type_symbol = last_type_symbol;
       
 14519                         return return_type_symbol;
       
 14520                         
       
 14521                     }
       
 14522                     
       
 14523                     
       
 14524                     ERROR;
       
 14525                 }
       
 14526                 
       
 14527             }
       
 14528             
       
 14529             
       
 14530             ERROR;
       
 14531         }
       
 14532         
       
 14533     }/*function_mod*/
       
 14534     break;
       
 14535 
       
 14536 /****
       
 14537  *EXPT
       
 14538  */
       
 14539     case function_expt :
       
 14540     {
       
 14541         symbol_c *last_type_symbol = NULL;
       
 14542 
       
 14543         {
       
 14544             identifier_c param_name("IN1");
       
 14545             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14546             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14547             symbol_c *IN1_type_symbol = NULL;
       
 14548             
       
 14549             /* Get the value from a foo(<param_value>) style call */
       
 14550             if (IN1_param_value == NULL)
       
 14551               IN1_param_value = function_call_param_iterator.next();
       
 14552             if (IN1_param_value != NULL) {
       
 14553               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14554               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14555             }
       
 14556             
       
 14557             if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
       
 14558             {
       
 14559         
       
 14560                 {
       
 14561                     identifier_c param_name("IN2");
       
 14562                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14563                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14564                     symbol_c *IN2_type_symbol = NULL;
       
 14565                     
       
 14566                     /* Get the value from a foo(<param_value>) style call */
       
 14567                     if (IN2_param_value == NULL)
       
 14568                       IN2_param_value = function_call_param_iterator.next();
       
 14569                     if (IN2_param_value != NULL) {
       
 14570                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14571                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14572                     }
       
 14573                     
       
 14574                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 14575                     {
       
 14576                 
       
 14577                         symbol_c * return_type_symbol = last_type_symbol;
       
 14578                         return return_type_symbol;
       
 14579                         
       
 14580                     }
       
 14581                     
       
 14582                     
       
 14583                     ERROR;
       
 14584                 }
       
 14585                 
       
 14586             }
       
 14587             
       
 14588             
       
 14589             ERROR;
       
 14590         }
       
 14591         
       
 14592     }/*function_expt*/
       
 14593     break;
       
 14594 
       
 14595 /****
       
 14596  *MOVE
       
 14597  */
       
 14598     case function_move :
       
 14599     {
       
 14600         symbol_c *last_type_symbol = NULL;
       
 14601 
       
 14602         {
       
 14603             identifier_c param_name("IN");
       
 14604             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14605             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14606             symbol_c *IN_type_symbol = NULL;
       
 14607             
       
 14608             /* Get the value from a foo(<param_value>) style call */
       
 14609             if (IN_param_value == NULL)
       
 14610               IN_param_value = function_call_param_iterator.next();
       
 14611             if (IN_param_value != NULL) {
       
 14612               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14613               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14614             }
       
 14615             
       
 14616             
       
 14617             {
       
 14618         
       
 14619                 symbol_c * return_type_symbol = last_type_symbol;
       
 14620                 return return_type_symbol;
       
 14621                 
       
 14622             }
       
 14623             
       
 14624             
       
 14625             ERROR;
       
 14626         }
       
 14627         
       
 14628     }/*function_move*/
       
 14629     break;
       
 14630 
       
 14631 /****
       
 14632  *SHL
       
 14633  */
       
 14634     case function_shl :
       
 14635     {
       
 14636         symbol_c *last_type_symbol = NULL;
       
 14637 
       
 14638         {
       
 14639             identifier_c param_name("IN");
       
 14640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14642             symbol_c *IN_type_symbol = NULL;
       
 14643             
       
 14644             /* Get the value from a foo(<param_value>) style call */
       
 14645             if (IN_param_value == NULL)
       
 14646               IN_param_value = function_call_param_iterator.next();
       
 14647             if (IN_param_value != NULL) {
       
 14648               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14649               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14650             }
       
 14651             
       
 14652             if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
       
 14653             {
       
 14654         
       
 14655                 {
       
 14656                     identifier_c param_name("N");
       
 14657                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14658                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 14659                     symbol_c *N_type_symbol = NULL;
       
 14660                     
       
 14661                     /* Get the value from a foo(<param_value>) style call */
       
 14662                     if (N_param_value == NULL)
       
 14663                       N_param_value = function_call_param_iterator.next();
       
 14664                     if (N_param_value != NULL) {
       
 14665                       N_type_symbol = search_expression_type->get_type(N_param_value);
       
 14666                       last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 14667                     }
       
 14668                     
       
 14669                     if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
       
 14670                     {
       
 14671                 
       
 14672                         symbol_c * return_type_symbol = IN_type_symbol;
       
 14673                         return return_type_symbol;
       
 14674                         
       
 14675                     }
       
 14676                     
       
 14677                     
       
 14678                     ERROR;
       
 14679                 }
       
 14680                 
       
 14681             }
       
 14682             
       
 14683             
       
 14684             ERROR;
       
 14685         }
       
 14686         
       
 14687     }/*function_shl*/
       
 14688     break;
       
 14689 
       
 14690 /****
       
 14691  *SHR
       
 14692  */
       
 14693     case function_shr :
       
 14694     {
       
 14695         symbol_c *last_type_symbol = NULL;
       
 14696 
       
 14697         {
       
 14698             identifier_c param_name("IN");
       
 14699             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14700             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14701             symbol_c *IN_type_symbol = NULL;
       
 14702             
       
 14703             /* Get the value from a foo(<param_value>) style call */
       
 14704             if (IN_param_value == NULL)
       
 14705               IN_param_value = function_call_param_iterator.next();
       
 14706             if (IN_param_value != NULL) {
       
 14707               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14708               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14709             }
       
 14710             
       
 14711             if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
       
 14712             {
       
 14713         
       
 14714                 {
       
 14715                     identifier_c param_name("N");
       
 14716                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14717                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 14718                     symbol_c *N_type_symbol = NULL;
       
 14719                     
       
 14720                     /* Get the value from a foo(<param_value>) style call */
       
 14721                     if (N_param_value == NULL)
       
 14722                       N_param_value = function_call_param_iterator.next();
       
 14723                     if (N_param_value != NULL) {
       
 14724                       N_type_symbol = search_expression_type->get_type(N_param_value);
       
 14725                       last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 14726                     }
       
 14727                     
       
 14728                     if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
       
 14729                     {
       
 14730                 
       
 14731                         symbol_c * return_type_symbol = IN_type_symbol;
       
 14732                         return return_type_symbol;
       
 14733                         
       
 14734                     }
       
 14735                     
       
 14736                     
       
 14737                     ERROR;
       
 14738                 }
       
 14739                 
       
 14740             }
       
 14741             
       
 14742             
       
 14743             ERROR;
       
 14744         }
       
 14745         
       
 14746     }/*function_shr*/
       
 14747     break;
       
 14748 
       
 14749 /****
       
 14750  *ROR
       
 14751  */
       
 14752     case function_ror :
       
 14753     {
       
 14754         symbol_c *last_type_symbol = NULL;
       
 14755 
       
 14756         {
       
 14757             identifier_c param_name("IN");
       
 14758             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14759             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14760             symbol_c *IN_type_symbol = NULL;
       
 14761             
       
 14762             /* Get the value from a foo(<param_value>) style call */
       
 14763             if (IN_param_value == NULL)
       
 14764               IN_param_value = function_call_param_iterator.next();
       
 14765             if (IN_param_value != NULL) {
       
 14766               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14767               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14768             }
       
 14769             
       
 14770             if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
       
 14771             {
       
 14772         
       
 14773                 {
       
 14774                     identifier_c param_name("N");
       
 14775                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14776                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 14777                     symbol_c *N_type_symbol = NULL;
       
 14778                     
       
 14779                     /* Get the value from a foo(<param_value>) style call */
       
 14780                     if (N_param_value == NULL)
       
 14781                       N_param_value = function_call_param_iterator.next();
       
 14782                     if (N_param_value != NULL) {
       
 14783                       N_type_symbol = search_expression_type->get_type(N_param_value);
       
 14784                       last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 14785                     }
       
 14786                     
       
 14787                     if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
       
 14788                     {
       
 14789                 
       
 14790                         symbol_c * return_type_symbol = IN_type_symbol;
       
 14791                         return return_type_symbol;
       
 14792                         
       
 14793                     }
       
 14794                     
       
 14795                     
       
 14796                     ERROR;
       
 14797                 }
       
 14798                 
       
 14799             }
       
 14800             
       
 14801             
       
 14802             ERROR;
       
 14803         }
       
 14804         
       
 14805     }/*function_ror*/
       
 14806     break;
       
 14807 
       
 14808 /****
       
 14809  *ROL
       
 14810  */
       
 14811     case function_rol :
       
 14812     {
       
 14813         symbol_c *last_type_symbol = NULL;
       
 14814 
       
 14815         {
       
 14816             identifier_c param_name("IN");
       
 14817             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14818             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14819             symbol_c *IN_type_symbol = NULL;
       
 14820             
       
 14821             /* Get the value from a foo(<param_value>) style call */
       
 14822             if (IN_param_value == NULL)
       
 14823               IN_param_value = function_call_param_iterator.next();
       
 14824             if (IN_param_value != NULL) {
       
 14825               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14826               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14827             }
       
 14828             
       
 14829             if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
       
 14830             {
       
 14831         
       
 14832                 {
       
 14833                     identifier_c param_name("N");
       
 14834                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14835                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 14836                     symbol_c *N_type_symbol = NULL;
       
 14837                     
       
 14838                     /* Get the value from a foo(<param_value>) style call */
       
 14839                     if (N_param_value == NULL)
       
 14840                       N_param_value = function_call_param_iterator.next();
       
 14841                     if (N_param_value != NULL) {
       
 14842                       N_type_symbol = search_expression_type->get_type(N_param_value);
       
 14843                       last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 14844                     }
       
 14845                     
       
 14846                     if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
       
 14847                     {
       
 14848                 
       
 14849                         symbol_c * return_type_symbol = IN_type_symbol;
       
 14850                         return return_type_symbol;
       
 14851                         
       
 14852                     }
       
 14853                     
       
 14854                     
       
 14855                     ERROR;
       
 14856                 }
       
 14857                 
       
 14858             }
       
 14859             
       
 14860             
       
 14861             ERROR;
       
 14862         }
       
 14863         
       
 14864     }/*function_rol*/
       
 14865     break;
       
 14866 
       
 14867 /****
       
 14868  *AND
       
 14869  */
       
 14870     case function_and :
       
 14871     {
       
 14872         symbol_c *last_type_symbol = NULL;
       
 14873 
       
 14874         {
       
 14875             identifier_c param_name("IN1");
       
 14876             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14877             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14878             symbol_c *IN1_type_symbol = NULL;
       
 14879             
       
 14880             /* Get the value from a foo(<param_value>) style call */
       
 14881             if (IN1_param_value == NULL)
       
 14882               IN1_param_value = function_call_param_iterator.next();
       
 14883             if (IN1_param_value != NULL) {
       
 14884               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14885               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14886             }
       
 14887             
       
 14888             if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
       
 14889             {
       
 14890         
       
 14891                 {
       
 14892                     identifier_c param_name("IN2");
       
 14893                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14894                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14895                     symbol_c *IN2_type_symbol = NULL;
       
 14896                     
       
 14897                     /* Get the value from a foo(<param_value>) style call */
       
 14898                     if (IN2_param_value == NULL)
       
 14899                       IN2_param_value = function_call_param_iterator.next();
       
 14900                     if (IN2_param_value != NULL) {
       
 14901                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14902                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14903                     }
       
 14904                     
       
 14905                     if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
       
 14906                     {
       
 14907                 
       
 14908                         symbol_c * return_type_symbol = last_type_symbol;
       
 14909                         return return_type_symbol;
       
 14910                         
       
 14911                     }
       
 14912                     
       
 14913                     
       
 14914                     ERROR;
       
 14915                 }
       
 14916                 
       
 14917             }
       
 14918             
       
 14919             
       
 14920             ERROR;
       
 14921         }
       
 14922         
       
 14923     }/*function_and*/
       
 14924     break;
       
 14925 
       
 14926 /****
       
 14927  *OR
       
 14928  */
       
 14929     case function_or :
       
 14930     {
       
 14931         symbol_c *last_type_symbol = NULL;
       
 14932 
       
 14933         {
       
 14934             identifier_c param_name("IN1");
       
 14935             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14936             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14937             symbol_c *IN1_type_symbol = NULL;
       
 14938             
       
 14939             /* Get the value from a foo(<param_value>) style call */
       
 14940             if (IN1_param_value == NULL)
       
 14941               IN1_param_value = function_call_param_iterator.next();
       
 14942             if (IN1_param_value != NULL) {
       
 14943               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14944               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 14945             }
       
 14946             
       
 14947             if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
       
 14948             {
       
 14949         
       
 14950                 {
       
 14951                     identifier_c param_name("IN2");
       
 14952                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14953                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14954                     symbol_c *IN2_type_symbol = NULL;
       
 14955                     
       
 14956                     /* Get the value from a foo(<param_value>) style call */
       
 14957                     if (IN2_param_value == NULL)
       
 14958                       IN2_param_value = function_call_param_iterator.next();
       
 14959                     if (IN2_param_value != NULL) {
       
 14960                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14961                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 14962                     }
       
 14963                     
       
 14964                     if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
       
 14965                     {
       
 14966                 
       
 14967                         symbol_c * return_type_symbol = last_type_symbol;
       
 14968                         return return_type_symbol;
       
 14969                         
       
 14970                     }
       
 14971                     
       
 14972                     
       
 14973                     ERROR;
       
 14974                 }
       
 14975                 
       
 14976             }
       
 14977             
       
 14978             
       
 14979             ERROR;
       
 14980         }
       
 14981         
       
 14982     }/*function_or*/
       
 14983     break;
       
 14984 
       
 14985 /****
       
 14986  *XOR
       
 14987  */
       
 14988     case function_xor :
       
 14989     {
       
 14990         symbol_c *last_type_symbol = NULL;
       
 14991 
       
 14992         {
       
 14993             identifier_c param_name("IN1");
       
 14994             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14995             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14996             symbol_c *IN1_type_symbol = NULL;
       
 14997             
       
 14998             /* Get the value from a foo(<param_value>) style call */
       
 14999             if (IN1_param_value == NULL)
       
 15000               IN1_param_value = function_call_param_iterator.next();
       
 15001             if (IN1_param_value != NULL) {
       
 15002               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15003               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15004             }
       
 15005             
       
 15006             if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
       
 15007             {
       
 15008         
       
 15009                 {
       
 15010                     identifier_c param_name("IN2");
       
 15011                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15012                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15013                     symbol_c *IN2_type_symbol = NULL;
       
 15014                     
       
 15015                     /* Get the value from a foo(<param_value>) style call */
       
 15016                     if (IN2_param_value == NULL)
       
 15017                       IN2_param_value = function_call_param_iterator.next();
       
 15018                     if (IN2_param_value != NULL) {
       
 15019                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15020                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15021                     }
       
 15022                     
       
 15023                     if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
       
 15024                     {
       
 15025                 
       
 15026                         symbol_c * return_type_symbol = last_type_symbol;
       
 15027                         return return_type_symbol;
       
 15028                         
       
 15029                     }
       
 15030                     
       
 15031                     
       
 15032                     ERROR;
       
 15033                 }
       
 15034                 
       
 15035             }
       
 15036             
       
 15037             
       
 15038             ERROR;
       
 15039         }
       
 15040         
       
 15041     }/*function_xor*/
       
 15042     break;
       
 15043 
       
 15044 /****
       
 15045  *NOT
       
 15046  */
       
 15047     case function_not :
       
 15048     {
       
 15049         symbol_c *last_type_symbol = NULL;
       
 15050 
       
 15051         {
       
 15052             identifier_c param_name("IN");
       
 15053             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15054             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15055             symbol_c *IN_type_symbol = NULL;
       
 15056             
       
 15057             /* Get the value from a foo(<param_value>) style call */
       
 15058             if (IN_param_value == NULL)
       
 15059               IN_param_value = function_call_param_iterator.next();
       
 15060             if (IN_param_value != NULL) {
       
 15061               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15062               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15063             }
       
 15064             
       
 15065             if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
       
 15066             {
       
 15067         
       
 15068                 symbol_c * return_type_symbol = IN_type_symbol;
       
 15069                 return return_type_symbol;
       
 15070                 
       
 15071             }
       
 15072             
       
 15073             
       
 15074             ERROR;
       
 15075         }
       
 15076         
       
 15077     }/*function_not*/
       
 15078     break;
       
 15079 
       
 15080 /****
       
 15081  *SEL
       
 15082  */
       
 15083     case function_sel :
       
 15084     {
       
 15085         symbol_c *last_type_symbol = NULL;
       
 15086 
       
 15087         {
       
 15088             identifier_c param_name("G");
       
 15089             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15090             symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
       
 15091             symbol_c *G_type_symbol = NULL;
       
 15092             
       
 15093             /* Get the value from a foo(<param_value>) style call */
       
 15094             if (G_param_value == NULL)
       
 15095               G_param_value = function_call_param_iterator.next();
       
 15096             if (G_param_value != NULL) {
       
 15097               G_type_symbol = search_expression_type->get_type(G_param_value);
       
 15098               last_type_symbol = last_type_symbol && G_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ;
       
 15099             }
       
 15100             
       
 15101             if(G_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 15102             {
       
 15103         
       
 15104                 {
       
 15105                     identifier_c param_name("IN0");
       
 15106                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15107                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 15108                     symbol_c *IN0_type_symbol = NULL;
       
 15109                     
       
 15110                     /* Get the value from a foo(<param_value>) style call */
       
 15111                     if (IN0_param_value == NULL)
       
 15112                       IN0_param_value = function_call_param_iterator.next();
       
 15113                     if (IN0_param_value != NULL) {
       
 15114                       IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 15115                       last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
       
 15116                     }
       
 15117                     
       
 15118                     
       
 15119                     {
       
 15120                 
       
 15121                         {
       
 15122                             identifier_c param_name("IN1");
       
 15123                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15124                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15125                             symbol_c *IN1_type_symbol = NULL;
       
 15126                             
       
 15127                             /* Get the value from a foo(<param_value>) style call */
       
 15128                             if (IN1_param_value == NULL)
       
 15129                               IN1_param_value = function_call_param_iterator.next();
       
 15130                             if (IN1_param_value != NULL) {
       
 15131                               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15132                               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15133                             }
       
 15134                             
       
 15135                             
       
 15136                             {
       
 15137                         
       
 15138                                 symbol_c * return_type_symbol = last_type_symbol;
       
 15139                                 return return_type_symbol;
       
 15140                                 
       
 15141                             }
       
 15142                             
       
 15143                             
       
 15144                             ERROR;
       
 15145                         }
       
 15146                         
       
 15147                     }
       
 15148                     
       
 15149                     
       
 15150                     ERROR;
       
 15151                 }
       
 15152                 
       
 15153             }
       
 15154             
       
 15155             
       
 15156             ERROR;
       
 15157         }
       
 15158         
       
 15159     }/*function_sel*/
       
 15160     break;
       
 15161 
       
 15162 /****
       
 15163  *MAX
       
 15164  */
       
 15165     case function_max :
       
 15166     {
       
 15167         symbol_c *last_type_symbol = NULL;
       
 15168 
       
 15169         {
       
 15170             identifier_c param_name("IN1");
       
 15171             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15172             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15173             symbol_c *IN1_type_symbol = NULL;
       
 15174             
       
 15175             /* Get the value from a foo(<param_value>) style call */
       
 15176             if (IN1_param_value == NULL)
       
 15177               IN1_param_value = function_call_param_iterator.next();
       
 15178             if (IN1_param_value != NULL) {
       
 15179               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15180               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15181             }
       
 15182             
       
 15183             
       
 15184             {
       
 15185         
       
 15186                 {
       
 15187                     identifier_c param_name("IN2");
       
 15188                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15189                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15190                     symbol_c *IN2_type_symbol = NULL;
       
 15191                     
       
 15192                     /* Get the value from a foo(<param_value>) style call */
       
 15193                     if (IN2_param_value == NULL)
       
 15194                       IN2_param_value = function_call_param_iterator.next();
       
 15195                     if (IN2_param_value != NULL) {
       
 15196                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15197                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15198                     }
       
 15199                     
       
 15200                     
       
 15201                     {
       
 15202                 
       
 15203                         symbol_c * return_type_symbol = last_type_symbol;
       
 15204                         return return_type_symbol;
       
 15205                         
       
 15206                     }
       
 15207                     
       
 15208                     
       
 15209                     ERROR;
       
 15210                 }
       
 15211                 
       
 15212             }
       
 15213             
       
 15214             
       
 15215             ERROR;
       
 15216         }
       
 15217         
       
 15218     }/*function_max*/
       
 15219     break;
       
 15220 
       
 15221 /****
       
 15222  *MIN
       
 15223  */
       
 15224     case function_min :
       
 15225     {
       
 15226         symbol_c *last_type_symbol = NULL;
       
 15227 
       
 15228         {
       
 15229             identifier_c param_name("IN1");
       
 15230             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15231             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15232             symbol_c *IN1_type_symbol = NULL;
       
 15233             
       
 15234             /* Get the value from a foo(<param_value>) style call */
       
 15235             if (IN1_param_value == NULL)
       
 15236               IN1_param_value = function_call_param_iterator.next();
       
 15237             if (IN1_param_value != NULL) {
       
 15238               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15239               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15240             }
       
 15241             
       
 15242             
       
 15243             {
       
 15244         
       
 15245                 {
       
 15246                     identifier_c param_name("IN2");
       
 15247                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15248                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15249                     symbol_c *IN2_type_symbol = NULL;
       
 15250                     
       
 15251                     /* Get the value from a foo(<param_value>) style call */
       
 15252                     if (IN2_param_value == NULL)
       
 15253                       IN2_param_value = function_call_param_iterator.next();
       
 15254                     if (IN2_param_value != NULL) {
       
 15255                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15256                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15257                     }
       
 15258                     
       
 15259                     
       
 15260                     {
       
 15261                 
       
 15262                         symbol_c * return_type_symbol = last_type_symbol;
       
 15263                         return return_type_symbol;
       
 15264                         
       
 15265                     }
       
 15266                     
       
 15267                     
       
 15268                     ERROR;
       
 15269                 }
       
 15270                 
       
 15271             }
       
 15272             
       
 15273             
       
 15274             ERROR;
       
 15275         }
       
 15276         
       
 15277     }/*function_min*/
       
 15278     break;
       
 15279 
       
 15280 /****
       
 15281  *LIMIT
       
 15282  */
       
 15283     case function_limit :
       
 15284     {
       
 15285         symbol_c *last_type_symbol = NULL;
       
 15286 
       
 15287         {
       
 15288             identifier_c param_name("MN");
       
 15289             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15290             symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
       
 15291             symbol_c *MN_type_symbol = NULL;
       
 15292             
       
 15293             /* Get the value from a foo(<param_value>) style call */
       
 15294             if (MN_param_value == NULL)
       
 15295               MN_param_value = function_call_param_iterator.next();
       
 15296             if (MN_param_value != NULL) {
       
 15297               MN_type_symbol = search_expression_type->get_type(MN_param_value);
       
 15298               last_type_symbol = last_type_symbol && MN_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ;
       
 15299             }
       
 15300             
       
 15301             
       
 15302             {
       
 15303         
       
 15304                 {
       
 15305                     identifier_c param_name("IN");
       
 15306                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15307                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15308                     symbol_c *IN_type_symbol = NULL;
       
 15309                     
       
 15310                     /* Get the value from a foo(<param_value>) style call */
       
 15311                     if (IN_param_value == NULL)
       
 15312                       IN_param_value = function_call_param_iterator.next();
       
 15313                     if (IN_param_value != NULL) {
       
 15314                       IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15315                       last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15316                     }
       
 15317                     
       
 15318                     
       
 15319                     {
       
 15320                 
       
 15321                         {
       
 15322                             identifier_c param_name("MX");
       
 15323                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15324                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
       
 15325                             symbol_c *MX_type_symbol = NULL;
       
 15326                             
       
 15327                             /* Get the value from a foo(<param_value>) style call */
       
 15328                             if (MX_param_value == NULL)
       
 15329                               MX_param_value = function_call_param_iterator.next();
       
 15330                             if (MX_param_value != NULL) {
       
 15331                               MX_type_symbol = search_expression_type->get_type(MX_param_value);
       
 15332                               last_type_symbol = last_type_symbol && MX_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
       
 15333                             }
       
 15334                             
       
 15335                             
       
 15336                             {
       
 15337                         
       
 15338                                 symbol_c * return_type_symbol = IN_type_symbol;
       
 15339                                 return return_type_symbol;
       
 15340                                 
       
 15341                             }
       
 15342                             
       
 15343                             
       
 15344                             ERROR;
       
 15345                         }
       
 15346                         
       
 15347                     }
       
 15348                     
       
 15349                     
       
 15350                     ERROR;
       
 15351                 }
       
 15352                 
       
 15353             }
       
 15354             
       
 15355             
       
 15356             ERROR;
       
 15357         }
       
 15358         
       
 15359     }/*function_limit*/
       
 15360     break;
       
 15361 
       
 15362 /****
       
 15363  *MUX
       
 15364  */
       
 15365     case function_mux :
       
 15366     {
       
 15367         symbol_c *last_type_symbol = NULL;
       
 15368 
       
 15369         {
       
 15370             identifier_c param_name("K");
       
 15371             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15372             symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
       
 15373             symbol_c *K_type_symbol = NULL;
       
 15374             
       
 15375             /* Get the value from a foo(<param_value>) style call */
       
 15376             if (K_param_value == NULL)
       
 15377               K_param_value = function_call_param_iterator.next();
       
 15378             if (K_param_value != NULL) {
       
 15379               K_type_symbol = search_expression_type->get_type(K_param_value);
       
 15380               last_type_symbol = last_type_symbol && K_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ;
       
 15381             }
       
 15382             
       
 15383             if(K_type_symbol == NULL || search_expression_type->is_integer_type(K_type_symbol))
       
 15384             {
       
 15385         
       
 15386                 {
       
 15387                     identifier_c param_name("IN0");
       
 15388                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15389                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 15390                     symbol_c *IN0_type_symbol = NULL;
       
 15391                     
       
 15392                     /* Get the value from a foo(<param_value>) style call */
       
 15393                     if (IN0_param_value == NULL)
       
 15394                       IN0_param_value = function_call_param_iterator.next();
       
 15395                     if (IN0_param_value != NULL) {
       
 15396                       IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 15397                       last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
       
 15398                     }
       
 15399                     
       
 15400                     
       
 15401                     {
       
 15402                 
       
 15403                         {
       
 15404                             identifier_c param_name("IN1");
       
 15405                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15406                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15407                             symbol_c *IN1_type_symbol = NULL;
       
 15408                             
       
 15409                             /* Get the value from a foo(<param_value>) style call */
       
 15410                             if (IN1_param_value == NULL)
       
 15411                               IN1_param_value = function_call_param_iterator.next();
       
 15412                             if (IN1_param_value != NULL) {
       
 15413                               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15414                               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15415                             }
       
 15416                             
       
 15417                             
       
 15418                             {
       
 15419                         
       
 15420                                 symbol_c * return_type_symbol = last_type_symbol;
       
 15421                                 return return_type_symbol;
       
 15422                                 
       
 15423                             }
       
 15424                             
       
 15425                             
       
 15426                             ERROR;
       
 15427                         }
       
 15428                         
       
 15429                     }
       
 15430                     
       
 15431                     
       
 15432                     ERROR;
       
 15433                 }
       
 15434                 
       
 15435             }
       
 15436             
       
 15437             
       
 15438             ERROR;
       
 15439         }
       
 15440         
       
 15441     }/*function_mux*/
       
 15442     break;
       
 15443 
       
 15444 /****
       
 15445  *GT
       
 15446  */
       
 15447     case function_gt :
       
 15448     {
       
 15449         symbol_c *last_type_symbol = NULL;
       
 15450 
       
 15451         {
       
 15452             identifier_c param_name("IN1");
       
 15453             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15454             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15455             symbol_c *IN1_type_symbol = NULL;
       
 15456             
       
 15457             /* Get the value from a foo(<param_value>) style call */
       
 15458             if (IN1_param_value == NULL)
       
 15459               IN1_param_value = function_call_param_iterator.next();
       
 15460             if (IN1_param_value != NULL) {
       
 15461               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15462               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15463             }
       
 15464             
       
 15465             
       
 15466             {
       
 15467         
       
 15468                 {
       
 15469                     identifier_c param_name("IN2");
       
 15470                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15471                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15472                     symbol_c *IN2_type_symbol = NULL;
       
 15473                     
       
 15474                     /* Get the value from a foo(<param_value>) style call */
       
 15475                     if (IN2_param_value == NULL)
       
 15476                       IN2_param_value = function_call_param_iterator.next();
       
 15477                     if (IN2_param_value != NULL) {
       
 15478                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15479                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15480                     }
       
 15481                     
       
 15482                     
       
 15483                     {
       
 15484                 
       
 15485                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15486                         return return_type_symbol;
       
 15487                         
       
 15488                     }
       
 15489                     
       
 15490                     
       
 15491                     ERROR;
       
 15492                 }
       
 15493                 
       
 15494             }
       
 15495             
       
 15496             
       
 15497             ERROR;
       
 15498         }
       
 15499         
       
 15500     }/*function_gt*/
       
 15501     break;
       
 15502 
       
 15503 /****
       
 15504  *GE
       
 15505  */
       
 15506     case function_ge :
       
 15507     {
       
 15508         symbol_c *last_type_symbol = NULL;
       
 15509 
       
 15510         {
       
 15511             identifier_c param_name("IN1");
       
 15512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15513             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15514             symbol_c *IN1_type_symbol = NULL;
       
 15515             
       
 15516             /* Get the value from a foo(<param_value>) style call */
       
 15517             if (IN1_param_value == NULL)
       
 15518               IN1_param_value = function_call_param_iterator.next();
       
 15519             if (IN1_param_value != NULL) {
       
 15520               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15521               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15522             }
       
 15523             
       
 15524             
       
 15525             {
       
 15526         
       
 15527                 {
       
 15528                     identifier_c param_name("IN2");
       
 15529                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15530                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15531                     symbol_c *IN2_type_symbol = NULL;
       
 15532                     
       
 15533                     /* Get the value from a foo(<param_value>) style call */
       
 15534                     if (IN2_param_value == NULL)
       
 15535                       IN2_param_value = function_call_param_iterator.next();
       
 15536                     if (IN2_param_value != NULL) {
       
 15537                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15538                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15539                     }
       
 15540                     
       
 15541                     
       
 15542                     {
       
 15543                 
       
 15544                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15545                         return return_type_symbol;
       
 15546                         
       
 15547                     }
       
 15548                     
       
 15549                     
       
 15550                     ERROR;
       
 15551                 }
       
 15552                 
       
 15553             }
       
 15554             
       
 15555             
       
 15556             ERROR;
       
 15557         }
       
 15558         
       
 15559     }/*function_ge*/
       
 15560     break;
       
 15561 
       
 15562 /****
       
 15563  *EQ
       
 15564  */
       
 15565     case function_eq :
       
 15566     {
       
 15567         symbol_c *last_type_symbol = NULL;
       
 15568 
       
 15569         {
       
 15570             identifier_c param_name("IN1");
       
 15571             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15572             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15573             symbol_c *IN1_type_symbol = NULL;
       
 15574             
       
 15575             /* Get the value from a foo(<param_value>) style call */
       
 15576             if (IN1_param_value == NULL)
       
 15577               IN1_param_value = function_call_param_iterator.next();
       
 15578             if (IN1_param_value != NULL) {
       
 15579               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15580               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15581             }
       
 15582             
       
 15583             
       
 15584             {
       
 15585         
       
 15586                 {
       
 15587                     identifier_c param_name("IN2");
       
 15588                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15589                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15590                     symbol_c *IN2_type_symbol = NULL;
       
 15591                     
       
 15592                     /* Get the value from a foo(<param_value>) style call */
       
 15593                     if (IN2_param_value == NULL)
       
 15594                       IN2_param_value = function_call_param_iterator.next();
       
 15595                     if (IN2_param_value != NULL) {
       
 15596                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15597                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15598                     }
       
 15599                     
       
 15600                     
       
 15601                     {
       
 15602                 
       
 15603                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15604                         return return_type_symbol;
       
 15605                         
       
 15606                     }
       
 15607                     
       
 15608                     
       
 15609                     ERROR;
       
 15610                 }
       
 15611                 
       
 15612             }
       
 15613             
       
 15614             
       
 15615             ERROR;
       
 15616         }
       
 15617         
       
 15618     }/*function_eq*/
       
 15619     break;
       
 15620 
       
 15621 /****
       
 15622  *LT
       
 15623  */
       
 15624     case function_lt :
       
 15625     {
       
 15626         symbol_c *last_type_symbol = NULL;
       
 15627 
       
 15628         {
       
 15629             identifier_c param_name("IN1");
       
 15630             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15631             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15632             symbol_c *IN1_type_symbol = NULL;
       
 15633             
       
 15634             /* Get the value from a foo(<param_value>) style call */
       
 15635             if (IN1_param_value == NULL)
       
 15636               IN1_param_value = function_call_param_iterator.next();
       
 15637             if (IN1_param_value != NULL) {
       
 15638               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15639               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15640             }
       
 15641             
       
 15642             
       
 15643             {
       
 15644         
       
 15645                 {
       
 15646                     identifier_c param_name("IN2");
       
 15647                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15648                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15649                     symbol_c *IN2_type_symbol = NULL;
       
 15650                     
       
 15651                     /* Get the value from a foo(<param_value>) style call */
       
 15652                     if (IN2_param_value == NULL)
       
 15653                       IN2_param_value = function_call_param_iterator.next();
       
 15654                     if (IN2_param_value != NULL) {
       
 15655                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15656                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15657                     }
       
 15658                     
       
 15659                     
       
 15660                     {
       
 15661                 
       
 15662                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15663                         return return_type_symbol;
       
 15664                         
       
 15665                     }
       
 15666                     
       
 15667                     
       
 15668                     ERROR;
       
 15669                 }
       
 15670                 
       
 15671             }
       
 15672             
       
 15673             
       
 15674             ERROR;
       
 15675         }
       
 15676         
       
 15677     }/*function_lt*/
       
 15678     break;
       
 15679 
       
 15680 /****
       
 15681  *LE
       
 15682  */
       
 15683     case function_le :
       
 15684     {
       
 15685         symbol_c *last_type_symbol = NULL;
       
 15686 
       
 15687         {
       
 15688             identifier_c param_name("IN1");
       
 15689             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15690             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15691             symbol_c *IN1_type_symbol = NULL;
       
 15692             
       
 15693             /* Get the value from a foo(<param_value>) style call */
       
 15694             if (IN1_param_value == NULL)
       
 15695               IN1_param_value = function_call_param_iterator.next();
       
 15696             if (IN1_param_value != NULL) {
       
 15697               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15698               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15699             }
       
 15700             
       
 15701             
       
 15702             {
       
 15703         
       
 15704                 {
       
 15705                     identifier_c param_name("IN2");
       
 15706                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15707                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15708                     symbol_c *IN2_type_symbol = NULL;
       
 15709                     
       
 15710                     /* Get the value from a foo(<param_value>) style call */
       
 15711                     if (IN2_param_value == NULL)
       
 15712                       IN2_param_value = function_call_param_iterator.next();
       
 15713                     if (IN2_param_value != NULL) {
       
 15714                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15715                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15716                     }
       
 15717                     
       
 15718                     
       
 15719                     {
       
 15720                 
       
 15721                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15722                         return return_type_symbol;
       
 15723                         
       
 15724                     }
       
 15725                     
       
 15726                     
       
 15727                     ERROR;
       
 15728                 }
       
 15729                 
       
 15730             }
       
 15731             
       
 15732             
       
 15733             ERROR;
       
 15734         }
       
 15735         
       
 15736     }/*function_le*/
       
 15737     break;
       
 15738 
       
 15739 /****
       
 15740  *NE
       
 15741  */
       
 15742     case function_ne :
       
 15743     {
       
 15744         symbol_c *last_type_symbol = NULL;
       
 15745 
       
 15746         {
       
 15747             identifier_c param_name("IN1");
       
 15748             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15749             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 15750             symbol_c *IN1_type_symbol = NULL;
       
 15751             
       
 15752             /* Get the value from a foo(<param_value>) style call */
       
 15753             if (IN1_param_value == NULL)
       
 15754               IN1_param_value = function_call_param_iterator.next();
       
 15755             if (IN1_param_value != NULL) {
       
 15756               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 15757               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 15758             }
       
 15759             
       
 15760             
       
 15761             {
       
 15762         
       
 15763                 {
       
 15764                     identifier_c param_name("IN2");
       
 15765                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15766                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 15767                     symbol_c *IN2_type_symbol = NULL;
       
 15768                     
       
 15769                     /* Get the value from a foo(<param_value>) style call */
       
 15770                     if (IN2_param_value == NULL)
       
 15771                       IN2_param_value = function_call_param_iterator.next();
       
 15772                     if (IN2_param_value != NULL) {
       
 15773                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 15774                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 15775                     }
       
 15776                     
       
 15777                     
       
 15778                     {
       
 15779                 
       
 15780                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15781                         return return_type_symbol;
       
 15782                         
       
 15783                     }
       
 15784                     
       
 15785                     
       
 15786                     ERROR;
       
 15787                 }
       
 15788                 
       
 15789             }
       
 15790             
       
 15791             
       
 15792             ERROR;
       
 15793         }
       
 15794         
       
 15795     }/*function_ne*/
       
 15796     break;
       
 15797 
       
 15798 /****
       
 15799  *LEN
       
 15800  */
       
 15801     case function_len :
       
 15802     {
       
 15803         symbol_c *last_type_symbol = NULL;
       
 15804 
       
 15805         {
       
 15806             identifier_c param_name("IN");
       
 15807             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15808             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15809             symbol_c *IN_type_symbol = NULL;
       
 15810             
       
 15811             /* Get the value from a foo(<param_value>) style call */
       
 15812             if (IN_param_value == NULL)
       
 15813               IN_param_value = function_call_param_iterator.next();
       
 15814             if (IN_param_value != NULL) {
       
 15815               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15816               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15817             }
       
 15818             
       
 15819             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 15820             {
       
 15821         
       
 15822                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 15823                 return return_type_symbol;
       
 15824                 
       
 15825             }
       
 15826             
       
 15827             
       
 15828             ERROR;
       
 15829         }
       
 15830         
       
 15831     }/*function_len*/
       
 15832     break;
       
 15833 
       
 15834 /****
       
 15835  *LEFT
       
 15836  */
       
 15837     case function_left :
       
 15838     {
       
 15839         symbol_c *last_type_symbol = NULL;
       
 15840 
       
 15841         {
       
 15842             identifier_c param_name("IN");
       
 15843             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15844             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15845             symbol_c *IN_type_symbol = NULL;
       
 15846             
       
 15847             /* Get the value from a foo(<param_value>) style call */
       
 15848             if (IN_param_value == NULL)
       
 15849               IN_param_value = function_call_param_iterator.next();
       
 15850             if (IN_param_value != NULL) {
       
 15851               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15852               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15853             }
       
 15854             
       
 15855             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 15856             {
       
 15857         
       
 15858                 {
       
 15859                     identifier_c param_name("L");
       
 15860                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15861                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 15862                     symbol_c *L_type_symbol = NULL;
       
 15863                     
       
 15864                     /* Get the value from a foo(<param_value>) style call */
       
 15865                     if (L_param_value == NULL)
       
 15866                       L_param_value = function_call_param_iterator.next();
       
 15867                     if (L_param_value != NULL) {
       
 15868                       L_type_symbol = search_expression_type->get_type(L_param_value);
       
 15869                       last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 15870                     }
       
 15871                     
       
 15872                     if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 15873                     {
       
 15874                 
       
 15875                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15876                         return return_type_symbol;
       
 15877                         
       
 15878                     }
       
 15879                     
       
 15880                     
       
 15881                     ERROR;
       
 15882                 }
       
 15883                 
       
 15884             }
       
 15885             
       
 15886             
       
 15887             ERROR;
       
 15888         }
       
 15889         
       
 15890     }/*function_left*/
       
 15891     break;
       
 15892 
       
 15893 /****
       
 15894  *RIGHT
       
 15895  */
       
 15896     case function_right :
       
 15897     {
       
 15898         symbol_c *last_type_symbol = NULL;
       
 15899 
       
 15900         {
       
 15901             identifier_c param_name("IN");
       
 15902             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15903             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15904             symbol_c *IN_type_symbol = NULL;
       
 15905             
       
 15906             /* Get the value from a foo(<param_value>) style call */
       
 15907             if (IN_param_value == NULL)
       
 15908               IN_param_value = function_call_param_iterator.next();
       
 15909             if (IN_param_value != NULL) {
       
 15910               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15911               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15912             }
       
 15913             
       
 15914             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 15915             {
       
 15916         
       
 15917                 {
       
 15918                     identifier_c param_name("L");
       
 15919                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15920                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 15921                     symbol_c *L_type_symbol = NULL;
       
 15922                     
       
 15923                     /* Get the value from a foo(<param_value>) style call */
       
 15924                     if (L_param_value == NULL)
       
 15925                       L_param_value = function_call_param_iterator.next();
       
 15926                     if (L_param_value != NULL) {
       
 15927                       L_type_symbol = search_expression_type->get_type(L_param_value);
       
 15928                       last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 15929                     }
       
 15930                     
       
 15931                     if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 15932                     {
       
 15933                 
       
 15934                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15935                         return return_type_symbol;
       
 15936                         
       
 15937                     }
       
 15938                     
       
 15939                     
       
 15940                     ERROR;
       
 15941                 }
       
 15942                 
       
 15943             }
       
 15944             
       
 15945             
       
 15946             ERROR;
       
 15947         }
       
 15948         
       
 15949     }/*function_right*/
       
 15950     break;
       
 15951 
       
 15952 /****
       
 15953  *MID
       
 15954  */
       
 15955     case function_mid :
       
 15956     {
       
 15957         symbol_c *last_type_symbol = NULL;
       
 15958 
       
 15959         {
       
 15960             identifier_c param_name("IN");
       
 15961             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15962             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 15963             symbol_c *IN_type_symbol = NULL;
       
 15964             
       
 15965             /* Get the value from a foo(<param_value>) style call */
       
 15966             if (IN_param_value == NULL)
       
 15967               IN_param_value = function_call_param_iterator.next();
       
 15968             if (IN_param_value != NULL) {
       
 15969               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 15970               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 15971             }
       
 15972             
       
 15973             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 15974             {
       
 15975         
       
 15976                 {
       
 15977                     identifier_c param_name("L");
       
 15978                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15979                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 15980                     symbol_c *L_type_symbol = NULL;
       
 15981                     
       
 15982                     /* Get the value from a foo(<param_value>) style call */
       
 15983                     if (L_param_value == NULL)
       
 15984                       L_param_value = function_call_param_iterator.next();
       
 15985                     if (L_param_value != NULL) {
       
 15986                       L_type_symbol = search_expression_type->get_type(L_param_value);
       
 15987                       last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 15988                     }
       
 15989                     
       
 15990                     if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 15991                     {
       
 15992                 
       
 15993                         {
       
 15994                             identifier_c param_name("P");
       
 15995                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 15996                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 15997                             symbol_c *P_type_symbol = NULL;
       
 15998                             
       
 15999                             /* Get the value from a foo(<param_value>) style call */
       
 16000                             if (P_param_value == NULL)
       
 16001                               P_param_value = function_call_param_iterator.next();
       
 16002                             if (P_param_value != NULL) {
       
 16003                               P_type_symbol = search_expression_type->get_type(P_param_value);
       
 16004                               last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 16005                             }
       
 16006                             
       
 16007                             if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
       
 16008                             {
       
 16009                         
       
 16010                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16011                                 return return_type_symbol;
       
 16012                                 
       
 16013                             }
       
 16014                             
       
 16015                             
       
 16016                             ERROR;
       
 16017                         }
       
 16018                         
       
 16019                     }
       
 16020                     
       
 16021                     
       
 16022                     ERROR;
       
 16023                 }
       
 16024                 
       
 16025             }
       
 16026             
       
 16027             
       
 16028             ERROR;
       
 16029         }
       
 16030         
       
 16031     }/*function_mid*/
       
 16032     break;
       
 16033 
       
 16034 /****
       
 16035  *CONCAT
       
 16036  */
       
 16037     case function_concat :
       
 16038     {
       
 16039         symbol_c *last_type_symbol = NULL;
       
 16040 
       
 16041         {
       
 16042             identifier_c param_name("IN1");
       
 16043             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16044             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 16045             symbol_c *IN1_type_symbol = NULL;
       
 16046             
       
 16047             /* Get the value from a foo(<param_value>) style call */
       
 16048             if (IN1_param_value == NULL)
       
 16049               IN1_param_value = function_call_param_iterator.next();
       
 16050             if (IN1_param_value != NULL) {
       
 16051               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16052               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 16053             }
       
 16054             
       
 16055             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 16056             {
       
 16057         
       
 16058                 {
       
 16059                     identifier_c param_name("IN2");
       
 16060                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16061                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 16062                     symbol_c *IN2_type_symbol = NULL;
       
 16063                     
       
 16064                     /* Get the value from a foo(<param_value>) style call */
       
 16065                     if (IN2_param_value == NULL)
       
 16066                       IN2_param_value = function_call_param_iterator.next();
       
 16067                     if (IN2_param_value != NULL) {
       
 16068                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16069                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16070                     }
       
 16071                     
       
 16072                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 16073                     {
       
 16074                 
       
 16075                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16076                         return return_type_symbol;
       
 16077                         
       
 16078                     }
       
 16079                     
       
 16080                     
       
 16081                     ERROR;
       
 16082                 }
       
 16083                 
       
 16084             }
       
 16085             
       
 16086             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 16087             {
       
 16088         
       
 16089                 {
       
 16090                     identifier_c param_name("IN2");
       
 16091                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16092                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 16093                     symbol_c *IN2_type_symbol = NULL;
       
 16094                     
       
 16095                     /* Get the value from a foo(<param_value>) style call */
       
 16096                     if (IN2_param_value == NULL)
       
 16097                       IN2_param_value = function_call_param_iterator.next();
       
 16098                     if (IN2_param_value != NULL) {
       
 16099                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16100                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16101                     }
       
 16102                     
       
 16103                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 16104                     {
       
 16105                 
       
 16106                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16107                         return return_type_symbol;
       
 16108                         
       
 16109                     }
       
 16110                     
       
 16111                     
       
 16112                     ERROR;
       
 16113                 }
       
 16114                 
       
 16115             }
       
 16116             
       
 16117             
       
 16118             ERROR;
       
 16119         }
       
 16120         
       
 16121     }/*function_concat*/
       
 16122     break;
       
 16123 
       
 16124 /****
       
 16125  *INSERT
       
 16126  */
       
 16127     case function_insert :
       
 16128     {
       
 16129         symbol_c *last_type_symbol = NULL;
       
 16130 
       
 16131         {
       
 16132             identifier_c param_name("IN1");
       
 16133             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16134             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 16135             symbol_c *IN1_type_symbol = NULL;
       
 16136             
       
 16137             /* Get the value from a foo(<param_value>) style call */
       
 16138             if (IN1_param_value == NULL)
       
 16139               IN1_param_value = function_call_param_iterator.next();
       
 16140             if (IN1_param_value != NULL) {
       
 16141               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16142               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 16143             }
       
 16144             
       
 16145             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 16146             {
       
 16147         
       
 16148                 {
       
 16149                     identifier_c param_name("IN2");
       
 16150                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16151                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 16152                     symbol_c *IN2_type_symbol = NULL;
       
 16153                     
       
 16154                     /* Get the value from a foo(<param_value>) style call */
       
 16155                     if (IN2_param_value == NULL)
       
 16156                       IN2_param_value = function_call_param_iterator.next();
       
 16157                     if (IN2_param_value != NULL) {
       
 16158                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16159                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16160                     }
       
 16161                     
       
 16162                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 16163                     {
       
 16164                 
       
 16165                         {
       
 16166                             identifier_c param_name("P");
       
 16167                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16168                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 16169                             symbol_c *P_type_symbol = NULL;
       
 16170                             
       
 16171                             /* Get the value from a foo(<param_value>) style call */
       
 16172                             if (P_param_value == NULL)
       
 16173                               P_param_value = function_call_param_iterator.next();
       
 16174                             if (P_param_value != NULL) {
       
 16175                               P_type_symbol = search_expression_type->get_type(P_param_value);
       
 16176                               last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 16177                             }
       
 16178                             
       
 16179                             if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
       
 16180                             {
       
 16181                         
       
 16182                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16183                                 return return_type_symbol;
       
 16184                                 
       
 16185                             }
       
 16186                             
       
 16187                             
       
 16188                             ERROR;
       
 16189                         }
       
 16190                         
       
 16191                     }
       
 16192                     
       
 16193                     
       
 16194                     ERROR;
       
 16195                 }
       
 16196                 
       
 16197             }
       
 16198             
       
 16199             
       
 16200             ERROR;
       
 16201         }
       
 16202         
       
 16203     }/*function_insert*/
       
 16204     break;
       
 16205 
       
 16206 /****
       
 16207  *DELETE
       
 16208  */
       
 16209     case function_delete :
       
 16210     {
       
 16211         symbol_c *last_type_symbol = NULL;
       
 16212 
       
 16213         {
       
 16214             identifier_c param_name("IN");
       
 16215             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16216             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 16217             symbol_c *IN_type_symbol = NULL;
       
 16218             
       
 16219             /* Get the value from a foo(<param_value>) style call */
       
 16220             if (IN_param_value == NULL)
       
 16221               IN_param_value = function_call_param_iterator.next();
       
 16222             if (IN_param_value != NULL) {
       
 16223               IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 16224               last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 16225             }
       
 16226             
       
 16227             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 16228             {
       
 16229         
       
 16230                 {
       
 16231                     identifier_c param_name("L");
       
 16232                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16233                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 16234                     symbol_c *L_type_symbol = NULL;
       
 16235                     
       
 16236                     /* Get the value from a foo(<param_value>) style call */
       
 16237                     if (L_param_value == NULL)
       
 16238                       L_param_value = function_call_param_iterator.next();
       
 16239                     if (L_param_value != NULL) {
       
 16240                       L_type_symbol = search_expression_type->get_type(L_param_value);
       
 16241                       last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 16242                     }
       
 16243                     
       
 16244                     if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 16245                     {
       
 16246                 
       
 16247                         {
       
 16248                             identifier_c param_name("P");
       
 16249                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16250                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 16251                             symbol_c *P_type_symbol = NULL;
       
 16252                             
       
 16253                             /* Get the value from a foo(<param_value>) style call */
       
 16254                             if (P_param_value == NULL)
       
 16255                               P_param_value = function_call_param_iterator.next();
       
 16256                             if (P_param_value != NULL) {
       
 16257                               P_type_symbol = search_expression_type->get_type(P_param_value);
       
 16258                               last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 16259                             }
       
 16260                             
       
 16261                             if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
       
 16262                             {
       
 16263                         
       
 16264                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16265                                 return return_type_symbol;
       
 16266                                 
       
 16267                             }
       
 16268                             
       
 16269                             
       
 16270                             ERROR;
       
 16271                         }
       
 16272                         
       
 16273                     }
       
 16274                     
       
 16275                     
       
 16276                     ERROR;
       
 16277                 }
       
 16278                 
       
 16279             }
       
 16280             
       
 16281             
       
 16282             ERROR;
       
 16283         }
       
 16284         
       
 16285     }/*function_delete*/
       
 16286     break;
       
 16287 
       
 16288 /****
       
 16289  *REPLACE
       
 16290  */
       
 16291     case function_replace :
       
 16292     {
       
 16293         symbol_c *last_type_symbol = NULL;
       
 16294 
       
 16295         {
       
 16296             identifier_c param_name("IN1");
       
 16297             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16298             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 16299             symbol_c *IN1_type_symbol = NULL;
       
 16300             
       
 16301             /* Get the value from a foo(<param_value>) style call */
       
 16302             if (IN1_param_value == NULL)
       
 16303               IN1_param_value = function_call_param_iterator.next();
       
 16304             if (IN1_param_value != NULL) {
       
 16305               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16306               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 16307             }
       
 16308             
       
 16309             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 16310             {
       
 16311         
       
 16312                 {
       
 16313                     identifier_c param_name("IN2");
       
 16314                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16315                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 16316                     symbol_c *IN2_type_symbol = NULL;
       
 16317                     
       
 16318                     /* Get the value from a foo(<param_value>) style call */
       
 16319                     if (IN2_param_value == NULL)
       
 16320                       IN2_param_value = function_call_param_iterator.next();
       
 16321                     if (IN2_param_value != NULL) {
       
 16322                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16323                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16324                     }
       
 16325                     
       
 16326                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 16327                     {
       
 16328                 
       
 16329                         {
       
 16330                             identifier_c param_name("L");
       
 16331                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16332                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 16333                             symbol_c *L_type_symbol = NULL;
       
 16334                             
       
 16335                             /* Get the value from a foo(<param_value>) style call */
       
 16336                             if (L_param_value == NULL)
       
 16337                               L_param_value = function_call_param_iterator.next();
       
 16338                             if (L_param_value != NULL) {
       
 16339                               L_type_symbol = search_expression_type->get_type(L_param_value);
       
 16340                               last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 16341                             }
       
 16342                             
       
 16343                             if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 16344                             {
       
 16345                         
       
 16346                                 {
       
 16347                                     identifier_c param_name("P");
       
 16348                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16349                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 16350                                     symbol_c *P_type_symbol = NULL;
       
 16351                                     
       
 16352                                     /* Get the value from a foo(<param_value>) style call */
       
 16353                                     if (P_param_value == NULL)
       
 16354                                       P_param_value = function_call_param_iterator.next();
       
 16355                                     if (P_param_value != NULL) {
       
 16356                                       P_type_symbol = search_expression_type->get_type(P_param_value);
       
 16357                                       last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 16358                                     }
       
 16359                                     
       
 16360                                     if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
       
 16361                                     {
       
 16362                                 
       
 16363                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16364                                         return return_type_symbol;
       
 16365                                         
       
 16366                                     }
       
 16367                                     
       
 16368                                     
       
 16369                                     ERROR;
       
 16370                                 }
       
 16371                                 
       
 16372                             }
       
 16373                             
       
 16374                             
       
 16375                             ERROR;
       
 16376                         }
       
 16377                         
       
 16378                     }
       
 16379                     
       
 16380                     
       
 16381                     ERROR;
       
 16382                 }
       
 16383                 
       
 16384             }
       
 16385             
       
 16386             
       
 16387             ERROR;
       
 16388         }
       
 16389         
       
 16390     }/*function_replace*/
       
 16391     break;
       
 16392 
       
 16393 /****
       
 16394  *FIND
       
 16395  */
       
 16396     case function_find :
       
 16397     {
       
 16398         symbol_c *last_type_symbol = NULL;
       
 16399 
       
 16400         {
       
 16401             identifier_c param_name("IN1");
       
 16402             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16403             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 16404             symbol_c *IN1_type_symbol = NULL;
       
 16405             
       
 16406             /* Get the value from a foo(<param_value>) style call */
       
 16407             if (IN1_param_value == NULL)
       
 16408               IN1_param_value = function_call_param_iterator.next();
       
 16409             if (IN1_param_value != NULL) {
       
 16410               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 16411               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 16412             }
       
 16413             
       
 16414             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 16415             {
       
 16416         
       
 16417                 {
       
 16418                     identifier_c param_name("IN2");
       
 16419                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 16420                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 16421                     symbol_c *IN2_type_symbol = NULL;
       
 16422                     
       
 16423                     /* Get the value from a foo(<param_value>) style call */
       
 16424                     if (IN2_param_value == NULL)
       
 16425                       IN2_param_value = function_call_param_iterator.next();
       
 16426                     if (IN2_param_value != NULL) {
       
 16427                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 16428                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 16429                     }
       
 16430                     
       
 16431                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 16432                     {
       
 16433                 
       
 16434                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16435                         return return_type_symbol;
       
 16436                         
       
 16437                     }
       
 16438                     
       
 16439                     
       
 16440                     ERROR;
       
 16441                 }
       
 16442                 
       
 16443             }
       
 16444             
       
 16445             
       
 16446             ERROR;
       
 16447         }
       
 16448         
       
 16449     }/*function_find*/
       
 16450     break;
       
 16451 
       
 16452     case function_none :
       
 16453     ERROR;
       
 16454   }
       
 16455   return NULL;
       
 16456 }
       
 16457 
       
 16458 void *compute_standard_function_il(il_function_call_c *symbol, symbol_c *param_data_type) {
       
 16459   
       
 16460   function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
       
 16461   function_call_param_iterator_c function_call_param_iterator(symbol);  
       
 16462   search_expression_type_c* search_expression_type = this;
       
 16463 
       
 16464   switch(current_function_type){
       
 16465 
       
 16466 /****
       
 16467  *REAL_TO_SINT
       
 16468  */
       
 16469     case function_real_to_sint :
       
 16470     {
       
 16471         symbol_c *last_type_symbol = NULL;
       
 16472 
       
 16473         {
       
 16474             symbol_c *IN_type_symbol = param_data_type;
       
 16475             last_type_symbol = param_data_type;
       
 16476             
       
 16477             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16478             {
       
 16479         
       
 16480                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 16481                 return return_type_symbol;
       
 16482                 
       
 16483             }
       
 16484             
       
 16485             
       
 16486             ERROR;
       
 16487         }
       
 16488         
       
 16489     }/*function_real_to_sint*/
       
 16490     break;
       
 16491 
       
 16492 /****
       
 16493  *REAL_TO_LINT
       
 16494  */
       
 16495     case function_real_to_lint :
       
 16496     {
       
 16497         symbol_c *last_type_symbol = NULL;
       
 16498 
       
 16499         {
       
 16500             symbol_c *IN_type_symbol = param_data_type;
       
 16501             last_type_symbol = param_data_type;
       
 16502             
       
 16503             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16504             {
       
 16505         
       
 16506                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16507                 return return_type_symbol;
       
 16508                 
       
 16509             }
       
 16510             
       
 16511             
       
 16512             ERROR;
       
 16513         }
       
 16514         
       
 16515     }/*function_real_to_lint*/
       
 16516     break;
       
 16517 
       
 16518 /****
       
 16519  *REAL_TO_DINT
       
 16520  */
       
 16521     case function_real_to_dint :
       
 16522     {
       
 16523         symbol_c *last_type_symbol = NULL;
       
 16524 
       
 16525         {
       
 16526             symbol_c *IN_type_symbol = param_data_type;
       
 16527             last_type_symbol = param_data_type;
       
 16528             
       
 16529             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16530             {
       
 16531         
       
 16532                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 16533                 return return_type_symbol;
       
 16534                 
       
 16535             }
       
 16536             
       
 16537             
       
 16538             ERROR;
       
 16539         }
       
 16540         
       
 16541     }/*function_real_to_dint*/
       
 16542     break;
       
 16543 
       
 16544 /****
       
 16545  *REAL_TO_DATE
       
 16546  */
       
 16547     case function_real_to_date :
       
 16548     {
       
 16549         symbol_c *last_type_symbol = NULL;
       
 16550 
       
 16551         {
       
 16552             symbol_c *IN_type_symbol = param_data_type;
       
 16553             last_type_symbol = param_data_type;
       
 16554             
       
 16555             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16556             {
       
 16557         
       
 16558                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 16559                 return return_type_symbol;
       
 16560                 
       
 16561             }
       
 16562             
       
 16563             
       
 16564             ERROR;
       
 16565         }
       
 16566         
       
 16567     }/*function_real_to_date*/
       
 16568     break;
       
 16569 
       
 16570 /****
       
 16571  *REAL_TO_DWORD
       
 16572  */
       
 16573     case function_real_to_dword :
       
 16574     {
       
 16575         symbol_c *last_type_symbol = NULL;
       
 16576 
       
 16577         {
       
 16578             symbol_c *IN_type_symbol = param_data_type;
       
 16579             last_type_symbol = param_data_type;
       
 16580             
       
 16581             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16582             {
       
 16583         
       
 16584                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 16585                 return return_type_symbol;
       
 16586                 
       
 16587             }
       
 16588             
       
 16589             
       
 16590             ERROR;
       
 16591         }
       
 16592         
       
 16593     }/*function_real_to_dword*/
       
 16594     break;
       
 16595 
       
 16596 /****
       
 16597  *REAL_TO_DT
       
 16598  */
       
 16599     case function_real_to_dt :
       
 16600     {
       
 16601         symbol_c *last_type_symbol = NULL;
       
 16602 
       
 16603         {
       
 16604             symbol_c *IN_type_symbol = param_data_type;
       
 16605             last_type_symbol = param_data_type;
       
 16606             
       
 16607             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16608             {
       
 16609         
       
 16610                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16611                 return return_type_symbol;
       
 16612                 
       
 16613             }
       
 16614             
       
 16615             
       
 16616             ERROR;
       
 16617         }
       
 16618         
       
 16619     }/*function_real_to_dt*/
       
 16620     break;
       
 16621 
       
 16622 /****
       
 16623  *REAL_TO_TOD
       
 16624  */
       
 16625     case function_real_to_tod :
       
 16626     {
       
 16627         symbol_c *last_type_symbol = NULL;
       
 16628 
       
 16629         {
       
 16630             symbol_c *IN_type_symbol = param_data_type;
       
 16631             last_type_symbol = param_data_type;
       
 16632             
       
 16633             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16634             {
       
 16635         
       
 16636                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 16637                 return return_type_symbol;
       
 16638                 
       
 16639             }
       
 16640             
       
 16641             
       
 16642             ERROR;
       
 16643         }
       
 16644         
       
 16645     }/*function_real_to_tod*/
       
 16646     break;
       
 16647 
       
 16648 /****
       
 16649  *REAL_TO_UDINT
       
 16650  */
       
 16651     case function_real_to_udint :
       
 16652     {
       
 16653         symbol_c *last_type_symbol = NULL;
       
 16654 
       
 16655         {
       
 16656             symbol_c *IN_type_symbol = param_data_type;
       
 16657             last_type_symbol = param_data_type;
       
 16658             
       
 16659             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16660             {
       
 16661         
       
 16662                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 16663                 return return_type_symbol;
       
 16664                 
       
 16665             }
       
 16666             
       
 16667             
       
 16668             ERROR;
       
 16669         }
       
 16670         
       
 16671     }/*function_real_to_udint*/
       
 16672     break;
       
 16673 
       
 16674 /****
       
 16675  *REAL_TO_WORD
       
 16676  */
       
 16677     case function_real_to_word :
       
 16678     {
       
 16679         symbol_c *last_type_symbol = NULL;
       
 16680 
       
 16681         {
       
 16682             symbol_c *IN_type_symbol = param_data_type;
       
 16683             last_type_symbol = param_data_type;
       
 16684             
       
 16685             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16686             {
       
 16687         
       
 16688                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 16689                 return return_type_symbol;
       
 16690                 
       
 16691             }
       
 16692             
       
 16693             
       
 16694             ERROR;
       
 16695         }
       
 16696         
       
 16697     }/*function_real_to_word*/
       
 16698     break;
       
 16699 
       
 16700 /****
       
 16701  *REAL_TO_STRING
       
 16702  */
       
 16703     case function_real_to_string :
       
 16704     {
       
 16705         symbol_c *last_type_symbol = NULL;
       
 16706 
       
 16707         {
       
 16708             symbol_c *IN_type_symbol = param_data_type;
       
 16709             last_type_symbol = param_data_type;
       
 16710             
       
 16711             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16712             {
       
 16713         
       
 16714                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16715                 return return_type_symbol;
       
 16716                 
       
 16717             }
       
 16718             
       
 16719             
       
 16720             ERROR;
       
 16721         }
       
 16722         
       
 16723     }/*function_real_to_string*/
       
 16724     break;
       
 16725 
       
 16726 /****
       
 16727  *REAL_TO_LWORD
       
 16728  */
       
 16729     case function_real_to_lword :
       
 16730     {
       
 16731         symbol_c *last_type_symbol = NULL;
       
 16732 
       
 16733         {
       
 16734             symbol_c *IN_type_symbol = param_data_type;
       
 16735             last_type_symbol = param_data_type;
       
 16736             
       
 16737             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16738             {
       
 16739         
       
 16740                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 16741                 return return_type_symbol;
       
 16742                 
       
 16743             }
       
 16744             
       
 16745             
       
 16746             ERROR;
       
 16747         }
       
 16748         
       
 16749     }/*function_real_to_lword*/
       
 16750     break;
       
 16751 
       
 16752 /****
       
 16753  *REAL_TO_UINT
       
 16754  */
       
 16755     case function_real_to_uint :
       
 16756     {
       
 16757         symbol_c *last_type_symbol = NULL;
       
 16758 
       
 16759         {
       
 16760             symbol_c *IN_type_symbol = param_data_type;
       
 16761             last_type_symbol = param_data_type;
       
 16762             
       
 16763             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16764             {
       
 16765         
       
 16766                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 16767                 return return_type_symbol;
       
 16768                 
       
 16769             }
       
 16770             
       
 16771             
       
 16772             ERROR;
       
 16773         }
       
 16774         
       
 16775     }/*function_real_to_uint*/
       
 16776     break;
       
 16777 
       
 16778 /****
       
 16779  *REAL_TO_LREAL
       
 16780  */
       
 16781     case function_real_to_lreal :
       
 16782     {
       
 16783         symbol_c *last_type_symbol = NULL;
       
 16784 
       
 16785         {
       
 16786             symbol_c *IN_type_symbol = param_data_type;
       
 16787             last_type_symbol = param_data_type;
       
 16788             
       
 16789             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16790             {
       
 16791         
       
 16792                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16793                 return return_type_symbol;
       
 16794                 
       
 16795             }
       
 16796             
       
 16797             
       
 16798             ERROR;
       
 16799         }
       
 16800         
       
 16801     }/*function_real_to_lreal*/
       
 16802     break;
       
 16803 
       
 16804 /****
       
 16805  *REAL_TO_BYTE
       
 16806  */
       
 16807     case function_real_to_byte :
       
 16808     {
       
 16809         symbol_c *last_type_symbol = NULL;
       
 16810 
       
 16811         {
       
 16812             symbol_c *IN_type_symbol = param_data_type;
       
 16813             last_type_symbol = param_data_type;
       
 16814             
       
 16815             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16816             {
       
 16817         
       
 16818                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 16819                 return return_type_symbol;
       
 16820                 
       
 16821             }
       
 16822             
       
 16823             
       
 16824             ERROR;
       
 16825         }
       
 16826         
       
 16827     }/*function_real_to_byte*/
       
 16828     break;
       
 16829 
       
 16830 /****
       
 16831  *REAL_TO_USINT
       
 16832  */
       
 16833     case function_real_to_usint :
       
 16834     {
       
 16835         symbol_c *last_type_symbol = NULL;
       
 16836 
       
 16837         {
       
 16838             symbol_c *IN_type_symbol = param_data_type;
       
 16839             last_type_symbol = param_data_type;
       
 16840             
       
 16841             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16842             {
       
 16843         
       
 16844                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 16845                 return return_type_symbol;
       
 16846                 
       
 16847             }
       
 16848             
       
 16849             
       
 16850             ERROR;
       
 16851         }
       
 16852         
       
 16853     }/*function_real_to_usint*/
       
 16854     break;
       
 16855 
       
 16856 /****
       
 16857  *REAL_TO_ULINT
       
 16858  */
       
 16859     case function_real_to_ulint :
       
 16860     {
       
 16861         symbol_c *last_type_symbol = NULL;
       
 16862 
       
 16863         {
       
 16864             symbol_c *IN_type_symbol = param_data_type;
       
 16865             last_type_symbol = param_data_type;
       
 16866             
       
 16867             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16868             {
       
 16869         
       
 16870                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 16871                 return return_type_symbol;
       
 16872                 
       
 16873             }
       
 16874             
       
 16875             
       
 16876             ERROR;
       
 16877         }
       
 16878         
       
 16879     }/*function_real_to_ulint*/
       
 16880     break;
       
 16881 
       
 16882 /****
       
 16883  *REAL_TO_BOOL
       
 16884  */
       
 16885     case function_real_to_bool :
       
 16886     {
       
 16887         symbol_c *last_type_symbol = NULL;
       
 16888 
       
 16889         {
       
 16890             symbol_c *IN_type_symbol = param_data_type;
       
 16891             last_type_symbol = param_data_type;
       
 16892             
       
 16893             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16894             {
       
 16895         
       
 16896                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16897                 return return_type_symbol;
       
 16898                 
       
 16899             }
       
 16900             
       
 16901             
       
 16902             ERROR;
       
 16903         }
       
 16904         
       
 16905     }/*function_real_to_bool*/
       
 16906     break;
       
 16907 
       
 16908 /****
       
 16909  *REAL_TO_TIME
       
 16910  */
       
 16911     case function_real_to_time :
       
 16912     {
       
 16913         symbol_c *last_type_symbol = NULL;
       
 16914 
       
 16915         {
       
 16916             symbol_c *IN_type_symbol = param_data_type;
       
 16917             last_type_symbol = param_data_type;
       
 16918             
       
 16919             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16920             {
       
 16921         
       
 16922                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16923                 return return_type_symbol;
       
 16924                 
       
 16925             }
       
 16926             
       
 16927             
       
 16928             ERROR;
       
 16929         }
       
 16930         
       
 16931     }/*function_real_to_time*/
       
 16932     break;
       
 16933 
       
 16934 /****
       
 16935  *REAL_TO_INT
       
 16936  */
       
 16937     case function_real_to_int :
       
 16938     {
       
 16939         symbol_c *last_type_symbol = NULL;
       
 16940 
       
 16941         {
       
 16942             symbol_c *IN_type_symbol = param_data_type;
       
 16943             last_type_symbol = param_data_type;
       
 16944             
       
 16945             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 16946             {
       
 16947         
       
 16948                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16949                 return return_type_symbol;
       
 16950                 
       
 16951             }
       
 16952             
       
 16953             
       
 16954             ERROR;
       
 16955         }
       
 16956         
       
 16957     }/*function_real_to_int*/
       
 16958     break;
       
 16959 
       
 16960 /****
       
 16961  *SINT_TO_REAL
       
 16962  */
       
 16963     case function_sint_to_real :
       
 16964     {
       
 16965         symbol_c *last_type_symbol = NULL;
       
 16966 
       
 16967         {
       
 16968             symbol_c *IN_type_symbol = param_data_type;
       
 16969             last_type_symbol = param_data_type;
       
 16970             
       
 16971             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 16972             {
       
 16973         
       
 16974                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 16975                 return return_type_symbol;
       
 16976                 
       
 16977             }
       
 16978             
       
 16979             
       
 16980             ERROR;
       
 16981         }
       
 16982         
       
 16983     }/*function_sint_to_real*/
       
 16984     break;
       
 16985 
       
 16986 /****
       
 16987  *SINT_TO_LINT
       
 16988  */
       
 16989     case function_sint_to_lint :
       
 16990     {
       
 16991         symbol_c *last_type_symbol = NULL;
       
 16992 
       
 16993         {
       
 16994             symbol_c *IN_type_symbol = param_data_type;
       
 16995             last_type_symbol = param_data_type;
       
 16996             
       
 16997             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 16998             {
       
 16999         
       
 17000                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17001                 return return_type_symbol;
       
 17002                 
       
 17003             }
       
 17004             
       
 17005             
       
 17006             ERROR;
       
 17007         }
       
 17008         
       
 17009     }/*function_sint_to_lint*/
       
 17010     break;
       
 17011 
       
 17012 /****
       
 17013  *SINT_TO_DINT
       
 17014  */
       
 17015     case function_sint_to_dint :
       
 17016     {
       
 17017         symbol_c *last_type_symbol = NULL;
       
 17018 
       
 17019         {
       
 17020             symbol_c *IN_type_symbol = param_data_type;
       
 17021             last_type_symbol = param_data_type;
       
 17022             
       
 17023             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17024             {
       
 17025         
       
 17026                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 17027                 return return_type_symbol;
       
 17028                 
       
 17029             }
       
 17030             
       
 17031             
       
 17032             ERROR;
       
 17033         }
       
 17034         
       
 17035     }/*function_sint_to_dint*/
       
 17036     break;
       
 17037 
       
 17038 /****
       
 17039  *SINT_TO_DATE
       
 17040  */
       
 17041     case function_sint_to_date :
       
 17042     {
       
 17043         symbol_c *last_type_symbol = NULL;
       
 17044 
       
 17045         {
       
 17046             symbol_c *IN_type_symbol = param_data_type;
       
 17047             last_type_symbol = param_data_type;
       
 17048             
       
 17049             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17050             {
       
 17051         
       
 17052                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 17053                 return return_type_symbol;
       
 17054                 
       
 17055             }
       
 17056             
       
 17057             
       
 17058             ERROR;
       
 17059         }
       
 17060         
       
 17061     }/*function_sint_to_date*/
       
 17062     break;
       
 17063 
       
 17064 /****
       
 17065  *SINT_TO_DWORD
       
 17066  */
       
 17067     case function_sint_to_dword :
       
 17068     {
       
 17069         symbol_c *last_type_symbol = NULL;
       
 17070 
       
 17071         {
       
 17072             symbol_c *IN_type_symbol = param_data_type;
       
 17073             last_type_symbol = param_data_type;
       
 17074             
       
 17075             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17076             {
       
 17077         
       
 17078                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 17079                 return return_type_symbol;
       
 17080                 
       
 17081             }
       
 17082             
       
 17083             
       
 17084             ERROR;
       
 17085         }
       
 17086         
       
 17087     }/*function_sint_to_dword*/
       
 17088     break;
       
 17089 
       
 17090 /****
       
 17091  *SINT_TO_DT
       
 17092  */
       
 17093     case function_sint_to_dt :
       
 17094     {
       
 17095         symbol_c *last_type_symbol = NULL;
       
 17096 
       
 17097         {
       
 17098             symbol_c *IN_type_symbol = param_data_type;
       
 17099             last_type_symbol = param_data_type;
       
 17100             
       
 17101             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17102             {
       
 17103         
       
 17104                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17105                 return return_type_symbol;
       
 17106                 
       
 17107             }
       
 17108             
       
 17109             
       
 17110             ERROR;
       
 17111         }
       
 17112         
       
 17113     }/*function_sint_to_dt*/
       
 17114     break;
       
 17115 
       
 17116 /****
       
 17117  *SINT_TO_TOD
       
 17118  */
       
 17119     case function_sint_to_tod :
       
 17120     {
       
 17121         symbol_c *last_type_symbol = NULL;
       
 17122 
       
 17123         {
       
 17124             symbol_c *IN_type_symbol = param_data_type;
       
 17125             last_type_symbol = param_data_type;
       
 17126             
       
 17127             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17128             {
       
 17129         
       
 17130                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17131                 return return_type_symbol;
       
 17132                 
       
 17133             }
       
 17134             
       
 17135             
       
 17136             ERROR;
       
 17137         }
       
 17138         
       
 17139     }/*function_sint_to_tod*/
       
 17140     break;
       
 17141 
       
 17142 /****
       
 17143  *SINT_TO_UDINT
       
 17144  */
       
 17145     case function_sint_to_udint :
       
 17146     {
       
 17147         symbol_c *last_type_symbol = NULL;
       
 17148 
       
 17149         {
       
 17150             symbol_c *IN_type_symbol = param_data_type;
       
 17151             last_type_symbol = param_data_type;
       
 17152             
       
 17153             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17154             {
       
 17155         
       
 17156                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 17157                 return return_type_symbol;
       
 17158                 
       
 17159             }
       
 17160             
       
 17161             
       
 17162             ERROR;
       
 17163         }
       
 17164         
       
 17165     }/*function_sint_to_udint*/
       
 17166     break;
       
 17167 
       
 17168 /****
       
 17169  *SINT_TO_WORD
       
 17170  */
       
 17171     case function_sint_to_word :
       
 17172     {
       
 17173         symbol_c *last_type_symbol = NULL;
       
 17174 
       
 17175         {
       
 17176             symbol_c *IN_type_symbol = param_data_type;
       
 17177             last_type_symbol = param_data_type;
       
 17178             
       
 17179             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17180             {
       
 17181         
       
 17182                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 17183                 return return_type_symbol;
       
 17184                 
       
 17185             }
       
 17186             
       
 17187             
       
 17188             ERROR;
       
 17189         }
       
 17190         
       
 17191     }/*function_sint_to_word*/
       
 17192     break;
       
 17193 
       
 17194 /****
       
 17195  *SINT_TO_STRING
       
 17196  */
       
 17197     case function_sint_to_string :
       
 17198     {
       
 17199         symbol_c *last_type_symbol = NULL;
       
 17200 
       
 17201         {
       
 17202             symbol_c *IN_type_symbol = param_data_type;
       
 17203             last_type_symbol = param_data_type;
       
 17204             
       
 17205             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17206             {
       
 17207         
       
 17208                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 17209                 return return_type_symbol;
       
 17210                 
       
 17211             }
       
 17212             
       
 17213             
       
 17214             ERROR;
       
 17215         }
       
 17216         
       
 17217     }/*function_sint_to_string*/
       
 17218     break;
       
 17219 
       
 17220 /****
       
 17221  *SINT_TO_LWORD
       
 17222  */
       
 17223     case function_sint_to_lword :
       
 17224     {
       
 17225         symbol_c *last_type_symbol = NULL;
       
 17226 
       
 17227         {
       
 17228             symbol_c *IN_type_symbol = param_data_type;
       
 17229             last_type_symbol = param_data_type;
       
 17230             
       
 17231             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17232             {
       
 17233         
       
 17234                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17235                 return return_type_symbol;
       
 17236                 
       
 17237             }
       
 17238             
       
 17239             
       
 17240             ERROR;
       
 17241         }
       
 17242         
       
 17243     }/*function_sint_to_lword*/
       
 17244     break;
       
 17245 
       
 17246 /****
       
 17247  *SINT_TO_UINT
       
 17248  */
       
 17249     case function_sint_to_uint :
       
 17250     {
       
 17251         symbol_c *last_type_symbol = NULL;
       
 17252 
       
 17253         {
       
 17254             symbol_c *IN_type_symbol = param_data_type;
       
 17255             last_type_symbol = param_data_type;
       
 17256             
       
 17257             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17258             {
       
 17259         
       
 17260                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 17261                 return return_type_symbol;
       
 17262                 
       
 17263             }
       
 17264             
       
 17265             
       
 17266             ERROR;
       
 17267         }
       
 17268         
       
 17269     }/*function_sint_to_uint*/
       
 17270     break;
       
 17271 
       
 17272 /****
       
 17273  *SINT_TO_LREAL
       
 17274  */
       
 17275     case function_sint_to_lreal :
       
 17276     {
       
 17277         symbol_c *last_type_symbol = NULL;
       
 17278 
       
 17279         {
       
 17280             symbol_c *IN_type_symbol = param_data_type;
       
 17281             last_type_symbol = param_data_type;
       
 17282             
       
 17283             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17284             {
       
 17285         
       
 17286                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17287                 return return_type_symbol;
       
 17288                 
       
 17289             }
       
 17290             
       
 17291             
       
 17292             ERROR;
       
 17293         }
       
 17294         
       
 17295     }/*function_sint_to_lreal*/
       
 17296     break;
       
 17297 
       
 17298 /****
       
 17299  *SINT_TO_BYTE
       
 17300  */
       
 17301     case function_sint_to_byte :
       
 17302     {
       
 17303         symbol_c *last_type_symbol = NULL;
       
 17304 
       
 17305         {
       
 17306             symbol_c *IN_type_symbol = param_data_type;
       
 17307             last_type_symbol = param_data_type;
       
 17308             
       
 17309             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17310             {
       
 17311         
       
 17312                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 17313                 return return_type_symbol;
       
 17314                 
       
 17315             }
       
 17316             
       
 17317             
       
 17318             ERROR;
       
 17319         }
       
 17320         
       
 17321     }/*function_sint_to_byte*/
       
 17322     break;
       
 17323 
       
 17324 /****
       
 17325  *SINT_TO_USINT
       
 17326  */
       
 17327     case function_sint_to_usint :
       
 17328     {
       
 17329         symbol_c *last_type_symbol = NULL;
       
 17330 
       
 17331         {
       
 17332             symbol_c *IN_type_symbol = param_data_type;
       
 17333             last_type_symbol = param_data_type;
       
 17334             
       
 17335             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17336             {
       
 17337         
       
 17338                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 17339                 return return_type_symbol;
       
 17340                 
       
 17341             }
       
 17342             
       
 17343             
       
 17344             ERROR;
       
 17345         }
       
 17346         
       
 17347     }/*function_sint_to_usint*/
       
 17348     break;
       
 17349 
       
 17350 /****
       
 17351  *SINT_TO_ULINT
       
 17352  */
       
 17353     case function_sint_to_ulint :
       
 17354     {
       
 17355         symbol_c *last_type_symbol = NULL;
       
 17356 
       
 17357         {
       
 17358             symbol_c *IN_type_symbol = param_data_type;
       
 17359             last_type_symbol = param_data_type;
       
 17360             
       
 17361             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17362             {
       
 17363         
       
 17364                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 17365                 return return_type_symbol;
       
 17366                 
       
 17367             }
       
 17368             
       
 17369             
       
 17370             ERROR;
       
 17371         }
       
 17372         
       
 17373     }/*function_sint_to_ulint*/
       
 17374     break;
       
 17375 
       
 17376 /****
       
 17377  *SINT_TO_BOOL
       
 17378  */
       
 17379     case function_sint_to_bool :
       
 17380     {
       
 17381         symbol_c *last_type_symbol = NULL;
       
 17382 
       
 17383         {
       
 17384             symbol_c *IN_type_symbol = param_data_type;
       
 17385             last_type_symbol = param_data_type;
       
 17386             
       
 17387             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17388             {
       
 17389         
       
 17390                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 17391                 return return_type_symbol;
       
 17392                 
       
 17393             }
       
 17394             
       
 17395             
       
 17396             ERROR;
       
 17397         }
       
 17398         
       
 17399     }/*function_sint_to_bool*/
       
 17400     break;
       
 17401 
       
 17402 /****
       
 17403  *SINT_TO_TIME
       
 17404  */
       
 17405     case function_sint_to_time :
       
 17406     {
       
 17407         symbol_c *last_type_symbol = NULL;
       
 17408 
       
 17409         {
       
 17410             symbol_c *IN_type_symbol = param_data_type;
       
 17411             last_type_symbol = param_data_type;
       
 17412             
       
 17413             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17414             {
       
 17415         
       
 17416                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17417                 return return_type_symbol;
       
 17418                 
       
 17419             }
       
 17420             
       
 17421             
       
 17422             ERROR;
       
 17423         }
       
 17424         
       
 17425     }/*function_sint_to_time*/
       
 17426     break;
       
 17427 
       
 17428 /****
       
 17429  *SINT_TO_INT
       
 17430  */
       
 17431     case function_sint_to_int :
       
 17432     {
       
 17433         symbol_c *last_type_symbol = NULL;
       
 17434 
       
 17435         {
       
 17436             symbol_c *IN_type_symbol = param_data_type;
       
 17437             last_type_symbol = param_data_type;
       
 17438             
       
 17439             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 17440             {
       
 17441         
       
 17442                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17443                 return return_type_symbol;
       
 17444                 
       
 17445             }
       
 17446             
       
 17447             
       
 17448             ERROR;
       
 17449         }
       
 17450         
       
 17451     }/*function_sint_to_int*/
       
 17452     break;
       
 17453 
       
 17454 /****
       
 17455  *LINT_TO_REAL
       
 17456  */
       
 17457     case function_lint_to_real :
       
 17458     {
       
 17459         symbol_c *last_type_symbol = NULL;
       
 17460 
       
 17461         {
       
 17462             symbol_c *IN_type_symbol = param_data_type;
       
 17463             last_type_symbol = param_data_type;
       
 17464             
       
 17465             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17466             {
       
 17467         
       
 17468                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 17469                 return return_type_symbol;
       
 17470                 
       
 17471             }
       
 17472             
       
 17473             
       
 17474             ERROR;
       
 17475         }
       
 17476         
       
 17477     }/*function_lint_to_real*/
       
 17478     break;
       
 17479 
       
 17480 /****
       
 17481  *LINT_TO_SINT
       
 17482  */
       
 17483     case function_lint_to_sint :
       
 17484     {
       
 17485         symbol_c *last_type_symbol = NULL;
       
 17486 
       
 17487         {
       
 17488             symbol_c *IN_type_symbol = param_data_type;
       
 17489             last_type_symbol = param_data_type;
       
 17490             
       
 17491             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17492             {
       
 17493         
       
 17494                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 17495                 return return_type_symbol;
       
 17496                 
       
 17497             }
       
 17498             
       
 17499             
       
 17500             ERROR;
       
 17501         }
       
 17502         
       
 17503     }/*function_lint_to_sint*/
       
 17504     break;
       
 17505 
       
 17506 /****
       
 17507  *LINT_TO_DINT
       
 17508  */
       
 17509     case function_lint_to_dint :
       
 17510     {
       
 17511         symbol_c *last_type_symbol = NULL;
       
 17512 
       
 17513         {
       
 17514             symbol_c *IN_type_symbol = param_data_type;
       
 17515             last_type_symbol = param_data_type;
       
 17516             
       
 17517             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17518             {
       
 17519         
       
 17520                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 17521                 return return_type_symbol;
       
 17522                 
       
 17523             }
       
 17524             
       
 17525             
       
 17526             ERROR;
       
 17527         }
       
 17528         
       
 17529     }/*function_lint_to_dint*/
       
 17530     break;
       
 17531 
       
 17532 /****
       
 17533  *LINT_TO_DATE
       
 17534  */
       
 17535     case function_lint_to_date :
       
 17536     {
       
 17537         symbol_c *last_type_symbol = NULL;
       
 17538 
       
 17539         {
       
 17540             symbol_c *IN_type_symbol = param_data_type;
       
 17541             last_type_symbol = param_data_type;
       
 17542             
       
 17543             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17544             {
       
 17545         
       
 17546                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 17547                 return return_type_symbol;
       
 17548                 
       
 17549             }
       
 17550             
       
 17551             
       
 17552             ERROR;
       
 17553         }
       
 17554         
       
 17555     }/*function_lint_to_date*/
       
 17556     break;
       
 17557 
       
 17558 /****
       
 17559  *LINT_TO_DWORD
       
 17560  */
       
 17561     case function_lint_to_dword :
       
 17562     {
       
 17563         symbol_c *last_type_symbol = NULL;
       
 17564 
       
 17565         {
       
 17566             symbol_c *IN_type_symbol = param_data_type;
       
 17567             last_type_symbol = param_data_type;
       
 17568             
       
 17569             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17570             {
       
 17571         
       
 17572                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 17573                 return return_type_symbol;
       
 17574                 
       
 17575             }
       
 17576             
       
 17577             
       
 17578             ERROR;
       
 17579         }
       
 17580         
       
 17581     }/*function_lint_to_dword*/
       
 17582     break;
       
 17583 
       
 17584 /****
       
 17585  *LINT_TO_DT
       
 17586  */
       
 17587     case function_lint_to_dt :
       
 17588     {
       
 17589         symbol_c *last_type_symbol = NULL;
       
 17590 
       
 17591         {
       
 17592             symbol_c *IN_type_symbol = param_data_type;
       
 17593             last_type_symbol = param_data_type;
       
 17594             
       
 17595             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17596             {
       
 17597         
       
 17598                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17599                 return return_type_symbol;
       
 17600                 
       
 17601             }
       
 17602             
       
 17603             
       
 17604             ERROR;
       
 17605         }
       
 17606         
       
 17607     }/*function_lint_to_dt*/
       
 17608     break;
       
 17609 
       
 17610 /****
       
 17611  *LINT_TO_TOD
       
 17612  */
       
 17613     case function_lint_to_tod :
       
 17614     {
       
 17615         symbol_c *last_type_symbol = NULL;
       
 17616 
       
 17617         {
       
 17618             symbol_c *IN_type_symbol = param_data_type;
       
 17619             last_type_symbol = param_data_type;
       
 17620             
       
 17621             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17622             {
       
 17623         
       
 17624                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17625                 return return_type_symbol;
       
 17626                 
       
 17627             }
       
 17628             
       
 17629             
       
 17630             ERROR;
       
 17631         }
       
 17632         
       
 17633     }/*function_lint_to_tod*/
       
 17634     break;
       
 17635 
       
 17636 /****
       
 17637  *LINT_TO_UDINT
       
 17638  */
       
 17639     case function_lint_to_udint :
       
 17640     {
       
 17641         symbol_c *last_type_symbol = NULL;
       
 17642 
       
 17643         {
       
 17644             symbol_c *IN_type_symbol = param_data_type;
       
 17645             last_type_symbol = param_data_type;
       
 17646             
       
 17647             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17648             {
       
 17649         
       
 17650                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 17651                 return return_type_symbol;
       
 17652                 
       
 17653             }
       
 17654             
       
 17655             
       
 17656             ERROR;
       
 17657         }
       
 17658         
       
 17659     }/*function_lint_to_udint*/
       
 17660     break;
       
 17661 
       
 17662 /****
       
 17663  *LINT_TO_WORD
       
 17664  */
       
 17665     case function_lint_to_word :
       
 17666     {
       
 17667         symbol_c *last_type_symbol = NULL;
       
 17668 
       
 17669         {
       
 17670             symbol_c *IN_type_symbol = param_data_type;
       
 17671             last_type_symbol = param_data_type;
       
 17672             
       
 17673             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17674             {
       
 17675         
       
 17676                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 17677                 return return_type_symbol;
       
 17678                 
       
 17679             }
       
 17680             
       
 17681             
       
 17682             ERROR;
       
 17683         }
       
 17684         
       
 17685     }/*function_lint_to_word*/
       
 17686     break;
       
 17687 
       
 17688 /****
       
 17689  *LINT_TO_STRING
       
 17690  */
       
 17691     case function_lint_to_string :
       
 17692     {
       
 17693         symbol_c *last_type_symbol = NULL;
       
 17694 
       
 17695         {
       
 17696             symbol_c *IN_type_symbol = param_data_type;
       
 17697             last_type_symbol = param_data_type;
       
 17698             
       
 17699             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17700             {
       
 17701         
       
 17702                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 17703                 return return_type_symbol;
       
 17704                 
       
 17705             }
       
 17706             
       
 17707             
       
 17708             ERROR;
       
 17709         }
       
 17710         
       
 17711     }/*function_lint_to_string*/
       
 17712     break;
       
 17713 
       
 17714 /****
       
 17715  *LINT_TO_LWORD
       
 17716  */
       
 17717     case function_lint_to_lword :
       
 17718     {
       
 17719         symbol_c *last_type_symbol = NULL;
       
 17720 
       
 17721         {
       
 17722             symbol_c *IN_type_symbol = param_data_type;
       
 17723             last_type_symbol = param_data_type;
       
 17724             
       
 17725             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17726             {
       
 17727         
       
 17728                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17729                 return return_type_symbol;
       
 17730                 
       
 17731             }
       
 17732             
       
 17733             
       
 17734             ERROR;
       
 17735         }
       
 17736         
       
 17737     }/*function_lint_to_lword*/
       
 17738     break;
       
 17739 
       
 17740 /****
       
 17741  *LINT_TO_UINT
       
 17742  */
       
 17743     case function_lint_to_uint :
       
 17744     {
       
 17745         symbol_c *last_type_symbol = NULL;
       
 17746 
       
 17747         {
       
 17748             symbol_c *IN_type_symbol = param_data_type;
       
 17749             last_type_symbol = param_data_type;
       
 17750             
       
 17751             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17752             {
       
 17753         
       
 17754                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 17755                 return return_type_symbol;
       
 17756                 
       
 17757             }
       
 17758             
       
 17759             
       
 17760             ERROR;
       
 17761         }
       
 17762         
       
 17763     }/*function_lint_to_uint*/
       
 17764     break;
       
 17765 
       
 17766 /****
       
 17767  *LINT_TO_LREAL
       
 17768  */
       
 17769     case function_lint_to_lreal :
       
 17770     {
       
 17771         symbol_c *last_type_symbol = NULL;
       
 17772 
       
 17773         {
       
 17774             symbol_c *IN_type_symbol = param_data_type;
       
 17775             last_type_symbol = param_data_type;
       
 17776             
       
 17777             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17778             {
       
 17779         
       
 17780                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17781                 return return_type_symbol;
       
 17782                 
       
 17783             }
       
 17784             
       
 17785             
       
 17786             ERROR;
       
 17787         }
       
 17788         
       
 17789     }/*function_lint_to_lreal*/
       
 17790     break;
       
 17791 
       
 17792 /****
       
 17793  *LINT_TO_BYTE
       
 17794  */
       
 17795     case function_lint_to_byte :
       
 17796     {
       
 17797         symbol_c *last_type_symbol = NULL;
       
 17798 
       
 17799         {
       
 17800             symbol_c *IN_type_symbol = param_data_type;
       
 17801             last_type_symbol = param_data_type;
       
 17802             
       
 17803             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17804             {
       
 17805         
       
 17806                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 17807                 return return_type_symbol;
       
 17808                 
       
 17809             }
       
 17810             
       
 17811             
       
 17812             ERROR;
       
 17813         }
       
 17814         
       
 17815     }/*function_lint_to_byte*/
       
 17816     break;
       
 17817 
       
 17818 /****
       
 17819  *LINT_TO_USINT
       
 17820  */
       
 17821     case function_lint_to_usint :
       
 17822     {
       
 17823         symbol_c *last_type_symbol = NULL;
       
 17824 
       
 17825         {
       
 17826             symbol_c *IN_type_symbol = param_data_type;
       
 17827             last_type_symbol = param_data_type;
       
 17828             
       
 17829             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17830             {
       
 17831         
       
 17832                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 17833                 return return_type_symbol;
       
 17834                 
       
 17835             }
       
 17836             
       
 17837             
       
 17838             ERROR;
       
 17839         }
       
 17840         
       
 17841     }/*function_lint_to_usint*/
       
 17842     break;
       
 17843 
       
 17844 /****
       
 17845  *LINT_TO_ULINT
       
 17846  */
       
 17847     case function_lint_to_ulint :
       
 17848     {
       
 17849         symbol_c *last_type_symbol = NULL;
       
 17850 
       
 17851         {
       
 17852             symbol_c *IN_type_symbol = param_data_type;
       
 17853             last_type_symbol = param_data_type;
       
 17854             
       
 17855             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17856             {
       
 17857         
       
 17858                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 17859                 return return_type_symbol;
       
 17860                 
       
 17861             }
       
 17862             
       
 17863             
       
 17864             ERROR;
       
 17865         }
       
 17866         
       
 17867     }/*function_lint_to_ulint*/
       
 17868     break;
       
 17869 
       
 17870 /****
       
 17871  *LINT_TO_BOOL
       
 17872  */
       
 17873     case function_lint_to_bool :
       
 17874     {
       
 17875         symbol_c *last_type_symbol = NULL;
       
 17876 
       
 17877         {
       
 17878             symbol_c *IN_type_symbol = param_data_type;
       
 17879             last_type_symbol = param_data_type;
       
 17880             
       
 17881             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17882             {
       
 17883         
       
 17884                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 17885                 return return_type_symbol;
       
 17886                 
       
 17887             }
       
 17888             
       
 17889             
       
 17890             ERROR;
       
 17891         }
       
 17892         
       
 17893     }/*function_lint_to_bool*/
       
 17894     break;
       
 17895 
       
 17896 /****
       
 17897  *LINT_TO_TIME
       
 17898  */
       
 17899     case function_lint_to_time :
       
 17900     {
       
 17901         symbol_c *last_type_symbol = NULL;
       
 17902 
       
 17903         {
       
 17904             symbol_c *IN_type_symbol = param_data_type;
       
 17905             last_type_symbol = param_data_type;
       
 17906             
       
 17907             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17908             {
       
 17909         
       
 17910                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17911                 return return_type_symbol;
       
 17912                 
       
 17913             }
       
 17914             
       
 17915             
       
 17916             ERROR;
       
 17917         }
       
 17918         
       
 17919     }/*function_lint_to_time*/
       
 17920     break;
       
 17921 
       
 17922 /****
       
 17923  *LINT_TO_INT
       
 17924  */
       
 17925     case function_lint_to_int :
       
 17926     {
       
 17927         symbol_c *last_type_symbol = NULL;
       
 17928 
       
 17929         {
       
 17930             symbol_c *IN_type_symbol = param_data_type;
       
 17931             last_type_symbol = param_data_type;
       
 17932             
       
 17933             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 17934             {
       
 17935         
       
 17936                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17937                 return return_type_symbol;
       
 17938                 
       
 17939             }
       
 17940             
       
 17941             
       
 17942             ERROR;
       
 17943         }
       
 17944         
       
 17945     }/*function_lint_to_int*/
       
 17946     break;
       
 17947 
       
 17948 /****
       
 17949  *DINT_TO_REAL
       
 17950  */
       
 17951     case function_dint_to_real :
       
 17952     {
       
 17953         symbol_c *last_type_symbol = NULL;
       
 17954 
       
 17955         {
       
 17956             symbol_c *IN_type_symbol = param_data_type;
       
 17957             last_type_symbol = param_data_type;
       
 17958             
       
 17959             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 17960             {
       
 17961         
       
 17962                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 17963                 return return_type_symbol;
       
 17964                 
       
 17965             }
       
 17966             
       
 17967             
       
 17968             ERROR;
       
 17969         }
       
 17970         
       
 17971     }/*function_dint_to_real*/
       
 17972     break;
       
 17973 
       
 17974 /****
       
 17975  *DINT_TO_SINT
       
 17976  */
       
 17977     case function_dint_to_sint :
       
 17978     {
       
 17979         symbol_c *last_type_symbol = NULL;
       
 17980 
       
 17981         {
       
 17982             symbol_c *IN_type_symbol = param_data_type;
       
 17983             last_type_symbol = param_data_type;
       
 17984             
       
 17985             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 17986             {
       
 17987         
       
 17988                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 17989                 return return_type_symbol;
       
 17990                 
       
 17991             }
       
 17992             
       
 17993             
       
 17994             ERROR;
       
 17995         }
       
 17996         
       
 17997     }/*function_dint_to_sint*/
       
 17998     break;
       
 17999 
       
 18000 /****
       
 18001  *DINT_TO_LINT
       
 18002  */
       
 18003     case function_dint_to_lint :
       
 18004     {
       
 18005         symbol_c *last_type_symbol = NULL;
       
 18006 
       
 18007         {
       
 18008             symbol_c *IN_type_symbol = param_data_type;
       
 18009             last_type_symbol = param_data_type;
       
 18010             
       
 18011             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18012             {
       
 18013         
       
 18014                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18015                 return return_type_symbol;
       
 18016                 
       
 18017             }
       
 18018             
       
 18019             
       
 18020             ERROR;
       
 18021         }
       
 18022         
       
 18023     }/*function_dint_to_lint*/
       
 18024     break;
       
 18025 
       
 18026 /****
       
 18027  *DINT_TO_DATE
       
 18028  */
       
 18029     case function_dint_to_date :
       
 18030     {
       
 18031         symbol_c *last_type_symbol = NULL;
       
 18032 
       
 18033         {
       
 18034             symbol_c *IN_type_symbol = param_data_type;
       
 18035             last_type_symbol = param_data_type;
       
 18036             
       
 18037             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18038             {
       
 18039         
       
 18040                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18041                 return return_type_symbol;
       
 18042                 
       
 18043             }
       
 18044             
       
 18045             
       
 18046             ERROR;
       
 18047         }
       
 18048         
       
 18049     }/*function_dint_to_date*/
       
 18050     break;
       
 18051 
       
 18052 /****
       
 18053  *DINT_TO_DWORD
       
 18054  */
       
 18055     case function_dint_to_dword :
       
 18056     {
       
 18057         symbol_c *last_type_symbol = NULL;
       
 18058 
       
 18059         {
       
 18060             symbol_c *IN_type_symbol = param_data_type;
       
 18061             last_type_symbol = param_data_type;
       
 18062             
       
 18063             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18064             {
       
 18065         
       
 18066                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18067                 return return_type_symbol;
       
 18068                 
       
 18069             }
       
 18070             
       
 18071             
       
 18072             ERROR;
       
 18073         }
       
 18074         
       
 18075     }/*function_dint_to_dword*/
       
 18076     break;
       
 18077 
       
 18078 /****
       
 18079  *DINT_TO_DT
       
 18080  */
       
 18081     case function_dint_to_dt :
       
 18082     {
       
 18083         symbol_c *last_type_symbol = NULL;
       
 18084 
       
 18085         {
       
 18086             symbol_c *IN_type_symbol = param_data_type;
       
 18087             last_type_symbol = param_data_type;
       
 18088             
       
 18089             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18090             {
       
 18091         
       
 18092                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18093                 return return_type_symbol;
       
 18094                 
       
 18095             }
       
 18096             
       
 18097             
       
 18098             ERROR;
       
 18099         }
       
 18100         
       
 18101     }/*function_dint_to_dt*/
       
 18102     break;
       
 18103 
       
 18104 /****
       
 18105  *DINT_TO_TOD
       
 18106  */
       
 18107     case function_dint_to_tod :
       
 18108     {
       
 18109         symbol_c *last_type_symbol = NULL;
       
 18110 
       
 18111         {
       
 18112             symbol_c *IN_type_symbol = param_data_type;
       
 18113             last_type_symbol = param_data_type;
       
 18114             
       
 18115             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18116             {
       
 18117         
       
 18118                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18119                 return return_type_symbol;
       
 18120                 
       
 18121             }
       
 18122             
       
 18123             
       
 18124             ERROR;
       
 18125         }
       
 18126         
       
 18127     }/*function_dint_to_tod*/
       
 18128     break;
       
 18129 
       
 18130 /****
       
 18131  *DINT_TO_UDINT
       
 18132  */
       
 18133     case function_dint_to_udint :
       
 18134     {
       
 18135         symbol_c *last_type_symbol = NULL;
       
 18136 
       
 18137         {
       
 18138             symbol_c *IN_type_symbol = param_data_type;
       
 18139             last_type_symbol = param_data_type;
       
 18140             
       
 18141             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18142             {
       
 18143         
       
 18144                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 18145                 return return_type_symbol;
       
 18146                 
       
 18147             }
       
 18148             
       
 18149             
       
 18150             ERROR;
       
 18151         }
       
 18152         
       
 18153     }/*function_dint_to_udint*/
       
 18154     break;
       
 18155 
       
 18156 /****
       
 18157  *DINT_TO_WORD
       
 18158  */
       
 18159     case function_dint_to_word :
       
 18160     {
       
 18161         symbol_c *last_type_symbol = NULL;
       
 18162 
       
 18163         {
       
 18164             symbol_c *IN_type_symbol = param_data_type;
       
 18165             last_type_symbol = param_data_type;
       
 18166             
       
 18167             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18168             {
       
 18169         
       
 18170                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18171                 return return_type_symbol;
       
 18172                 
       
 18173             }
       
 18174             
       
 18175             
       
 18176             ERROR;
       
 18177         }
       
 18178         
       
 18179     }/*function_dint_to_word*/
       
 18180     break;
       
 18181 
       
 18182 /****
       
 18183  *DINT_TO_STRING
       
 18184  */
       
 18185     case function_dint_to_string :
       
 18186     {
       
 18187         symbol_c *last_type_symbol = NULL;
       
 18188 
       
 18189         {
       
 18190             symbol_c *IN_type_symbol = param_data_type;
       
 18191             last_type_symbol = param_data_type;
       
 18192             
       
 18193             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18194             {
       
 18195         
       
 18196                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18197                 return return_type_symbol;
       
 18198                 
       
 18199             }
       
 18200             
       
 18201             
       
 18202             ERROR;
       
 18203         }
       
 18204         
       
 18205     }/*function_dint_to_string*/
       
 18206     break;
       
 18207 
       
 18208 /****
       
 18209  *DINT_TO_LWORD
       
 18210  */
       
 18211     case function_dint_to_lword :
       
 18212     {
       
 18213         symbol_c *last_type_symbol = NULL;
       
 18214 
       
 18215         {
       
 18216             symbol_c *IN_type_symbol = param_data_type;
       
 18217             last_type_symbol = param_data_type;
       
 18218             
       
 18219             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18220             {
       
 18221         
       
 18222                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18223                 return return_type_symbol;
       
 18224                 
       
 18225             }
       
 18226             
       
 18227             
       
 18228             ERROR;
       
 18229         }
       
 18230         
       
 18231     }/*function_dint_to_lword*/
       
 18232     break;
       
 18233 
       
 18234 /****
       
 18235  *DINT_TO_UINT
       
 18236  */
       
 18237     case function_dint_to_uint :
       
 18238     {
       
 18239         symbol_c *last_type_symbol = NULL;
       
 18240 
       
 18241         {
       
 18242             symbol_c *IN_type_symbol = param_data_type;
       
 18243             last_type_symbol = param_data_type;
       
 18244             
       
 18245             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18246             {
       
 18247         
       
 18248                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18249                 return return_type_symbol;
       
 18250                 
       
 18251             }
       
 18252             
       
 18253             
       
 18254             ERROR;
       
 18255         }
       
 18256         
       
 18257     }/*function_dint_to_uint*/
       
 18258     break;
       
 18259 
       
 18260 /****
       
 18261  *DINT_TO_LREAL
       
 18262  */
       
 18263     case function_dint_to_lreal :
       
 18264     {
       
 18265         symbol_c *last_type_symbol = NULL;
       
 18266 
       
 18267         {
       
 18268             symbol_c *IN_type_symbol = param_data_type;
       
 18269             last_type_symbol = param_data_type;
       
 18270             
       
 18271             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18272             {
       
 18273         
       
 18274                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18275                 return return_type_symbol;
       
 18276                 
       
 18277             }
       
 18278             
       
 18279             
       
 18280             ERROR;
       
 18281         }
       
 18282         
       
 18283     }/*function_dint_to_lreal*/
       
 18284     break;
       
 18285 
       
 18286 /****
       
 18287  *DINT_TO_BYTE
       
 18288  */
       
 18289     case function_dint_to_byte :
       
 18290     {
       
 18291         symbol_c *last_type_symbol = NULL;
       
 18292 
       
 18293         {
       
 18294             symbol_c *IN_type_symbol = param_data_type;
       
 18295             last_type_symbol = param_data_type;
       
 18296             
       
 18297             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18298             {
       
 18299         
       
 18300                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18301                 return return_type_symbol;
       
 18302                 
       
 18303             }
       
 18304             
       
 18305             
       
 18306             ERROR;
       
 18307         }
       
 18308         
       
 18309     }/*function_dint_to_byte*/
       
 18310     break;
       
 18311 
       
 18312 /****
       
 18313  *DINT_TO_USINT
       
 18314  */
       
 18315     case function_dint_to_usint :
       
 18316     {
       
 18317         symbol_c *last_type_symbol = NULL;
       
 18318 
       
 18319         {
       
 18320             symbol_c *IN_type_symbol = param_data_type;
       
 18321             last_type_symbol = param_data_type;
       
 18322             
       
 18323             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18324             {
       
 18325         
       
 18326                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18327                 return return_type_symbol;
       
 18328                 
       
 18329             }
       
 18330             
       
 18331             
       
 18332             ERROR;
       
 18333         }
       
 18334         
       
 18335     }/*function_dint_to_usint*/
       
 18336     break;
       
 18337 
       
 18338 /****
       
 18339  *DINT_TO_ULINT
       
 18340  */
       
 18341     case function_dint_to_ulint :
       
 18342     {
       
 18343         symbol_c *last_type_symbol = NULL;
       
 18344 
       
 18345         {
       
 18346             symbol_c *IN_type_symbol = param_data_type;
       
 18347             last_type_symbol = param_data_type;
       
 18348             
       
 18349             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18350             {
       
 18351         
       
 18352                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18353                 return return_type_symbol;
       
 18354                 
       
 18355             }
       
 18356             
       
 18357             
       
 18358             ERROR;
       
 18359         }
       
 18360         
       
 18361     }/*function_dint_to_ulint*/
       
 18362     break;
       
 18363 
       
 18364 /****
       
 18365  *DINT_TO_BOOL
       
 18366  */
       
 18367     case function_dint_to_bool :
       
 18368     {
       
 18369         symbol_c *last_type_symbol = NULL;
       
 18370 
       
 18371         {
       
 18372             symbol_c *IN_type_symbol = param_data_type;
       
 18373             last_type_symbol = param_data_type;
       
 18374             
       
 18375             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18376             {
       
 18377         
       
 18378                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18379                 return return_type_symbol;
       
 18380                 
       
 18381             }
       
 18382             
       
 18383             
       
 18384             ERROR;
       
 18385         }
       
 18386         
       
 18387     }/*function_dint_to_bool*/
       
 18388     break;
       
 18389 
       
 18390 /****
       
 18391  *DINT_TO_TIME
       
 18392  */
       
 18393     case function_dint_to_time :
       
 18394     {
       
 18395         symbol_c *last_type_symbol = NULL;
       
 18396 
       
 18397         {
       
 18398             symbol_c *IN_type_symbol = param_data_type;
       
 18399             last_type_symbol = param_data_type;
       
 18400             
       
 18401             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18402             {
       
 18403         
       
 18404                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 18405                 return return_type_symbol;
       
 18406                 
       
 18407             }
       
 18408             
       
 18409             
       
 18410             ERROR;
       
 18411         }
       
 18412         
       
 18413     }/*function_dint_to_time*/
       
 18414     break;
       
 18415 
       
 18416 /****
       
 18417  *DINT_TO_INT
       
 18418  */
       
 18419     case function_dint_to_int :
       
 18420     {
       
 18421         symbol_c *last_type_symbol = NULL;
       
 18422 
       
 18423         {
       
 18424             symbol_c *IN_type_symbol = param_data_type;
       
 18425             last_type_symbol = param_data_type;
       
 18426             
       
 18427             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 18428             {
       
 18429         
       
 18430                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18431                 return return_type_symbol;
       
 18432                 
       
 18433             }
       
 18434             
       
 18435             
       
 18436             ERROR;
       
 18437         }
       
 18438         
       
 18439     }/*function_dint_to_int*/
       
 18440     break;
       
 18441 
       
 18442 /****
       
 18443  *DATE_TO_REAL
       
 18444  */
       
 18445     case function_date_to_real :
       
 18446     {
       
 18447         symbol_c *last_type_symbol = NULL;
       
 18448 
       
 18449         {
       
 18450             symbol_c *IN_type_symbol = param_data_type;
       
 18451             last_type_symbol = param_data_type;
       
 18452             
       
 18453             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18454             {
       
 18455         
       
 18456                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18457                 return return_type_symbol;
       
 18458                 
       
 18459             }
       
 18460             
       
 18461             
       
 18462             ERROR;
       
 18463         }
       
 18464         
       
 18465     }/*function_date_to_real*/
       
 18466     break;
       
 18467 
       
 18468 /****
       
 18469  *DATE_TO_SINT
       
 18470  */
       
 18471     case function_date_to_sint :
       
 18472     {
       
 18473         symbol_c *last_type_symbol = NULL;
       
 18474 
       
 18475         {
       
 18476             symbol_c *IN_type_symbol = param_data_type;
       
 18477             last_type_symbol = param_data_type;
       
 18478             
       
 18479             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18480             {
       
 18481         
       
 18482                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18483                 return return_type_symbol;
       
 18484                 
       
 18485             }
       
 18486             
       
 18487             
       
 18488             ERROR;
       
 18489         }
       
 18490         
       
 18491     }/*function_date_to_sint*/
       
 18492     break;
       
 18493 
       
 18494 /****
       
 18495  *DATE_TO_LINT
       
 18496  */
       
 18497     case function_date_to_lint :
       
 18498     {
       
 18499         symbol_c *last_type_symbol = NULL;
       
 18500 
       
 18501         {
       
 18502             symbol_c *IN_type_symbol = param_data_type;
       
 18503             last_type_symbol = param_data_type;
       
 18504             
       
 18505             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18506             {
       
 18507         
       
 18508                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18509                 return return_type_symbol;
       
 18510                 
       
 18511             }
       
 18512             
       
 18513             
       
 18514             ERROR;
       
 18515         }
       
 18516         
       
 18517     }/*function_date_to_lint*/
       
 18518     break;
       
 18519 
       
 18520 /****
       
 18521  *DATE_TO_DINT
       
 18522  */
       
 18523     case function_date_to_dint :
       
 18524     {
       
 18525         symbol_c *last_type_symbol = NULL;
       
 18526 
       
 18527         {
       
 18528             symbol_c *IN_type_symbol = param_data_type;
       
 18529             last_type_symbol = param_data_type;
       
 18530             
       
 18531             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18532             {
       
 18533         
       
 18534                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18535                 return return_type_symbol;
       
 18536                 
       
 18537             }
       
 18538             
       
 18539             
       
 18540             ERROR;
       
 18541         }
       
 18542         
       
 18543     }/*function_date_to_dint*/
       
 18544     break;
       
 18545 
       
 18546 /****
       
 18547  *DATE_TO_DWORD
       
 18548  */
       
 18549     case function_date_to_dword :
       
 18550     {
       
 18551         symbol_c *last_type_symbol = NULL;
       
 18552 
       
 18553         {
       
 18554             symbol_c *IN_type_symbol = param_data_type;
       
 18555             last_type_symbol = param_data_type;
       
 18556             
       
 18557             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18558             {
       
 18559         
       
 18560                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18561                 return return_type_symbol;
       
 18562                 
       
 18563             }
       
 18564             
       
 18565             
       
 18566             ERROR;
       
 18567         }
       
 18568         
       
 18569     }/*function_date_to_dword*/
       
 18570     break;
       
 18571 
       
 18572 /****
       
 18573  *DATE_TO_UDINT
       
 18574  */
       
 18575     case function_date_to_udint :
       
 18576     {
       
 18577         symbol_c *last_type_symbol = NULL;
       
 18578 
       
 18579         {
       
 18580             symbol_c *IN_type_symbol = param_data_type;
       
 18581             last_type_symbol = param_data_type;
       
 18582             
       
 18583             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18584             {
       
 18585         
       
 18586                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 18587                 return return_type_symbol;
       
 18588                 
       
 18589             }
       
 18590             
       
 18591             
       
 18592             ERROR;
       
 18593         }
       
 18594         
       
 18595     }/*function_date_to_udint*/
       
 18596     break;
       
 18597 
       
 18598 /****
       
 18599  *DATE_TO_WORD
       
 18600  */
       
 18601     case function_date_to_word :
       
 18602     {
       
 18603         symbol_c *last_type_symbol = NULL;
       
 18604 
       
 18605         {
       
 18606             symbol_c *IN_type_symbol = param_data_type;
       
 18607             last_type_symbol = param_data_type;
       
 18608             
       
 18609             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18610             {
       
 18611         
       
 18612                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18613                 return return_type_symbol;
       
 18614                 
       
 18615             }
       
 18616             
       
 18617             
       
 18618             ERROR;
       
 18619         }
       
 18620         
       
 18621     }/*function_date_to_word*/
       
 18622     break;
       
 18623 
       
 18624 /****
       
 18625  *DATE_TO_STRING
       
 18626  */
       
 18627     case function_date_to_string :
       
 18628     {
       
 18629         symbol_c *last_type_symbol = NULL;
       
 18630 
       
 18631         {
       
 18632             symbol_c *IN_type_symbol = param_data_type;
       
 18633             last_type_symbol = param_data_type;
       
 18634             
       
 18635             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18636             {
       
 18637         
       
 18638                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18639                 return return_type_symbol;
       
 18640                 
       
 18641             }
       
 18642             
       
 18643             
       
 18644             ERROR;
       
 18645         }
       
 18646         
       
 18647     }/*function_date_to_string*/
       
 18648     break;
       
 18649 
       
 18650 /****
       
 18651  *DATE_TO_LWORD
       
 18652  */
       
 18653     case function_date_to_lword :
       
 18654     {
       
 18655         symbol_c *last_type_symbol = NULL;
       
 18656 
       
 18657         {
       
 18658             symbol_c *IN_type_symbol = param_data_type;
       
 18659             last_type_symbol = param_data_type;
       
 18660             
       
 18661             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18662             {
       
 18663         
       
 18664                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18665                 return return_type_symbol;
       
 18666                 
       
 18667             }
       
 18668             
       
 18669             
       
 18670             ERROR;
       
 18671         }
       
 18672         
       
 18673     }/*function_date_to_lword*/
       
 18674     break;
       
 18675 
       
 18676 /****
       
 18677  *DATE_TO_UINT
       
 18678  */
       
 18679     case function_date_to_uint :
       
 18680     {
       
 18681         symbol_c *last_type_symbol = NULL;
       
 18682 
       
 18683         {
       
 18684             symbol_c *IN_type_symbol = param_data_type;
       
 18685             last_type_symbol = param_data_type;
       
 18686             
       
 18687             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18688             {
       
 18689         
       
 18690                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18691                 return return_type_symbol;
       
 18692                 
       
 18693             }
       
 18694             
       
 18695             
       
 18696             ERROR;
       
 18697         }
       
 18698         
       
 18699     }/*function_date_to_uint*/
       
 18700     break;
       
 18701 
       
 18702 /****
       
 18703  *DATE_TO_LREAL
       
 18704  */
       
 18705     case function_date_to_lreal :
       
 18706     {
       
 18707         symbol_c *last_type_symbol = NULL;
       
 18708 
       
 18709         {
       
 18710             symbol_c *IN_type_symbol = param_data_type;
       
 18711             last_type_symbol = param_data_type;
       
 18712             
       
 18713             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18714             {
       
 18715         
       
 18716                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18717                 return return_type_symbol;
       
 18718                 
       
 18719             }
       
 18720             
       
 18721             
       
 18722             ERROR;
       
 18723         }
       
 18724         
       
 18725     }/*function_date_to_lreal*/
       
 18726     break;
       
 18727 
       
 18728 /****
       
 18729  *DATE_TO_BYTE
       
 18730  */
       
 18731     case function_date_to_byte :
       
 18732     {
       
 18733         symbol_c *last_type_symbol = NULL;
       
 18734 
       
 18735         {
       
 18736             symbol_c *IN_type_symbol = param_data_type;
       
 18737             last_type_symbol = param_data_type;
       
 18738             
       
 18739             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18740             {
       
 18741         
       
 18742                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18743                 return return_type_symbol;
       
 18744                 
       
 18745             }
       
 18746             
       
 18747             
       
 18748             ERROR;
       
 18749         }
       
 18750         
       
 18751     }/*function_date_to_byte*/
       
 18752     break;
       
 18753 
       
 18754 /****
       
 18755  *DATE_TO_USINT
       
 18756  */
       
 18757     case function_date_to_usint :
       
 18758     {
       
 18759         symbol_c *last_type_symbol = NULL;
       
 18760 
       
 18761         {
       
 18762             symbol_c *IN_type_symbol = param_data_type;
       
 18763             last_type_symbol = param_data_type;
       
 18764             
       
 18765             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18766             {
       
 18767         
       
 18768                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18769                 return return_type_symbol;
       
 18770                 
       
 18771             }
       
 18772             
       
 18773             
       
 18774             ERROR;
       
 18775         }
       
 18776         
       
 18777     }/*function_date_to_usint*/
       
 18778     break;
       
 18779 
       
 18780 /****
       
 18781  *DATE_TO_ULINT
       
 18782  */
       
 18783     case function_date_to_ulint :
       
 18784     {
       
 18785         symbol_c *last_type_symbol = NULL;
       
 18786 
       
 18787         {
       
 18788             symbol_c *IN_type_symbol = param_data_type;
       
 18789             last_type_symbol = param_data_type;
       
 18790             
       
 18791             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18792             {
       
 18793         
       
 18794                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18795                 return return_type_symbol;
       
 18796                 
       
 18797             }
       
 18798             
       
 18799             
       
 18800             ERROR;
       
 18801         }
       
 18802         
       
 18803     }/*function_date_to_ulint*/
       
 18804     break;
       
 18805 
       
 18806 /****
       
 18807  *DATE_TO_INT
       
 18808  */
       
 18809     case function_date_to_int :
       
 18810     {
       
 18811         symbol_c *last_type_symbol = NULL;
       
 18812 
       
 18813         {
       
 18814             symbol_c *IN_type_symbol = param_data_type;
       
 18815             last_type_symbol = param_data_type;
       
 18816             
       
 18817             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 18818             {
       
 18819         
       
 18820                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18821                 return return_type_symbol;
       
 18822                 
       
 18823             }
       
 18824             
       
 18825             
       
 18826             ERROR;
       
 18827         }
       
 18828         
       
 18829     }/*function_date_to_int*/
       
 18830     break;
       
 18831 
       
 18832 /****
       
 18833  *DWORD_TO_REAL
       
 18834  */
       
 18835     case function_dword_to_real :
       
 18836     {
       
 18837         symbol_c *last_type_symbol = NULL;
       
 18838 
       
 18839         {
       
 18840             symbol_c *IN_type_symbol = param_data_type;
       
 18841             last_type_symbol = param_data_type;
       
 18842             
       
 18843             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 18844             {
       
 18845         
       
 18846                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18847                 return return_type_symbol;
       
 18848                 
       
 18849             }
       
 18850             
       
 18851             
       
 18852             ERROR;
       
 18853         }
       
 18854         
       
 18855     }/*function_dword_to_real*/
       
 18856     break;
       
 18857 
       
 18858 /****
       
 18859  *DWORD_TO_SINT
       
 18860  */
       
 18861     case function_dword_to_sint :
       
 18862     {
       
 18863         symbol_c *last_type_symbol = NULL;
       
 18864 
       
 18865         {
       
 18866             symbol_c *IN_type_symbol = param_data_type;
       
 18867             last_type_symbol = param_data_type;
       
 18868             
       
 18869             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 18870             {
       
 18871         
       
 18872                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18873                 return return_type_symbol;
       
 18874                 
       
 18875             }
       
 18876             
       
 18877             
       
 18878             ERROR;
       
 18879         }
       
 18880         
       
 18881     }/*function_dword_to_sint*/
       
 18882     break;
       
 18883 
       
 18884 /****
       
 18885  *DWORD_TO_LINT
       
 18886  */
       
 18887     case function_dword_to_lint :
       
 18888     {
       
 18889         symbol_c *last_type_symbol = NULL;
       
 18890 
       
 18891         {
       
 18892             symbol_c *IN_type_symbol = param_data_type;
       
 18893             last_type_symbol = param_data_type;
       
 18894             
       
 18895             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 18896             {
       
 18897         
       
 18898                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18899                 return return_type_symbol;
       
 18900                 
       
 18901             }
       
 18902             
       
 18903             
       
 18904             ERROR;
       
 18905         }
       
 18906         
       
 18907     }/*function_dword_to_lint*/
       
 18908     break;
       
 18909 
       
 18910 /****
       
 18911  *DWORD_TO_DINT
       
 18912  */
       
 18913     case function_dword_to_dint :
       
 18914     {
       
 18915         symbol_c *last_type_symbol = NULL;
       
 18916 
       
 18917         {
       
 18918             symbol_c *IN_type_symbol = param_data_type;
       
 18919             last_type_symbol = param_data_type;
       
 18920             
       
 18921             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 18922             {
       
 18923         
       
 18924                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18925                 return return_type_symbol;
       
 18926                 
       
 18927             }
       
 18928             
       
 18929             
       
 18930             ERROR;
       
 18931         }
       
 18932         
       
 18933     }/*function_dword_to_dint*/
       
 18934     break;
       
 18935 
       
 18936 /****
       
 18937  *DWORD_TO_DATE
       
 18938  */
       
 18939     case function_dword_to_date :
       
 18940     {
       
 18941         symbol_c *last_type_symbol = NULL;
       
 18942 
       
 18943         {
       
 18944             symbol_c *IN_type_symbol = param_data_type;
       
 18945             last_type_symbol = param_data_type;
       
 18946             
       
 18947             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 18948             {
       
 18949         
       
 18950                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18951                 return return_type_symbol;
       
 18952                 
       
 18953             }
       
 18954             
       
 18955             
       
 18956             ERROR;
       
 18957         }
       
 18958         
       
 18959     }/*function_dword_to_date*/
       
 18960     break;
       
 18961 
       
 18962 /****
       
 18963  *DWORD_TO_DT
       
 18964  */
       
 18965     case function_dword_to_dt :
       
 18966     {
       
 18967         symbol_c *last_type_symbol = NULL;
       
 18968 
       
 18969         {
       
 18970             symbol_c *IN_type_symbol = param_data_type;
       
 18971             last_type_symbol = param_data_type;
       
 18972             
       
 18973             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 18974             {
       
 18975         
       
 18976                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18977                 return return_type_symbol;
       
 18978                 
       
 18979             }
       
 18980             
       
 18981             
       
 18982             ERROR;
       
 18983         }
       
 18984         
       
 18985     }/*function_dword_to_dt*/
       
 18986     break;
       
 18987 
       
 18988 /****
       
 18989  *DWORD_TO_TOD
       
 18990  */
       
 18991     case function_dword_to_tod :
       
 18992     {
       
 18993         symbol_c *last_type_symbol = NULL;
       
 18994 
       
 18995         {
       
 18996             symbol_c *IN_type_symbol = param_data_type;
       
 18997             last_type_symbol = param_data_type;
       
 18998             
       
 18999             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19000             {
       
 19001         
       
 19002                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 19003                 return return_type_symbol;
       
 19004                 
       
 19005             }
       
 19006             
       
 19007             
       
 19008             ERROR;
       
 19009         }
       
 19010         
       
 19011     }/*function_dword_to_tod*/
       
 19012     break;
       
 19013 
       
 19014 /****
       
 19015  *DWORD_TO_UDINT
       
 19016  */
       
 19017     case function_dword_to_udint :
       
 19018     {
       
 19019         symbol_c *last_type_symbol = NULL;
       
 19020 
       
 19021         {
       
 19022             symbol_c *IN_type_symbol = param_data_type;
       
 19023             last_type_symbol = param_data_type;
       
 19024             
       
 19025             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19026             {
       
 19027         
       
 19028                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19029                 return return_type_symbol;
       
 19030                 
       
 19031             }
       
 19032             
       
 19033             
       
 19034             ERROR;
       
 19035         }
       
 19036         
       
 19037     }/*function_dword_to_udint*/
       
 19038     break;
       
 19039 
       
 19040 /****
       
 19041  *DWORD_TO_WORD
       
 19042  */
       
 19043     case function_dword_to_word :
       
 19044     {
       
 19045         symbol_c *last_type_symbol = NULL;
       
 19046 
       
 19047         {
       
 19048             symbol_c *IN_type_symbol = param_data_type;
       
 19049             last_type_symbol = param_data_type;
       
 19050             
       
 19051             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19052             {
       
 19053         
       
 19054                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19055                 return return_type_symbol;
       
 19056                 
       
 19057             }
       
 19058             
       
 19059             
       
 19060             ERROR;
       
 19061         }
       
 19062         
       
 19063     }/*function_dword_to_word*/
       
 19064     break;
       
 19065 
       
 19066 /****
       
 19067  *DWORD_TO_STRING
       
 19068  */
       
 19069     case function_dword_to_string :
       
 19070     {
       
 19071         symbol_c *last_type_symbol = NULL;
       
 19072 
       
 19073         {
       
 19074             symbol_c *IN_type_symbol = param_data_type;
       
 19075             last_type_symbol = param_data_type;
       
 19076             
       
 19077             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19078             {
       
 19079         
       
 19080                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19081                 return return_type_symbol;
       
 19082                 
       
 19083             }
       
 19084             
       
 19085             
       
 19086             ERROR;
       
 19087         }
       
 19088         
       
 19089     }/*function_dword_to_string*/
       
 19090     break;
       
 19091 
       
 19092 /****
       
 19093  *DWORD_TO_LWORD
       
 19094  */
       
 19095     case function_dword_to_lword :
       
 19096     {
       
 19097         symbol_c *last_type_symbol = NULL;
       
 19098 
       
 19099         {
       
 19100             symbol_c *IN_type_symbol = param_data_type;
       
 19101             last_type_symbol = param_data_type;
       
 19102             
       
 19103             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19104             {
       
 19105         
       
 19106                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19107                 return return_type_symbol;
       
 19108                 
       
 19109             }
       
 19110             
       
 19111             
       
 19112             ERROR;
       
 19113         }
       
 19114         
       
 19115     }/*function_dword_to_lword*/
       
 19116     break;
       
 19117 
       
 19118 /****
       
 19119  *DWORD_TO_UINT
       
 19120  */
       
 19121     case function_dword_to_uint :
       
 19122     {
       
 19123         symbol_c *last_type_symbol = NULL;
       
 19124 
       
 19125         {
       
 19126             symbol_c *IN_type_symbol = param_data_type;
       
 19127             last_type_symbol = param_data_type;
       
 19128             
       
 19129             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19130             {
       
 19131         
       
 19132                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19133                 return return_type_symbol;
       
 19134                 
       
 19135             }
       
 19136             
       
 19137             
       
 19138             ERROR;
       
 19139         }
       
 19140         
       
 19141     }/*function_dword_to_uint*/
       
 19142     break;
       
 19143 
       
 19144 /****
       
 19145  *DWORD_TO_LREAL
       
 19146  */
       
 19147     case function_dword_to_lreal :
       
 19148     {
       
 19149         symbol_c *last_type_symbol = NULL;
       
 19150 
       
 19151         {
       
 19152             symbol_c *IN_type_symbol = param_data_type;
       
 19153             last_type_symbol = param_data_type;
       
 19154             
       
 19155             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19156             {
       
 19157         
       
 19158                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19159                 return return_type_symbol;
       
 19160                 
       
 19161             }
       
 19162             
       
 19163             
       
 19164             ERROR;
       
 19165         }
       
 19166         
       
 19167     }/*function_dword_to_lreal*/
       
 19168     break;
       
 19169 
       
 19170 /****
       
 19171  *DWORD_TO_BYTE
       
 19172  */
       
 19173     case function_dword_to_byte :
       
 19174     {
       
 19175         symbol_c *last_type_symbol = NULL;
       
 19176 
       
 19177         {
       
 19178             symbol_c *IN_type_symbol = param_data_type;
       
 19179             last_type_symbol = param_data_type;
       
 19180             
       
 19181             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19182             {
       
 19183         
       
 19184                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19185                 return return_type_symbol;
       
 19186                 
       
 19187             }
       
 19188             
       
 19189             
       
 19190             ERROR;
       
 19191         }
       
 19192         
       
 19193     }/*function_dword_to_byte*/
       
 19194     break;
       
 19195 
       
 19196 /****
       
 19197  *DWORD_TO_USINT
       
 19198  */
       
 19199     case function_dword_to_usint :
       
 19200     {
       
 19201         symbol_c *last_type_symbol = NULL;
       
 19202 
       
 19203         {
       
 19204             symbol_c *IN_type_symbol = param_data_type;
       
 19205             last_type_symbol = param_data_type;
       
 19206             
       
 19207             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19208             {
       
 19209         
       
 19210                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19211                 return return_type_symbol;
       
 19212                 
       
 19213             }
       
 19214             
       
 19215             
       
 19216             ERROR;
       
 19217         }
       
 19218         
       
 19219     }/*function_dword_to_usint*/
       
 19220     break;
       
 19221 
       
 19222 /****
       
 19223  *DWORD_TO_ULINT
       
 19224  */
       
 19225     case function_dword_to_ulint :
       
 19226     {
       
 19227         symbol_c *last_type_symbol = NULL;
       
 19228 
       
 19229         {
       
 19230             symbol_c *IN_type_symbol = param_data_type;
       
 19231             last_type_symbol = param_data_type;
       
 19232             
       
 19233             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19234             {
       
 19235         
       
 19236                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19237                 return return_type_symbol;
       
 19238                 
       
 19239             }
       
 19240             
       
 19241             
       
 19242             ERROR;
       
 19243         }
       
 19244         
       
 19245     }/*function_dword_to_ulint*/
       
 19246     break;
       
 19247 
       
 19248 /****
       
 19249  *DWORD_TO_BOOL
       
 19250  */
       
 19251     case function_dword_to_bool :
       
 19252     {
       
 19253         symbol_c *last_type_symbol = NULL;
       
 19254 
       
 19255         {
       
 19256             symbol_c *IN_type_symbol = param_data_type;
       
 19257             last_type_symbol = param_data_type;
       
 19258             
       
 19259             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19260             {
       
 19261         
       
 19262                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19263                 return return_type_symbol;
       
 19264                 
       
 19265             }
       
 19266             
       
 19267             
       
 19268             ERROR;
       
 19269         }
       
 19270         
       
 19271     }/*function_dword_to_bool*/
       
 19272     break;
       
 19273 
       
 19274 /****
       
 19275  *DWORD_TO_TIME
       
 19276  */
       
 19277     case function_dword_to_time :
       
 19278     {
       
 19279         symbol_c *last_type_symbol = NULL;
       
 19280 
       
 19281         {
       
 19282             symbol_c *IN_type_symbol = param_data_type;
       
 19283             last_type_symbol = param_data_type;
       
 19284             
       
 19285             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19286             {
       
 19287         
       
 19288                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 19289                 return return_type_symbol;
       
 19290                 
       
 19291             }
       
 19292             
       
 19293             
       
 19294             ERROR;
       
 19295         }
       
 19296         
       
 19297     }/*function_dword_to_time*/
       
 19298     break;
       
 19299 
       
 19300 /****
       
 19301  *DWORD_TO_INT
       
 19302  */
       
 19303     case function_dword_to_int :
       
 19304     {
       
 19305         symbol_c *last_type_symbol = NULL;
       
 19306 
       
 19307         {
       
 19308             symbol_c *IN_type_symbol = param_data_type;
       
 19309             last_type_symbol = param_data_type;
       
 19310             
       
 19311             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 19312             {
       
 19313         
       
 19314                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19315                 return return_type_symbol;
       
 19316                 
       
 19317             }
       
 19318             
       
 19319             
       
 19320             ERROR;
       
 19321         }
       
 19322         
       
 19323     }/*function_dword_to_int*/
       
 19324     break;
       
 19325 
       
 19326 /****
       
 19327  *DT_TO_REAL
       
 19328  */
       
 19329     case function_dt_to_real :
       
 19330     {
       
 19331         symbol_c *last_type_symbol = NULL;
       
 19332 
       
 19333         {
       
 19334             symbol_c *IN_type_symbol = param_data_type;
       
 19335             last_type_symbol = param_data_type;
       
 19336             
       
 19337             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19338             {
       
 19339         
       
 19340                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19341                 return return_type_symbol;
       
 19342                 
       
 19343             }
       
 19344             
       
 19345             
       
 19346             ERROR;
       
 19347         }
       
 19348         
       
 19349     }/*function_dt_to_real*/
       
 19350     break;
       
 19351 
       
 19352 /****
       
 19353  *DT_TO_SINT
       
 19354  */
       
 19355     case function_dt_to_sint :
       
 19356     {
       
 19357         symbol_c *last_type_symbol = NULL;
       
 19358 
       
 19359         {
       
 19360             symbol_c *IN_type_symbol = param_data_type;
       
 19361             last_type_symbol = param_data_type;
       
 19362             
       
 19363             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19364             {
       
 19365         
       
 19366                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19367                 return return_type_symbol;
       
 19368                 
       
 19369             }
       
 19370             
       
 19371             
       
 19372             ERROR;
       
 19373         }
       
 19374         
       
 19375     }/*function_dt_to_sint*/
       
 19376     break;
       
 19377 
       
 19378 /****
       
 19379  *DT_TO_LINT
       
 19380  */
       
 19381     case function_dt_to_lint :
       
 19382     {
       
 19383         symbol_c *last_type_symbol = NULL;
       
 19384 
       
 19385         {
       
 19386             symbol_c *IN_type_symbol = param_data_type;
       
 19387             last_type_symbol = param_data_type;
       
 19388             
       
 19389             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19390             {
       
 19391         
       
 19392                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19393                 return return_type_symbol;
       
 19394                 
       
 19395             }
       
 19396             
       
 19397             
       
 19398             ERROR;
       
 19399         }
       
 19400         
       
 19401     }/*function_dt_to_lint*/
       
 19402     break;
       
 19403 
       
 19404 /****
       
 19405  *DT_TO_DINT
       
 19406  */
       
 19407     case function_dt_to_dint :
       
 19408     {
       
 19409         symbol_c *last_type_symbol = NULL;
       
 19410 
       
 19411         {
       
 19412             symbol_c *IN_type_symbol = param_data_type;
       
 19413             last_type_symbol = param_data_type;
       
 19414             
       
 19415             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19416             {
       
 19417         
       
 19418                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19419                 return return_type_symbol;
       
 19420                 
       
 19421             }
       
 19422             
       
 19423             
       
 19424             ERROR;
       
 19425         }
       
 19426         
       
 19427     }/*function_dt_to_dint*/
       
 19428     break;
       
 19429 
       
 19430 /****
       
 19431  *DT_TO_DWORD
       
 19432  */
       
 19433     case function_dt_to_dword :
       
 19434     {
       
 19435         symbol_c *last_type_symbol = NULL;
       
 19436 
       
 19437         {
       
 19438             symbol_c *IN_type_symbol = param_data_type;
       
 19439             last_type_symbol = param_data_type;
       
 19440             
       
 19441             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19442             {
       
 19443         
       
 19444                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19445                 return return_type_symbol;
       
 19446                 
       
 19447             }
       
 19448             
       
 19449             
       
 19450             ERROR;
       
 19451         }
       
 19452         
       
 19453     }/*function_dt_to_dword*/
       
 19454     break;
       
 19455 
       
 19456 /****
       
 19457  *DT_TO_UDINT
       
 19458  */
       
 19459     case function_dt_to_udint :
       
 19460     {
       
 19461         symbol_c *last_type_symbol = NULL;
       
 19462 
       
 19463         {
       
 19464             symbol_c *IN_type_symbol = param_data_type;
       
 19465             last_type_symbol = param_data_type;
       
 19466             
       
 19467             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19468             {
       
 19469         
       
 19470                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19471                 return return_type_symbol;
       
 19472                 
       
 19473             }
       
 19474             
       
 19475             
       
 19476             ERROR;
       
 19477         }
       
 19478         
       
 19479     }/*function_dt_to_udint*/
       
 19480     break;
       
 19481 
       
 19482 /****
       
 19483  *DT_TO_WORD
       
 19484  */
       
 19485     case function_dt_to_word :
       
 19486     {
       
 19487         symbol_c *last_type_symbol = NULL;
       
 19488 
       
 19489         {
       
 19490             symbol_c *IN_type_symbol = param_data_type;
       
 19491             last_type_symbol = param_data_type;
       
 19492             
       
 19493             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19494             {
       
 19495         
       
 19496                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19497                 return return_type_symbol;
       
 19498                 
       
 19499             }
       
 19500             
       
 19501             
       
 19502             ERROR;
       
 19503         }
       
 19504         
       
 19505     }/*function_dt_to_word*/
       
 19506     break;
       
 19507 
       
 19508 /****
       
 19509  *DT_TO_STRING
       
 19510  */
       
 19511     case function_dt_to_string :
       
 19512     {
       
 19513         symbol_c *last_type_symbol = NULL;
       
 19514 
       
 19515         {
       
 19516             symbol_c *IN_type_symbol = param_data_type;
       
 19517             last_type_symbol = param_data_type;
       
 19518             
       
 19519             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19520             {
       
 19521         
       
 19522                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19523                 return return_type_symbol;
       
 19524                 
       
 19525             }
       
 19526             
       
 19527             
       
 19528             ERROR;
       
 19529         }
       
 19530         
       
 19531     }/*function_dt_to_string*/
       
 19532     break;
       
 19533 
       
 19534 /****
       
 19535  *DT_TO_LWORD
       
 19536  */
       
 19537     case function_dt_to_lword :
       
 19538     {
       
 19539         symbol_c *last_type_symbol = NULL;
       
 19540 
       
 19541         {
       
 19542             symbol_c *IN_type_symbol = param_data_type;
       
 19543             last_type_symbol = param_data_type;
       
 19544             
       
 19545             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19546             {
       
 19547         
       
 19548                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19549                 return return_type_symbol;
       
 19550                 
       
 19551             }
       
 19552             
       
 19553             
       
 19554             ERROR;
       
 19555         }
       
 19556         
       
 19557     }/*function_dt_to_lword*/
       
 19558     break;
       
 19559 
       
 19560 /****
       
 19561  *DT_TO_UINT
       
 19562  */
       
 19563     case function_dt_to_uint :
       
 19564     {
       
 19565         symbol_c *last_type_symbol = NULL;
       
 19566 
       
 19567         {
       
 19568             symbol_c *IN_type_symbol = param_data_type;
       
 19569             last_type_symbol = param_data_type;
       
 19570             
       
 19571             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19572             {
       
 19573         
       
 19574                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19575                 return return_type_symbol;
       
 19576                 
       
 19577             }
       
 19578             
       
 19579             
       
 19580             ERROR;
       
 19581         }
       
 19582         
       
 19583     }/*function_dt_to_uint*/
       
 19584     break;
       
 19585 
       
 19586 /****
       
 19587  *DT_TO_LREAL
       
 19588  */
       
 19589     case function_dt_to_lreal :
       
 19590     {
       
 19591         symbol_c *last_type_symbol = NULL;
       
 19592 
       
 19593         {
       
 19594             symbol_c *IN_type_symbol = param_data_type;
       
 19595             last_type_symbol = param_data_type;
       
 19596             
       
 19597             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19598             {
       
 19599         
       
 19600                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19601                 return return_type_symbol;
       
 19602                 
       
 19603             }
       
 19604             
       
 19605             
       
 19606             ERROR;
       
 19607         }
       
 19608         
       
 19609     }/*function_dt_to_lreal*/
       
 19610     break;
       
 19611 
       
 19612 /****
       
 19613  *DT_TO_BYTE
       
 19614  */
       
 19615     case function_dt_to_byte :
       
 19616     {
       
 19617         symbol_c *last_type_symbol = NULL;
       
 19618 
       
 19619         {
       
 19620             symbol_c *IN_type_symbol = param_data_type;
       
 19621             last_type_symbol = param_data_type;
       
 19622             
       
 19623             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19624             {
       
 19625         
       
 19626                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19627                 return return_type_symbol;
       
 19628                 
       
 19629             }
       
 19630             
       
 19631             
       
 19632             ERROR;
       
 19633         }
       
 19634         
       
 19635     }/*function_dt_to_byte*/
       
 19636     break;
       
 19637 
       
 19638 /****
       
 19639  *DT_TO_USINT
       
 19640  */
       
 19641     case function_dt_to_usint :
       
 19642     {
       
 19643         symbol_c *last_type_symbol = NULL;
       
 19644 
       
 19645         {
       
 19646             symbol_c *IN_type_symbol = param_data_type;
       
 19647             last_type_symbol = param_data_type;
       
 19648             
       
 19649             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19650             {
       
 19651         
       
 19652                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19653                 return return_type_symbol;
       
 19654                 
       
 19655             }
       
 19656             
       
 19657             
       
 19658             ERROR;
       
 19659         }
       
 19660         
       
 19661     }/*function_dt_to_usint*/
       
 19662     break;
       
 19663 
       
 19664 /****
       
 19665  *DT_TO_ULINT
       
 19666  */
       
 19667     case function_dt_to_ulint :
       
 19668     {
       
 19669         symbol_c *last_type_symbol = NULL;
       
 19670 
       
 19671         {
       
 19672             symbol_c *IN_type_symbol = param_data_type;
       
 19673             last_type_symbol = param_data_type;
       
 19674             
       
 19675             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19676             {
       
 19677         
       
 19678                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19679                 return return_type_symbol;
       
 19680                 
       
 19681             }
       
 19682             
       
 19683             
       
 19684             ERROR;
       
 19685         }
       
 19686         
       
 19687     }/*function_dt_to_ulint*/
       
 19688     break;
       
 19689 
       
 19690 /****
       
 19691  *DT_TO_INT
       
 19692  */
       
 19693     case function_dt_to_int :
       
 19694     {
       
 19695         symbol_c *last_type_symbol = NULL;
       
 19696 
       
 19697         {
       
 19698             symbol_c *IN_type_symbol = param_data_type;
       
 19699             last_type_symbol = param_data_type;
       
 19700             
       
 19701             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 19702             {
       
 19703         
       
 19704                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19705                 return return_type_symbol;
       
 19706                 
       
 19707             }
       
 19708             
       
 19709             
       
 19710             ERROR;
       
 19711         }
       
 19712         
       
 19713     }/*function_dt_to_int*/
       
 19714     break;
       
 19715 
       
 19716 /****
       
 19717  *TOD_TO_REAL
       
 19718  */
       
 19719     case function_tod_to_real :
       
 19720     {
       
 19721         symbol_c *last_type_symbol = NULL;
       
 19722 
       
 19723         {
       
 19724             symbol_c *IN_type_symbol = param_data_type;
       
 19725             last_type_symbol = param_data_type;
       
 19726             
       
 19727             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19728             {
       
 19729         
       
 19730                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19731                 return return_type_symbol;
       
 19732                 
       
 19733             }
       
 19734             
       
 19735             
       
 19736             ERROR;
       
 19737         }
       
 19738         
       
 19739     }/*function_tod_to_real*/
       
 19740     break;
       
 19741 
       
 19742 /****
       
 19743  *TOD_TO_SINT
       
 19744  */
       
 19745     case function_tod_to_sint :
       
 19746     {
       
 19747         symbol_c *last_type_symbol = NULL;
       
 19748 
       
 19749         {
       
 19750             symbol_c *IN_type_symbol = param_data_type;
       
 19751             last_type_symbol = param_data_type;
       
 19752             
       
 19753             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19754             {
       
 19755         
       
 19756                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19757                 return return_type_symbol;
       
 19758                 
       
 19759             }
       
 19760             
       
 19761             
       
 19762             ERROR;
       
 19763         }
       
 19764         
       
 19765     }/*function_tod_to_sint*/
       
 19766     break;
       
 19767 
       
 19768 /****
       
 19769  *TOD_TO_LINT
       
 19770  */
       
 19771     case function_tod_to_lint :
       
 19772     {
       
 19773         symbol_c *last_type_symbol = NULL;
       
 19774 
       
 19775         {
       
 19776             symbol_c *IN_type_symbol = param_data_type;
       
 19777             last_type_symbol = param_data_type;
       
 19778             
       
 19779             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19780             {
       
 19781         
       
 19782                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19783                 return return_type_symbol;
       
 19784                 
       
 19785             }
       
 19786             
       
 19787             
       
 19788             ERROR;
       
 19789         }
       
 19790         
       
 19791     }/*function_tod_to_lint*/
       
 19792     break;
       
 19793 
       
 19794 /****
       
 19795  *TOD_TO_DINT
       
 19796  */
       
 19797     case function_tod_to_dint :
       
 19798     {
       
 19799         symbol_c *last_type_symbol = NULL;
       
 19800 
       
 19801         {
       
 19802             symbol_c *IN_type_symbol = param_data_type;
       
 19803             last_type_symbol = param_data_type;
       
 19804             
       
 19805             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19806             {
       
 19807         
       
 19808                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19809                 return return_type_symbol;
       
 19810                 
       
 19811             }
       
 19812             
       
 19813             
       
 19814             ERROR;
       
 19815         }
       
 19816         
       
 19817     }/*function_tod_to_dint*/
       
 19818     break;
       
 19819 
       
 19820 /****
       
 19821  *TOD_TO_DWORD
       
 19822  */
       
 19823     case function_tod_to_dword :
       
 19824     {
       
 19825         symbol_c *last_type_symbol = NULL;
       
 19826 
       
 19827         {
       
 19828             symbol_c *IN_type_symbol = param_data_type;
       
 19829             last_type_symbol = param_data_type;
       
 19830             
       
 19831             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19832             {
       
 19833         
       
 19834                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19835                 return return_type_symbol;
       
 19836                 
       
 19837             }
       
 19838             
       
 19839             
       
 19840             ERROR;
       
 19841         }
       
 19842         
       
 19843     }/*function_tod_to_dword*/
       
 19844     break;
       
 19845 
       
 19846 /****
       
 19847  *TOD_TO_UDINT
       
 19848  */
       
 19849     case function_tod_to_udint :
       
 19850     {
       
 19851         symbol_c *last_type_symbol = NULL;
       
 19852 
       
 19853         {
       
 19854             symbol_c *IN_type_symbol = param_data_type;
       
 19855             last_type_symbol = param_data_type;
       
 19856             
       
 19857             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19858             {
       
 19859         
       
 19860                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19861                 return return_type_symbol;
       
 19862                 
       
 19863             }
       
 19864             
       
 19865             
       
 19866             ERROR;
       
 19867         }
       
 19868         
       
 19869     }/*function_tod_to_udint*/
       
 19870     break;
       
 19871 
       
 19872 /****
       
 19873  *TOD_TO_WORD
       
 19874  */
       
 19875     case function_tod_to_word :
       
 19876     {
       
 19877         symbol_c *last_type_symbol = NULL;
       
 19878 
       
 19879         {
       
 19880             symbol_c *IN_type_symbol = param_data_type;
       
 19881             last_type_symbol = param_data_type;
       
 19882             
       
 19883             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19884             {
       
 19885         
       
 19886                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19887                 return return_type_symbol;
       
 19888                 
       
 19889             }
       
 19890             
       
 19891             
       
 19892             ERROR;
       
 19893         }
       
 19894         
       
 19895     }/*function_tod_to_word*/
       
 19896     break;
       
 19897 
       
 19898 /****
       
 19899  *TOD_TO_STRING
       
 19900  */
       
 19901     case function_tod_to_string :
       
 19902     {
       
 19903         symbol_c *last_type_symbol = NULL;
       
 19904 
       
 19905         {
       
 19906             symbol_c *IN_type_symbol = param_data_type;
       
 19907             last_type_symbol = param_data_type;
       
 19908             
       
 19909             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19910             {
       
 19911         
       
 19912                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19913                 return return_type_symbol;
       
 19914                 
       
 19915             }
       
 19916             
       
 19917             
       
 19918             ERROR;
       
 19919         }
       
 19920         
       
 19921     }/*function_tod_to_string*/
       
 19922     break;
       
 19923 
       
 19924 /****
       
 19925  *TOD_TO_LWORD
       
 19926  */
       
 19927     case function_tod_to_lword :
       
 19928     {
       
 19929         symbol_c *last_type_symbol = NULL;
       
 19930 
       
 19931         {
       
 19932             symbol_c *IN_type_symbol = param_data_type;
       
 19933             last_type_symbol = param_data_type;
       
 19934             
       
 19935             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19936             {
       
 19937         
       
 19938                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19939                 return return_type_symbol;
       
 19940                 
       
 19941             }
       
 19942             
       
 19943             
       
 19944             ERROR;
       
 19945         }
       
 19946         
       
 19947     }/*function_tod_to_lword*/
       
 19948     break;
       
 19949 
       
 19950 /****
       
 19951  *TOD_TO_UINT
       
 19952  */
       
 19953     case function_tod_to_uint :
       
 19954     {
       
 19955         symbol_c *last_type_symbol = NULL;
       
 19956 
       
 19957         {
       
 19958             symbol_c *IN_type_symbol = param_data_type;
       
 19959             last_type_symbol = param_data_type;
       
 19960             
       
 19961             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19962             {
       
 19963         
       
 19964                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19965                 return return_type_symbol;
       
 19966                 
       
 19967             }
       
 19968             
       
 19969             
       
 19970             ERROR;
       
 19971         }
       
 19972         
       
 19973     }/*function_tod_to_uint*/
       
 19974     break;
       
 19975 
       
 19976 /****
       
 19977  *TOD_TO_LREAL
       
 19978  */
       
 19979     case function_tod_to_lreal :
       
 19980     {
       
 19981         symbol_c *last_type_symbol = NULL;
       
 19982 
       
 19983         {
       
 19984             symbol_c *IN_type_symbol = param_data_type;
       
 19985             last_type_symbol = param_data_type;
       
 19986             
       
 19987             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 19988             {
       
 19989         
       
 19990                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19991                 return return_type_symbol;
       
 19992                 
       
 19993             }
       
 19994             
       
 19995             
       
 19996             ERROR;
       
 19997         }
       
 19998         
       
 19999     }/*function_tod_to_lreal*/
       
 20000     break;
       
 20001 
       
 20002 /****
       
 20003  *TOD_TO_BYTE
       
 20004  */
       
 20005     case function_tod_to_byte :
       
 20006     {
       
 20007         symbol_c *last_type_symbol = NULL;
       
 20008 
       
 20009         {
       
 20010             symbol_c *IN_type_symbol = param_data_type;
       
 20011             last_type_symbol = param_data_type;
       
 20012             
       
 20013             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20014             {
       
 20015         
       
 20016                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20017                 return return_type_symbol;
       
 20018                 
       
 20019             }
       
 20020             
       
 20021             
       
 20022             ERROR;
       
 20023         }
       
 20024         
       
 20025     }/*function_tod_to_byte*/
       
 20026     break;
       
 20027 
       
 20028 /****
       
 20029  *TOD_TO_USINT
       
 20030  */
       
 20031     case function_tod_to_usint :
       
 20032     {
       
 20033         symbol_c *last_type_symbol = NULL;
       
 20034 
       
 20035         {
       
 20036             symbol_c *IN_type_symbol = param_data_type;
       
 20037             last_type_symbol = param_data_type;
       
 20038             
       
 20039             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20040             {
       
 20041         
       
 20042                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20043                 return return_type_symbol;
       
 20044                 
       
 20045             }
       
 20046             
       
 20047             
       
 20048             ERROR;
       
 20049         }
       
 20050         
       
 20051     }/*function_tod_to_usint*/
       
 20052     break;
       
 20053 
       
 20054 /****
       
 20055  *TOD_TO_ULINT
       
 20056  */
       
 20057     case function_tod_to_ulint :
       
 20058     {
       
 20059         symbol_c *last_type_symbol = NULL;
       
 20060 
       
 20061         {
       
 20062             symbol_c *IN_type_symbol = param_data_type;
       
 20063             last_type_symbol = param_data_type;
       
 20064             
       
 20065             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20066             {
       
 20067         
       
 20068                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20069                 return return_type_symbol;
       
 20070                 
       
 20071             }
       
 20072             
       
 20073             
       
 20074             ERROR;
       
 20075         }
       
 20076         
       
 20077     }/*function_tod_to_ulint*/
       
 20078     break;
       
 20079 
       
 20080 /****
       
 20081  *TOD_TO_INT
       
 20082  */
       
 20083     case function_tod_to_int :
       
 20084     {
       
 20085         symbol_c *last_type_symbol = NULL;
       
 20086 
       
 20087         {
       
 20088             symbol_c *IN_type_symbol = param_data_type;
       
 20089             last_type_symbol = param_data_type;
       
 20090             
       
 20091             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20092             {
       
 20093         
       
 20094                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20095                 return return_type_symbol;
       
 20096                 
       
 20097             }
       
 20098             
       
 20099             
       
 20100             ERROR;
       
 20101         }
       
 20102         
       
 20103     }/*function_tod_to_int*/
       
 20104     break;
       
 20105 
       
 20106 /****
       
 20107  *UDINT_TO_REAL
       
 20108  */
       
 20109     case function_udint_to_real :
       
 20110     {
       
 20111         symbol_c *last_type_symbol = NULL;
       
 20112 
       
 20113         {
       
 20114             symbol_c *IN_type_symbol = param_data_type;
       
 20115             last_type_symbol = param_data_type;
       
 20116             
       
 20117             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20118             {
       
 20119         
       
 20120                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20121                 return return_type_symbol;
       
 20122                 
       
 20123             }
       
 20124             
       
 20125             
       
 20126             ERROR;
       
 20127         }
       
 20128         
       
 20129     }/*function_udint_to_real*/
       
 20130     break;
       
 20131 
       
 20132 /****
       
 20133  *UDINT_TO_SINT
       
 20134  */
       
 20135     case function_udint_to_sint :
       
 20136     {
       
 20137         symbol_c *last_type_symbol = NULL;
       
 20138 
       
 20139         {
       
 20140             symbol_c *IN_type_symbol = param_data_type;
       
 20141             last_type_symbol = param_data_type;
       
 20142             
       
 20143             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20144             {
       
 20145         
       
 20146                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20147                 return return_type_symbol;
       
 20148                 
       
 20149             }
       
 20150             
       
 20151             
       
 20152             ERROR;
       
 20153         }
       
 20154         
       
 20155     }/*function_udint_to_sint*/
       
 20156     break;
       
 20157 
       
 20158 /****
       
 20159  *UDINT_TO_LINT
       
 20160  */
       
 20161     case function_udint_to_lint :
       
 20162     {
       
 20163         symbol_c *last_type_symbol = NULL;
       
 20164 
       
 20165         {
       
 20166             symbol_c *IN_type_symbol = param_data_type;
       
 20167             last_type_symbol = param_data_type;
       
 20168             
       
 20169             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20170             {
       
 20171         
       
 20172                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20173                 return return_type_symbol;
       
 20174                 
       
 20175             }
       
 20176             
       
 20177             
       
 20178             ERROR;
       
 20179         }
       
 20180         
       
 20181     }/*function_udint_to_lint*/
       
 20182     break;
       
 20183 
       
 20184 /****
       
 20185  *UDINT_TO_DINT
       
 20186  */
       
 20187     case function_udint_to_dint :
       
 20188     {
       
 20189         symbol_c *last_type_symbol = NULL;
       
 20190 
       
 20191         {
       
 20192             symbol_c *IN_type_symbol = param_data_type;
       
 20193             last_type_symbol = param_data_type;
       
 20194             
       
 20195             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20196             {
       
 20197         
       
 20198                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20199                 return return_type_symbol;
       
 20200                 
       
 20201             }
       
 20202             
       
 20203             
       
 20204             ERROR;
       
 20205         }
       
 20206         
       
 20207     }/*function_udint_to_dint*/
       
 20208     break;
       
 20209 
       
 20210 /****
       
 20211  *UDINT_TO_DATE
       
 20212  */
       
 20213     case function_udint_to_date :
       
 20214     {
       
 20215         symbol_c *last_type_symbol = NULL;
       
 20216 
       
 20217         {
       
 20218             symbol_c *IN_type_symbol = param_data_type;
       
 20219             last_type_symbol = param_data_type;
       
 20220             
       
 20221             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20222             {
       
 20223         
       
 20224                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 20225                 return return_type_symbol;
       
 20226                 
       
 20227             }
       
 20228             
       
 20229             
       
 20230             ERROR;
       
 20231         }
       
 20232         
       
 20233     }/*function_udint_to_date*/
       
 20234     break;
       
 20235 
       
 20236 /****
       
 20237  *UDINT_TO_DWORD
       
 20238  */
       
 20239     case function_udint_to_dword :
       
 20240     {
       
 20241         symbol_c *last_type_symbol = NULL;
       
 20242 
       
 20243         {
       
 20244             symbol_c *IN_type_symbol = param_data_type;
       
 20245             last_type_symbol = param_data_type;
       
 20246             
       
 20247             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20248             {
       
 20249         
       
 20250                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20251                 return return_type_symbol;
       
 20252                 
       
 20253             }
       
 20254             
       
 20255             
       
 20256             ERROR;
       
 20257         }
       
 20258         
       
 20259     }/*function_udint_to_dword*/
       
 20260     break;
       
 20261 
       
 20262 /****
       
 20263  *UDINT_TO_DT
       
 20264  */
       
 20265     case function_udint_to_dt :
       
 20266     {
       
 20267         symbol_c *last_type_symbol = NULL;
       
 20268 
       
 20269         {
       
 20270             symbol_c *IN_type_symbol = param_data_type;
       
 20271             last_type_symbol = param_data_type;
       
 20272             
       
 20273             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20274             {
       
 20275         
       
 20276                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 20277                 return return_type_symbol;
       
 20278                 
       
 20279             }
       
 20280             
       
 20281             
       
 20282             ERROR;
       
 20283         }
       
 20284         
       
 20285     }/*function_udint_to_dt*/
       
 20286     break;
       
 20287 
       
 20288 /****
       
 20289  *UDINT_TO_TOD
       
 20290  */
       
 20291     case function_udint_to_tod :
       
 20292     {
       
 20293         symbol_c *last_type_symbol = NULL;
       
 20294 
       
 20295         {
       
 20296             symbol_c *IN_type_symbol = param_data_type;
       
 20297             last_type_symbol = param_data_type;
       
 20298             
       
 20299             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20300             {
       
 20301         
       
 20302                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 20303                 return return_type_symbol;
       
 20304                 
       
 20305             }
       
 20306             
       
 20307             
       
 20308             ERROR;
       
 20309         }
       
 20310         
       
 20311     }/*function_udint_to_tod*/
       
 20312     break;
       
 20313 
       
 20314 /****
       
 20315  *UDINT_TO_WORD
       
 20316  */
       
 20317     case function_udint_to_word :
       
 20318     {
       
 20319         symbol_c *last_type_symbol = NULL;
       
 20320 
       
 20321         {
       
 20322             symbol_c *IN_type_symbol = param_data_type;
       
 20323             last_type_symbol = param_data_type;
       
 20324             
       
 20325             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20326             {
       
 20327         
       
 20328                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20329                 return return_type_symbol;
       
 20330                 
       
 20331             }
       
 20332             
       
 20333             
       
 20334             ERROR;
       
 20335         }
       
 20336         
       
 20337     }/*function_udint_to_word*/
       
 20338     break;
       
 20339 
       
 20340 /****
       
 20341  *UDINT_TO_STRING
       
 20342  */
       
 20343     case function_udint_to_string :
       
 20344     {
       
 20345         symbol_c *last_type_symbol = NULL;
       
 20346 
       
 20347         {
       
 20348             symbol_c *IN_type_symbol = param_data_type;
       
 20349             last_type_symbol = param_data_type;
       
 20350             
       
 20351             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20352             {
       
 20353         
       
 20354                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20355                 return return_type_symbol;
       
 20356                 
       
 20357             }
       
 20358             
       
 20359             
       
 20360             ERROR;
       
 20361         }
       
 20362         
       
 20363     }/*function_udint_to_string*/
       
 20364     break;
       
 20365 
       
 20366 /****
       
 20367  *UDINT_TO_LWORD
       
 20368  */
       
 20369     case function_udint_to_lword :
       
 20370     {
       
 20371         symbol_c *last_type_symbol = NULL;
       
 20372 
       
 20373         {
       
 20374             symbol_c *IN_type_symbol = param_data_type;
       
 20375             last_type_symbol = param_data_type;
       
 20376             
       
 20377             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20378             {
       
 20379         
       
 20380                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20381                 return return_type_symbol;
       
 20382                 
       
 20383             }
       
 20384             
       
 20385             
       
 20386             ERROR;
       
 20387         }
       
 20388         
       
 20389     }/*function_udint_to_lword*/
       
 20390     break;
       
 20391 
       
 20392 /****
       
 20393  *UDINT_TO_UINT
       
 20394  */
       
 20395     case function_udint_to_uint :
       
 20396     {
       
 20397         symbol_c *last_type_symbol = NULL;
       
 20398 
       
 20399         {
       
 20400             symbol_c *IN_type_symbol = param_data_type;
       
 20401             last_type_symbol = param_data_type;
       
 20402             
       
 20403             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20404             {
       
 20405         
       
 20406                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20407                 return return_type_symbol;
       
 20408                 
       
 20409             }
       
 20410             
       
 20411             
       
 20412             ERROR;
       
 20413         }
       
 20414         
       
 20415     }/*function_udint_to_uint*/
       
 20416     break;
       
 20417 
       
 20418 /****
       
 20419  *UDINT_TO_LREAL
       
 20420  */
       
 20421     case function_udint_to_lreal :
       
 20422     {
       
 20423         symbol_c *last_type_symbol = NULL;
       
 20424 
       
 20425         {
       
 20426             symbol_c *IN_type_symbol = param_data_type;
       
 20427             last_type_symbol = param_data_type;
       
 20428             
       
 20429             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20430             {
       
 20431         
       
 20432                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20433                 return return_type_symbol;
       
 20434                 
       
 20435             }
       
 20436             
       
 20437             
       
 20438             ERROR;
       
 20439         }
       
 20440         
       
 20441     }/*function_udint_to_lreal*/
       
 20442     break;
       
 20443 
       
 20444 /****
       
 20445  *UDINT_TO_BYTE
       
 20446  */
       
 20447     case function_udint_to_byte :
       
 20448     {
       
 20449         symbol_c *last_type_symbol = NULL;
       
 20450 
       
 20451         {
       
 20452             symbol_c *IN_type_symbol = param_data_type;
       
 20453             last_type_symbol = param_data_type;
       
 20454             
       
 20455             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20456             {
       
 20457         
       
 20458                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20459                 return return_type_symbol;
       
 20460                 
       
 20461             }
       
 20462             
       
 20463             
       
 20464             ERROR;
       
 20465         }
       
 20466         
       
 20467     }/*function_udint_to_byte*/
       
 20468     break;
       
 20469 
       
 20470 /****
       
 20471  *UDINT_TO_USINT
       
 20472  */
       
 20473     case function_udint_to_usint :
       
 20474     {
       
 20475         symbol_c *last_type_symbol = NULL;
       
 20476 
       
 20477         {
       
 20478             symbol_c *IN_type_symbol = param_data_type;
       
 20479             last_type_symbol = param_data_type;
       
 20480             
       
 20481             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20482             {
       
 20483         
       
 20484                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20485                 return return_type_symbol;
       
 20486                 
       
 20487             }
       
 20488             
       
 20489             
       
 20490             ERROR;
       
 20491         }
       
 20492         
       
 20493     }/*function_udint_to_usint*/
       
 20494     break;
       
 20495 
       
 20496 /****
       
 20497  *UDINT_TO_ULINT
       
 20498  */
       
 20499     case function_udint_to_ulint :
       
 20500     {
       
 20501         symbol_c *last_type_symbol = NULL;
       
 20502 
       
 20503         {
       
 20504             symbol_c *IN_type_symbol = param_data_type;
       
 20505             last_type_symbol = param_data_type;
       
 20506             
       
 20507             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20508             {
       
 20509         
       
 20510                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20511                 return return_type_symbol;
       
 20512                 
       
 20513             }
       
 20514             
       
 20515             
       
 20516             ERROR;
       
 20517         }
       
 20518         
       
 20519     }/*function_udint_to_ulint*/
       
 20520     break;
       
 20521 
       
 20522 /****
       
 20523  *UDINT_TO_BOOL
       
 20524  */
       
 20525     case function_udint_to_bool :
       
 20526     {
       
 20527         symbol_c *last_type_symbol = NULL;
       
 20528 
       
 20529         {
       
 20530             symbol_c *IN_type_symbol = param_data_type;
       
 20531             last_type_symbol = param_data_type;
       
 20532             
       
 20533             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20534             {
       
 20535         
       
 20536                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 20537                 return return_type_symbol;
       
 20538                 
       
 20539             }
       
 20540             
       
 20541             
       
 20542             ERROR;
       
 20543         }
       
 20544         
       
 20545     }/*function_udint_to_bool*/
       
 20546     break;
       
 20547 
       
 20548 /****
       
 20549  *UDINT_TO_TIME
       
 20550  */
       
 20551     case function_udint_to_time :
       
 20552     {
       
 20553         symbol_c *last_type_symbol = NULL;
       
 20554 
       
 20555         {
       
 20556             symbol_c *IN_type_symbol = param_data_type;
       
 20557             last_type_symbol = param_data_type;
       
 20558             
       
 20559             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20560             {
       
 20561         
       
 20562                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 20563                 return return_type_symbol;
       
 20564                 
       
 20565             }
       
 20566             
       
 20567             
       
 20568             ERROR;
       
 20569         }
       
 20570         
       
 20571     }/*function_udint_to_time*/
       
 20572     break;
       
 20573 
       
 20574 /****
       
 20575  *UDINT_TO_INT
       
 20576  */
       
 20577     case function_udint_to_int :
       
 20578     {
       
 20579         symbol_c *last_type_symbol = NULL;
       
 20580 
       
 20581         {
       
 20582             symbol_c *IN_type_symbol = param_data_type;
       
 20583             last_type_symbol = param_data_type;
       
 20584             
       
 20585             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 20586             {
       
 20587         
       
 20588                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20589                 return return_type_symbol;
       
 20590                 
       
 20591             }
       
 20592             
       
 20593             
       
 20594             ERROR;
       
 20595         }
       
 20596         
       
 20597     }/*function_udint_to_int*/
       
 20598     break;
       
 20599 
       
 20600 /****
       
 20601  *WORD_TO_REAL
       
 20602  */
       
 20603     case function_word_to_real :
       
 20604     {
       
 20605         symbol_c *last_type_symbol = NULL;
       
 20606 
       
 20607         {
       
 20608             symbol_c *IN_type_symbol = param_data_type;
       
 20609             last_type_symbol = param_data_type;
       
 20610             
       
 20611             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20612             {
       
 20613         
       
 20614                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20615                 return return_type_symbol;
       
 20616                 
       
 20617             }
       
 20618             
       
 20619             
       
 20620             ERROR;
       
 20621         }
       
 20622         
       
 20623     }/*function_word_to_real*/
       
 20624     break;
       
 20625 
       
 20626 /****
       
 20627  *WORD_TO_SINT
       
 20628  */
       
 20629     case function_word_to_sint :
       
 20630     {
       
 20631         symbol_c *last_type_symbol = NULL;
       
 20632 
       
 20633         {
       
 20634             symbol_c *IN_type_symbol = param_data_type;
       
 20635             last_type_symbol = param_data_type;
       
 20636             
       
 20637             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20638             {
       
 20639         
       
 20640                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20641                 return return_type_symbol;
       
 20642                 
       
 20643             }
       
 20644             
       
 20645             
       
 20646             ERROR;
       
 20647         }
       
 20648         
       
 20649     }/*function_word_to_sint*/
       
 20650     break;
       
 20651 
       
 20652 /****
       
 20653  *WORD_TO_LINT
       
 20654  */
       
 20655     case function_word_to_lint :
       
 20656     {
       
 20657         symbol_c *last_type_symbol = NULL;
       
 20658 
       
 20659         {
       
 20660             symbol_c *IN_type_symbol = param_data_type;
       
 20661             last_type_symbol = param_data_type;
       
 20662             
       
 20663             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20664             {
       
 20665         
       
 20666                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20667                 return return_type_symbol;
       
 20668                 
       
 20669             }
       
 20670             
       
 20671             
       
 20672             ERROR;
       
 20673         }
       
 20674         
       
 20675     }/*function_word_to_lint*/
       
 20676     break;
       
 20677 
       
 20678 /****
       
 20679  *WORD_TO_DINT
       
 20680  */
       
 20681     case function_word_to_dint :
       
 20682     {
       
 20683         symbol_c *last_type_symbol = NULL;
       
 20684 
       
 20685         {
       
 20686             symbol_c *IN_type_symbol = param_data_type;
       
 20687             last_type_symbol = param_data_type;
       
 20688             
       
 20689             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20690             {
       
 20691         
       
 20692                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20693                 return return_type_symbol;
       
 20694                 
       
 20695             }
       
 20696             
       
 20697             
       
 20698             ERROR;
       
 20699         }
       
 20700         
       
 20701     }/*function_word_to_dint*/
       
 20702     break;
       
 20703 
       
 20704 /****
       
 20705  *WORD_TO_DATE
       
 20706  */
       
 20707     case function_word_to_date :
       
 20708     {
       
 20709         symbol_c *last_type_symbol = NULL;
       
 20710 
       
 20711         {
       
 20712             symbol_c *IN_type_symbol = param_data_type;
       
 20713             last_type_symbol = param_data_type;
       
 20714             
       
 20715             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20716             {
       
 20717         
       
 20718                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 20719                 return return_type_symbol;
       
 20720                 
       
 20721             }
       
 20722             
       
 20723             
       
 20724             ERROR;
       
 20725         }
       
 20726         
       
 20727     }/*function_word_to_date*/
       
 20728     break;
       
 20729 
       
 20730 /****
       
 20731  *WORD_TO_DWORD
       
 20732  */
       
 20733     case function_word_to_dword :
       
 20734     {
       
 20735         symbol_c *last_type_symbol = NULL;
       
 20736 
       
 20737         {
       
 20738             symbol_c *IN_type_symbol = param_data_type;
       
 20739             last_type_symbol = param_data_type;
       
 20740             
       
 20741             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20742             {
       
 20743         
       
 20744                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20745                 return return_type_symbol;
       
 20746                 
       
 20747             }
       
 20748             
       
 20749             
       
 20750             ERROR;
       
 20751         }
       
 20752         
       
 20753     }/*function_word_to_dword*/
       
 20754     break;
       
 20755 
       
 20756 /****
       
 20757  *WORD_TO_DT
       
 20758  */
       
 20759     case function_word_to_dt :
       
 20760     {
       
 20761         symbol_c *last_type_symbol = NULL;
       
 20762 
       
 20763         {
       
 20764             symbol_c *IN_type_symbol = param_data_type;
       
 20765             last_type_symbol = param_data_type;
       
 20766             
       
 20767             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20768             {
       
 20769         
       
 20770                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 20771                 return return_type_symbol;
       
 20772                 
       
 20773             }
       
 20774             
       
 20775             
       
 20776             ERROR;
       
 20777         }
       
 20778         
       
 20779     }/*function_word_to_dt*/
       
 20780     break;
       
 20781 
       
 20782 /****
       
 20783  *WORD_TO_TOD
       
 20784  */
       
 20785     case function_word_to_tod :
       
 20786     {
       
 20787         symbol_c *last_type_symbol = NULL;
       
 20788 
       
 20789         {
       
 20790             symbol_c *IN_type_symbol = param_data_type;
       
 20791             last_type_symbol = param_data_type;
       
 20792             
       
 20793             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20794             {
       
 20795         
       
 20796                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 20797                 return return_type_symbol;
       
 20798                 
       
 20799             }
       
 20800             
       
 20801             
       
 20802             ERROR;
       
 20803         }
       
 20804         
       
 20805     }/*function_word_to_tod*/
       
 20806     break;
       
 20807 
       
 20808 /****
       
 20809  *WORD_TO_UDINT
       
 20810  */
       
 20811     case function_word_to_udint :
       
 20812     {
       
 20813         symbol_c *last_type_symbol = NULL;
       
 20814 
       
 20815         {
       
 20816             symbol_c *IN_type_symbol = param_data_type;
       
 20817             last_type_symbol = param_data_type;
       
 20818             
       
 20819             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20820             {
       
 20821         
       
 20822                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20823                 return return_type_symbol;
       
 20824                 
       
 20825             }
       
 20826             
       
 20827             
       
 20828             ERROR;
       
 20829         }
       
 20830         
       
 20831     }/*function_word_to_udint*/
       
 20832     break;
       
 20833 
       
 20834 /****
       
 20835  *WORD_TO_STRING
       
 20836  */
       
 20837     case function_word_to_string :
       
 20838     {
       
 20839         symbol_c *last_type_symbol = NULL;
       
 20840 
       
 20841         {
       
 20842             symbol_c *IN_type_symbol = param_data_type;
       
 20843             last_type_symbol = param_data_type;
       
 20844             
       
 20845             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20846             {
       
 20847         
       
 20848                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20849                 return return_type_symbol;
       
 20850                 
       
 20851             }
       
 20852             
       
 20853             
       
 20854             ERROR;
       
 20855         }
       
 20856         
       
 20857     }/*function_word_to_string*/
       
 20858     break;
       
 20859 
       
 20860 /****
       
 20861  *WORD_TO_LWORD
       
 20862  */
       
 20863     case function_word_to_lword :
       
 20864     {
       
 20865         symbol_c *last_type_symbol = NULL;
       
 20866 
       
 20867         {
       
 20868             symbol_c *IN_type_symbol = param_data_type;
       
 20869             last_type_symbol = param_data_type;
       
 20870             
       
 20871             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20872             {
       
 20873         
       
 20874                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20875                 return return_type_symbol;
       
 20876                 
       
 20877             }
       
 20878             
       
 20879             
       
 20880             ERROR;
       
 20881         }
       
 20882         
       
 20883     }/*function_word_to_lword*/
       
 20884     break;
       
 20885 
       
 20886 /****
       
 20887  *WORD_TO_UINT
       
 20888  */
       
 20889     case function_word_to_uint :
       
 20890     {
       
 20891         symbol_c *last_type_symbol = NULL;
       
 20892 
       
 20893         {
       
 20894             symbol_c *IN_type_symbol = param_data_type;
       
 20895             last_type_symbol = param_data_type;
       
 20896             
       
 20897             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20898             {
       
 20899         
       
 20900                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20901                 return return_type_symbol;
       
 20902                 
       
 20903             }
       
 20904             
       
 20905             
       
 20906             ERROR;
       
 20907         }
       
 20908         
       
 20909     }/*function_word_to_uint*/
       
 20910     break;
       
 20911 
       
 20912 /****
       
 20913  *WORD_TO_LREAL
       
 20914  */
       
 20915     case function_word_to_lreal :
       
 20916     {
       
 20917         symbol_c *last_type_symbol = NULL;
       
 20918 
       
 20919         {
       
 20920             symbol_c *IN_type_symbol = param_data_type;
       
 20921             last_type_symbol = param_data_type;
       
 20922             
       
 20923             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20924             {
       
 20925         
       
 20926                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20927                 return return_type_symbol;
       
 20928                 
       
 20929             }
       
 20930             
       
 20931             
       
 20932             ERROR;
       
 20933         }
       
 20934         
       
 20935     }/*function_word_to_lreal*/
       
 20936     break;
       
 20937 
       
 20938 /****
       
 20939  *WORD_TO_BYTE
       
 20940  */
       
 20941     case function_word_to_byte :
       
 20942     {
       
 20943         symbol_c *last_type_symbol = NULL;
       
 20944 
       
 20945         {
       
 20946             symbol_c *IN_type_symbol = param_data_type;
       
 20947             last_type_symbol = param_data_type;
       
 20948             
       
 20949             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20950             {
       
 20951         
       
 20952                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20953                 return return_type_symbol;
       
 20954                 
       
 20955             }
       
 20956             
       
 20957             
       
 20958             ERROR;
       
 20959         }
       
 20960         
       
 20961     }/*function_word_to_byte*/
       
 20962     break;
       
 20963 
       
 20964 /****
       
 20965  *WORD_TO_USINT
       
 20966  */
       
 20967     case function_word_to_usint :
       
 20968     {
       
 20969         symbol_c *last_type_symbol = NULL;
       
 20970 
       
 20971         {
       
 20972             symbol_c *IN_type_symbol = param_data_type;
       
 20973             last_type_symbol = param_data_type;
       
 20974             
       
 20975             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 20976             {
       
 20977         
       
 20978                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20979                 return return_type_symbol;
       
 20980                 
       
 20981             }
       
 20982             
       
 20983             
       
 20984             ERROR;
       
 20985         }
       
 20986         
       
 20987     }/*function_word_to_usint*/
       
 20988     break;
       
 20989 
       
 20990 /****
       
 20991  *WORD_TO_ULINT
       
 20992  */
       
 20993     case function_word_to_ulint :
       
 20994     {
       
 20995         symbol_c *last_type_symbol = NULL;
       
 20996 
       
 20997         {
       
 20998             symbol_c *IN_type_symbol = param_data_type;
       
 20999             last_type_symbol = param_data_type;
       
 21000             
       
 21001             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 21002             {
       
 21003         
       
 21004                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21005                 return return_type_symbol;
       
 21006                 
       
 21007             }
       
 21008             
       
 21009             
       
 21010             ERROR;
       
 21011         }
       
 21012         
       
 21013     }/*function_word_to_ulint*/
       
 21014     break;
       
 21015 
       
 21016 /****
       
 21017  *WORD_TO_BOOL
       
 21018  */
       
 21019     case function_word_to_bool :
       
 21020     {
       
 21021         symbol_c *last_type_symbol = NULL;
       
 21022 
       
 21023         {
       
 21024             symbol_c *IN_type_symbol = param_data_type;
       
 21025             last_type_symbol = param_data_type;
       
 21026             
       
 21027             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 21028             {
       
 21029         
       
 21030                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21031                 return return_type_symbol;
       
 21032                 
       
 21033             }
       
 21034             
       
 21035             
       
 21036             ERROR;
       
 21037         }
       
 21038         
       
 21039     }/*function_word_to_bool*/
       
 21040     break;
       
 21041 
       
 21042 /****
       
 21043  *WORD_TO_TIME
       
 21044  */
       
 21045     case function_word_to_time :
       
 21046     {
       
 21047         symbol_c *last_type_symbol = NULL;
       
 21048 
       
 21049         {
       
 21050             symbol_c *IN_type_symbol = param_data_type;
       
 21051             last_type_symbol = param_data_type;
       
 21052             
       
 21053             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 21054             {
       
 21055         
       
 21056                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21057                 return return_type_symbol;
       
 21058                 
       
 21059             }
       
 21060             
       
 21061             
       
 21062             ERROR;
       
 21063         }
       
 21064         
       
 21065     }/*function_word_to_time*/
       
 21066     break;
       
 21067 
       
 21068 /****
       
 21069  *WORD_TO_INT
       
 21070  */
       
 21071     case function_word_to_int :
       
 21072     {
       
 21073         symbol_c *last_type_symbol = NULL;
       
 21074 
       
 21075         {
       
 21076             symbol_c *IN_type_symbol = param_data_type;
       
 21077             last_type_symbol = param_data_type;
       
 21078             
       
 21079             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 21080             {
       
 21081         
       
 21082                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21083                 return return_type_symbol;
       
 21084                 
       
 21085             }
       
 21086             
       
 21087             
       
 21088             ERROR;
       
 21089         }
       
 21090         
       
 21091     }/*function_word_to_int*/
       
 21092     break;
       
 21093 
       
 21094 /****
       
 21095  *STRING_TO_REAL
       
 21096  */
       
 21097     case function_string_to_real :
       
 21098     {
       
 21099         symbol_c *last_type_symbol = NULL;
       
 21100 
       
 21101         {
       
 21102             symbol_c *IN_type_symbol = param_data_type;
       
 21103             last_type_symbol = param_data_type;
       
 21104             
       
 21105             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21106             {
       
 21107         
       
 21108                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21109                 return return_type_symbol;
       
 21110                 
       
 21111             }
       
 21112             
       
 21113             
       
 21114             ERROR;
       
 21115         }
       
 21116         
       
 21117     }/*function_string_to_real*/
       
 21118     break;
       
 21119 
       
 21120 /****
       
 21121  *STRING_TO_SINT
       
 21122  */
       
 21123     case function_string_to_sint :
       
 21124     {
       
 21125         symbol_c *last_type_symbol = NULL;
       
 21126 
       
 21127         {
       
 21128             symbol_c *IN_type_symbol = param_data_type;
       
 21129             last_type_symbol = param_data_type;
       
 21130             
       
 21131             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21132             {
       
 21133         
       
 21134                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21135                 return return_type_symbol;
       
 21136                 
       
 21137             }
       
 21138             
       
 21139             
       
 21140             ERROR;
       
 21141         }
       
 21142         
       
 21143     }/*function_string_to_sint*/
       
 21144     break;
       
 21145 
       
 21146 /****
       
 21147  *STRING_TO_LINT
       
 21148  */
       
 21149     case function_string_to_lint :
       
 21150     {
       
 21151         symbol_c *last_type_symbol = NULL;
       
 21152 
       
 21153         {
       
 21154             symbol_c *IN_type_symbol = param_data_type;
       
 21155             last_type_symbol = param_data_type;
       
 21156             
       
 21157             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21158             {
       
 21159         
       
 21160                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21161                 return return_type_symbol;
       
 21162                 
       
 21163             }
       
 21164             
       
 21165             
       
 21166             ERROR;
       
 21167         }
       
 21168         
       
 21169     }/*function_string_to_lint*/
       
 21170     break;
       
 21171 
       
 21172 /****
       
 21173  *STRING_TO_DINT
       
 21174  */
       
 21175     case function_string_to_dint :
       
 21176     {
       
 21177         symbol_c *last_type_symbol = NULL;
       
 21178 
       
 21179         {
       
 21180             symbol_c *IN_type_symbol = param_data_type;
       
 21181             last_type_symbol = param_data_type;
       
 21182             
       
 21183             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21184             {
       
 21185         
       
 21186                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21187                 return return_type_symbol;
       
 21188                 
       
 21189             }
       
 21190             
       
 21191             
       
 21192             ERROR;
       
 21193         }
       
 21194         
       
 21195     }/*function_string_to_dint*/
       
 21196     break;
       
 21197 
       
 21198 /****
       
 21199  *STRING_TO_DATE
       
 21200  */
       
 21201     case function_string_to_date :
       
 21202     {
       
 21203         symbol_c *last_type_symbol = NULL;
       
 21204 
       
 21205         {
       
 21206             symbol_c *IN_type_symbol = param_data_type;
       
 21207             last_type_symbol = param_data_type;
       
 21208             
       
 21209             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21210             {
       
 21211         
       
 21212                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21213                 return return_type_symbol;
       
 21214                 
       
 21215             }
       
 21216             
       
 21217             
       
 21218             ERROR;
       
 21219         }
       
 21220         
       
 21221     }/*function_string_to_date*/
       
 21222     break;
       
 21223 
       
 21224 /****
       
 21225  *STRING_TO_DWORD
       
 21226  */
       
 21227     case function_string_to_dword :
       
 21228     {
       
 21229         symbol_c *last_type_symbol = NULL;
       
 21230 
       
 21231         {
       
 21232             symbol_c *IN_type_symbol = param_data_type;
       
 21233             last_type_symbol = param_data_type;
       
 21234             
       
 21235             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21236             {
       
 21237         
       
 21238                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21239                 return return_type_symbol;
       
 21240                 
       
 21241             }
       
 21242             
       
 21243             
       
 21244             ERROR;
       
 21245         }
       
 21246         
       
 21247     }/*function_string_to_dword*/
       
 21248     break;
       
 21249 
       
 21250 /****
       
 21251  *STRING_TO_DT
       
 21252  */
       
 21253     case function_string_to_dt :
       
 21254     {
       
 21255         symbol_c *last_type_symbol = NULL;
       
 21256 
       
 21257         {
       
 21258             symbol_c *IN_type_symbol = param_data_type;
       
 21259             last_type_symbol = param_data_type;
       
 21260             
       
 21261             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21262             {
       
 21263         
       
 21264                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21265                 return return_type_symbol;
       
 21266                 
       
 21267             }
       
 21268             
       
 21269             
       
 21270             ERROR;
       
 21271         }
       
 21272         
       
 21273     }/*function_string_to_dt*/
       
 21274     break;
       
 21275 
       
 21276 /****
       
 21277  *STRING_TO_TOD
       
 21278  */
       
 21279     case function_string_to_tod :
       
 21280     {
       
 21281         symbol_c *last_type_symbol = NULL;
       
 21282 
       
 21283         {
       
 21284             symbol_c *IN_type_symbol = param_data_type;
       
 21285             last_type_symbol = param_data_type;
       
 21286             
       
 21287             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21288             {
       
 21289         
       
 21290                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21291                 return return_type_symbol;
       
 21292                 
       
 21293             }
       
 21294             
       
 21295             
       
 21296             ERROR;
       
 21297         }
       
 21298         
       
 21299     }/*function_string_to_tod*/
       
 21300     break;
       
 21301 
       
 21302 /****
       
 21303  *STRING_TO_UDINT
       
 21304  */
       
 21305     case function_string_to_udint :
       
 21306     {
       
 21307         symbol_c *last_type_symbol = NULL;
       
 21308 
       
 21309         {
       
 21310             symbol_c *IN_type_symbol = param_data_type;
       
 21311             last_type_symbol = param_data_type;
       
 21312             
       
 21313             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21314             {
       
 21315         
       
 21316                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21317                 return return_type_symbol;
       
 21318                 
       
 21319             }
       
 21320             
       
 21321             
       
 21322             ERROR;
       
 21323         }
       
 21324         
       
 21325     }/*function_string_to_udint*/
       
 21326     break;
       
 21327 
       
 21328 /****
       
 21329  *STRING_TO_WORD
       
 21330  */
       
 21331     case function_string_to_word :
       
 21332     {
       
 21333         symbol_c *last_type_symbol = NULL;
       
 21334 
       
 21335         {
       
 21336             symbol_c *IN_type_symbol = param_data_type;
       
 21337             last_type_symbol = param_data_type;
       
 21338             
       
 21339             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21340             {
       
 21341         
       
 21342                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21343                 return return_type_symbol;
       
 21344                 
       
 21345             }
       
 21346             
       
 21347             
       
 21348             ERROR;
       
 21349         }
       
 21350         
       
 21351     }/*function_string_to_word*/
       
 21352     break;
       
 21353 
       
 21354 /****
       
 21355  *STRING_TO_LWORD
       
 21356  */
       
 21357     case function_string_to_lword :
       
 21358     {
       
 21359         symbol_c *last_type_symbol = NULL;
       
 21360 
       
 21361         {
       
 21362             symbol_c *IN_type_symbol = param_data_type;
       
 21363             last_type_symbol = param_data_type;
       
 21364             
       
 21365             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21366             {
       
 21367         
       
 21368                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21369                 return return_type_symbol;
       
 21370                 
       
 21371             }
       
 21372             
       
 21373             
       
 21374             ERROR;
       
 21375         }
       
 21376         
       
 21377     }/*function_string_to_lword*/
       
 21378     break;
       
 21379 
       
 21380 /****
       
 21381  *STRING_TO_UINT
       
 21382  */
       
 21383     case function_string_to_uint :
       
 21384     {
       
 21385         symbol_c *last_type_symbol = NULL;
       
 21386 
       
 21387         {
       
 21388             symbol_c *IN_type_symbol = param_data_type;
       
 21389             last_type_symbol = param_data_type;
       
 21390             
       
 21391             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21392             {
       
 21393         
       
 21394                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21395                 return return_type_symbol;
       
 21396                 
       
 21397             }
       
 21398             
       
 21399             
       
 21400             ERROR;
       
 21401         }
       
 21402         
       
 21403     }/*function_string_to_uint*/
       
 21404     break;
       
 21405 
       
 21406 /****
       
 21407  *STRING_TO_LREAL
       
 21408  */
       
 21409     case function_string_to_lreal :
       
 21410     {
       
 21411         symbol_c *last_type_symbol = NULL;
       
 21412 
       
 21413         {
       
 21414             symbol_c *IN_type_symbol = param_data_type;
       
 21415             last_type_symbol = param_data_type;
       
 21416             
       
 21417             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21418             {
       
 21419         
       
 21420                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21421                 return return_type_symbol;
       
 21422                 
       
 21423             }
       
 21424             
       
 21425             
       
 21426             ERROR;
       
 21427         }
       
 21428         
       
 21429     }/*function_string_to_lreal*/
       
 21430     break;
       
 21431 
       
 21432 /****
       
 21433  *STRING_TO_BYTE
       
 21434  */
       
 21435     case function_string_to_byte :
       
 21436     {
       
 21437         symbol_c *last_type_symbol = NULL;
       
 21438 
       
 21439         {
       
 21440             symbol_c *IN_type_symbol = param_data_type;
       
 21441             last_type_symbol = param_data_type;
       
 21442             
       
 21443             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21444             {
       
 21445         
       
 21446                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21447                 return return_type_symbol;
       
 21448                 
       
 21449             }
       
 21450             
       
 21451             
       
 21452             ERROR;
       
 21453         }
       
 21454         
       
 21455     }/*function_string_to_byte*/
       
 21456     break;
       
 21457 
       
 21458 /****
       
 21459  *STRING_TO_USINT
       
 21460  */
       
 21461     case function_string_to_usint :
       
 21462     {
       
 21463         symbol_c *last_type_symbol = NULL;
       
 21464 
       
 21465         {
       
 21466             symbol_c *IN_type_symbol = param_data_type;
       
 21467             last_type_symbol = param_data_type;
       
 21468             
       
 21469             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21470             {
       
 21471         
       
 21472                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21473                 return return_type_symbol;
       
 21474                 
       
 21475             }
       
 21476             
       
 21477             
       
 21478             ERROR;
       
 21479         }
       
 21480         
       
 21481     }/*function_string_to_usint*/
       
 21482     break;
       
 21483 
       
 21484 /****
       
 21485  *STRING_TO_ULINT
       
 21486  */
       
 21487     case function_string_to_ulint :
       
 21488     {
       
 21489         symbol_c *last_type_symbol = NULL;
       
 21490 
       
 21491         {
       
 21492             symbol_c *IN_type_symbol = param_data_type;
       
 21493             last_type_symbol = param_data_type;
       
 21494             
       
 21495             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21496             {
       
 21497         
       
 21498                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21499                 return return_type_symbol;
       
 21500                 
       
 21501             }
       
 21502             
       
 21503             
       
 21504             ERROR;
       
 21505         }
       
 21506         
       
 21507     }/*function_string_to_ulint*/
       
 21508     break;
       
 21509 
       
 21510 /****
       
 21511  *STRING_TO_BOOL
       
 21512  */
       
 21513     case function_string_to_bool :
       
 21514     {
       
 21515         symbol_c *last_type_symbol = NULL;
       
 21516 
       
 21517         {
       
 21518             symbol_c *IN_type_symbol = param_data_type;
       
 21519             last_type_symbol = param_data_type;
       
 21520             
       
 21521             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21522             {
       
 21523         
       
 21524                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21525                 return return_type_symbol;
       
 21526                 
       
 21527             }
       
 21528             
       
 21529             
       
 21530             ERROR;
       
 21531         }
       
 21532         
       
 21533     }/*function_string_to_bool*/
       
 21534     break;
       
 21535 
       
 21536 /****
       
 21537  *STRING_TO_TIME
       
 21538  */
       
 21539     case function_string_to_time :
       
 21540     {
       
 21541         symbol_c *last_type_symbol = NULL;
       
 21542 
       
 21543         {
       
 21544             symbol_c *IN_type_symbol = param_data_type;
       
 21545             last_type_symbol = param_data_type;
       
 21546             
       
 21547             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21548             {
       
 21549         
       
 21550                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21551                 return return_type_symbol;
       
 21552                 
       
 21553             }
       
 21554             
       
 21555             
       
 21556             ERROR;
       
 21557         }
       
 21558         
       
 21559     }/*function_string_to_time*/
       
 21560     break;
       
 21561 
       
 21562 /****
       
 21563  *STRING_TO_INT
       
 21564  */
       
 21565     case function_string_to_int :
       
 21566     {
       
 21567         symbol_c *last_type_symbol = NULL;
       
 21568 
       
 21569         {
       
 21570             symbol_c *IN_type_symbol = param_data_type;
       
 21571             last_type_symbol = param_data_type;
       
 21572             
       
 21573             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21574             {
       
 21575         
       
 21576                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21577                 return return_type_symbol;
       
 21578                 
       
 21579             }
       
 21580             
       
 21581             
       
 21582             ERROR;
       
 21583         }
       
 21584         
       
 21585     }/*function_string_to_int*/
       
 21586     break;
       
 21587 
       
 21588 /****
       
 21589  *LWORD_TO_REAL
       
 21590  */
       
 21591     case function_lword_to_real :
       
 21592     {
       
 21593         symbol_c *last_type_symbol = NULL;
       
 21594 
       
 21595         {
       
 21596             symbol_c *IN_type_symbol = param_data_type;
       
 21597             last_type_symbol = param_data_type;
       
 21598             
       
 21599             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21600             {
       
 21601         
       
 21602                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21603                 return return_type_symbol;
       
 21604                 
       
 21605             }
       
 21606             
       
 21607             
       
 21608             ERROR;
       
 21609         }
       
 21610         
       
 21611     }/*function_lword_to_real*/
       
 21612     break;
       
 21613 
       
 21614 /****
       
 21615  *LWORD_TO_SINT
       
 21616  */
       
 21617     case function_lword_to_sint :
       
 21618     {
       
 21619         symbol_c *last_type_symbol = NULL;
       
 21620 
       
 21621         {
       
 21622             symbol_c *IN_type_symbol = param_data_type;
       
 21623             last_type_symbol = param_data_type;
       
 21624             
       
 21625             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21626             {
       
 21627         
       
 21628                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21629                 return return_type_symbol;
       
 21630                 
       
 21631             }
       
 21632             
       
 21633             
       
 21634             ERROR;
       
 21635         }
       
 21636         
       
 21637     }/*function_lword_to_sint*/
       
 21638     break;
       
 21639 
       
 21640 /****
       
 21641  *LWORD_TO_LINT
       
 21642  */
       
 21643     case function_lword_to_lint :
       
 21644     {
       
 21645         symbol_c *last_type_symbol = NULL;
       
 21646 
       
 21647         {
       
 21648             symbol_c *IN_type_symbol = param_data_type;
       
 21649             last_type_symbol = param_data_type;
       
 21650             
       
 21651             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21652             {
       
 21653         
       
 21654                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21655                 return return_type_symbol;
       
 21656                 
       
 21657             }
       
 21658             
       
 21659             
       
 21660             ERROR;
       
 21661         }
       
 21662         
       
 21663     }/*function_lword_to_lint*/
       
 21664     break;
       
 21665 
       
 21666 /****
       
 21667  *LWORD_TO_DINT
       
 21668  */
       
 21669     case function_lword_to_dint :
       
 21670     {
       
 21671         symbol_c *last_type_symbol = NULL;
       
 21672 
       
 21673         {
       
 21674             symbol_c *IN_type_symbol = param_data_type;
       
 21675             last_type_symbol = param_data_type;
       
 21676             
       
 21677             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21678             {
       
 21679         
       
 21680                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21681                 return return_type_symbol;
       
 21682                 
       
 21683             }
       
 21684             
       
 21685             
       
 21686             ERROR;
       
 21687         }
       
 21688         
       
 21689     }/*function_lword_to_dint*/
       
 21690     break;
       
 21691 
       
 21692 /****
       
 21693  *LWORD_TO_DATE
       
 21694  */
       
 21695     case function_lword_to_date :
       
 21696     {
       
 21697         symbol_c *last_type_symbol = NULL;
       
 21698 
       
 21699         {
       
 21700             symbol_c *IN_type_symbol = param_data_type;
       
 21701             last_type_symbol = param_data_type;
       
 21702             
       
 21703             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21704             {
       
 21705         
       
 21706                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21707                 return return_type_symbol;
       
 21708                 
       
 21709             }
       
 21710             
       
 21711             
       
 21712             ERROR;
       
 21713         }
       
 21714         
       
 21715     }/*function_lword_to_date*/
       
 21716     break;
       
 21717 
       
 21718 /****
       
 21719  *LWORD_TO_DWORD
       
 21720  */
       
 21721     case function_lword_to_dword :
       
 21722     {
       
 21723         symbol_c *last_type_symbol = NULL;
       
 21724 
       
 21725         {
       
 21726             symbol_c *IN_type_symbol = param_data_type;
       
 21727             last_type_symbol = param_data_type;
       
 21728             
       
 21729             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21730             {
       
 21731         
       
 21732                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21733                 return return_type_symbol;
       
 21734                 
       
 21735             }
       
 21736             
       
 21737             
       
 21738             ERROR;
       
 21739         }
       
 21740         
       
 21741     }/*function_lword_to_dword*/
       
 21742     break;
       
 21743 
       
 21744 /****
       
 21745  *LWORD_TO_DT
       
 21746  */
       
 21747     case function_lword_to_dt :
       
 21748     {
       
 21749         symbol_c *last_type_symbol = NULL;
       
 21750 
       
 21751         {
       
 21752             symbol_c *IN_type_symbol = param_data_type;
       
 21753             last_type_symbol = param_data_type;
       
 21754             
       
 21755             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21756             {
       
 21757         
       
 21758                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21759                 return return_type_symbol;
       
 21760                 
       
 21761             }
       
 21762             
       
 21763             
       
 21764             ERROR;
       
 21765         }
       
 21766         
       
 21767     }/*function_lword_to_dt*/
       
 21768     break;
       
 21769 
       
 21770 /****
       
 21771  *LWORD_TO_TOD
       
 21772  */
       
 21773     case function_lword_to_tod :
       
 21774     {
       
 21775         symbol_c *last_type_symbol = NULL;
       
 21776 
       
 21777         {
       
 21778             symbol_c *IN_type_symbol = param_data_type;
       
 21779             last_type_symbol = param_data_type;
       
 21780             
       
 21781             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21782             {
       
 21783         
       
 21784                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21785                 return return_type_symbol;
       
 21786                 
       
 21787             }
       
 21788             
       
 21789             
       
 21790             ERROR;
       
 21791         }
       
 21792         
       
 21793     }/*function_lword_to_tod*/
       
 21794     break;
       
 21795 
       
 21796 /****
       
 21797  *LWORD_TO_UDINT
       
 21798  */
       
 21799     case function_lword_to_udint :
       
 21800     {
       
 21801         symbol_c *last_type_symbol = NULL;
       
 21802 
       
 21803         {
       
 21804             symbol_c *IN_type_symbol = param_data_type;
       
 21805             last_type_symbol = param_data_type;
       
 21806             
       
 21807             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21808             {
       
 21809         
       
 21810                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21811                 return return_type_symbol;
       
 21812                 
       
 21813             }
       
 21814             
       
 21815             
       
 21816             ERROR;
       
 21817         }
       
 21818         
       
 21819     }/*function_lword_to_udint*/
       
 21820     break;
       
 21821 
       
 21822 /****
       
 21823  *LWORD_TO_WORD
       
 21824  */
       
 21825     case function_lword_to_word :
       
 21826     {
       
 21827         symbol_c *last_type_symbol = NULL;
       
 21828 
       
 21829         {
       
 21830             symbol_c *IN_type_symbol = param_data_type;
       
 21831             last_type_symbol = param_data_type;
       
 21832             
       
 21833             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21834             {
       
 21835         
       
 21836                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21837                 return return_type_symbol;
       
 21838                 
       
 21839             }
       
 21840             
       
 21841             
       
 21842             ERROR;
       
 21843         }
       
 21844         
       
 21845     }/*function_lword_to_word*/
       
 21846     break;
       
 21847 
       
 21848 /****
       
 21849  *LWORD_TO_STRING
       
 21850  */
       
 21851     case function_lword_to_string :
       
 21852     {
       
 21853         symbol_c *last_type_symbol = NULL;
       
 21854 
       
 21855         {
       
 21856             symbol_c *IN_type_symbol = param_data_type;
       
 21857             last_type_symbol = param_data_type;
       
 21858             
       
 21859             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21860             {
       
 21861         
       
 21862                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21863                 return return_type_symbol;
       
 21864                 
       
 21865             }
       
 21866             
       
 21867             
       
 21868             ERROR;
       
 21869         }
       
 21870         
       
 21871     }/*function_lword_to_string*/
       
 21872     break;
       
 21873 
       
 21874 /****
       
 21875  *LWORD_TO_UINT
       
 21876  */
       
 21877     case function_lword_to_uint :
       
 21878     {
       
 21879         symbol_c *last_type_symbol = NULL;
       
 21880 
       
 21881         {
       
 21882             symbol_c *IN_type_symbol = param_data_type;
       
 21883             last_type_symbol = param_data_type;
       
 21884             
       
 21885             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21886             {
       
 21887         
       
 21888                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21889                 return return_type_symbol;
       
 21890                 
       
 21891             }
       
 21892             
       
 21893             
       
 21894             ERROR;
       
 21895         }
       
 21896         
       
 21897     }/*function_lword_to_uint*/
       
 21898     break;
       
 21899 
       
 21900 /****
       
 21901  *LWORD_TO_LREAL
       
 21902  */
       
 21903     case function_lword_to_lreal :
       
 21904     {
       
 21905         symbol_c *last_type_symbol = NULL;
       
 21906 
       
 21907         {
       
 21908             symbol_c *IN_type_symbol = param_data_type;
       
 21909             last_type_symbol = param_data_type;
       
 21910             
       
 21911             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21912             {
       
 21913         
       
 21914                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21915                 return return_type_symbol;
       
 21916                 
       
 21917             }
       
 21918             
       
 21919             
       
 21920             ERROR;
       
 21921         }
       
 21922         
       
 21923     }/*function_lword_to_lreal*/
       
 21924     break;
       
 21925 
       
 21926 /****
       
 21927  *LWORD_TO_BYTE
       
 21928  */
       
 21929     case function_lword_to_byte :
       
 21930     {
       
 21931         symbol_c *last_type_symbol = NULL;
       
 21932 
       
 21933         {
       
 21934             symbol_c *IN_type_symbol = param_data_type;
       
 21935             last_type_symbol = param_data_type;
       
 21936             
       
 21937             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21938             {
       
 21939         
       
 21940                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21941                 return return_type_symbol;
       
 21942                 
       
 21943             }
       
 21944             
       
 21945             
       
 21946             ERROR;
       
 21947         }
       
 21948         
       
 21949     }/*function_lword_to_byte*/
       
 21950     break;
       
 21951 
       
 21952 /****
       
 21953  *LWORD_TO_USINT
       
 21954  */
       
 21955     case function_lword_to_usint :
       
 21956     {
       
 21957         symbol_c *last_type_symbol = NULL;
       
 21958 
       
 21959         {
       
 21960             symbol_c *IN_type_symbol = param_data_type;
       
 21961             last_type_symbol = param_data_type;
       
 21962             
       
 21963             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21964             {
       
 21965         
       
 21966                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21967                 return return_type_symbol;
       
 21968                 
       
 21969             }
       
 21970             
       
 21971             
       
 21972             ERROR;
       
 21973         }
       
 21974         
       
 21975     }/*function_lword_to_usint*/
       
 21976     break;
       
 21977 
       
 21978 /****
       
 21979  *LWORD_TO_ULINT
       
 21980  */
       
 21981     case function_lword_to_ulint :
       
 21982     {
       
 21983         symbol_c *last_type_symbol = NULL;
       
 21984 
       
 21985         {
       
 21986             symbol_c *IN_type_symbol = param_data_type;
       
 21987             last_type_symbol = param_data_type;
       
 21988             
       
 21989             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 21990             {
       
 21991         
       
 21992                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21993                 return return_type_symbol;
       
 21994                 
       
 21995             }
       
 21996             
       
 21997             
       
 21998             ERROR;
       
 21999         }
       
 22000         
       
 22001     }/*function_lword_to_ulint*/
       
 22002     break;
       
 22003 
       
 22004 /****
       
 22005  *LWORD_TO_BOOL
       
 22006  */
       
 22007     case function_lword_to_bool :
       
 22008     {
       
 22009         symbol_c *last_type_symbol = NULL;
       
 22010 
       
 22011         {
       
 22012             symbol_c *IN_type_symbol = param_data_type;
       
 22013             last_type_symbol = param_data_type;
       
 22014             
       
 22015             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 22016             {
       
 22017         
       
 22018                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22019                 return return_type_symbol;
       
 22020                 
       
 22021             }
       
 22022             
       
 22023             
       
 22024             ERROR;
       
 22025         }
       
 22026         
       
 22027     }/*function_lword_to_bool*/
       
 22028     break;
       
 22029 
       
 22030 /****
       
 22031  *LWORD_TO_TIME
       
 22032  */
       
 22033     case function_lword_to_time :
       
 22034     {
       
 22035         symbol_c *last_type_symbol = NULL;
       
 22036 
       
 22037         {
       
 22038             symbol_c *IN_type_symbol = param_data_type;
       
 22039             last_type_symbol = param_data_type;
       
 22040             
       
 22041             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 22042             {
       
 22043         
       
 22044                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22045                 return return_type_symbol;
       
 22046                 
       
 22047             }
       
 22048             
       
 22049             
       
 22050             ERROR;
       
 22051         }
       
 22052         
       
 22053     }/*function_lword_to_time*/
       
 22054     break;
       
 22055 
       
 22056 /****
       
 22057  *LWORD_TO_INT
       
 22058  */
       
 22059     case function_lword_to_int :
       
 22060     {
       
 22061         symbol_c *last_type_symbol = NULL;
       
 22062 
       
 22063         {
       
 22064             symbol_c *IN_type_symbol = param_data_type;
       
 22065             last_type_symbol = param_data_type;
       
 22066             
       
 22067             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 22068             {
       
 22069         
       
 22070                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22071                 return return_type_symbol;
       
 22072                 
       
 22073             }
       
 22074             
       
 22075             
       
 22076             ERROR;
       
 22077         }
       
 22078         
       
 22079     }/*function_lword_to_int*/
       
 22080     break;
       
 22081 
       
 22082 /****
       
 22083  *UINT_TO_REAL
       
 22084  */
       
 22085     case function_uint_to_real :
       
 22086     {
       
 22087         symbol_c *last_type_symbol = NULL;
       
 22088 
       
 22089         {
       
 22090             symbol_c *IN_type_symbol = param_data_type;
       
 22091             last_type_symbol = param_data_type;
       
 22092             
       
 22093             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22094             {
       
 22095         
       
 22096                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22097                 return return_type_symbol;
       
 22098                 
       
 22099             }
       
 22100             
       
 22101             
       
 22102             ERROR;
       
 22103         }
       
 22104         
       
 22105     }/*function_uint_to_real*/
       
 22106     break;
       
 22107 
       
 22108 /****
       
 22109  *UINT_TO_SINT
       
 22110  */
       
 22111     case function_uint_to_sint :
       
 22112     {
       
 22113         symbol_c *last_type_symbol = NULL;
       
 22114 
       
 22115         {
       
 22116             symbol_c *IN_type_symbol = param_data_type;
       
 22117             last_type_symbol = param_data_type;
       
 22118             
       
 22119             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22120             {
       
 22121         
       
 22122                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22123                 return return_type_symbol;
       
 22124                 
       
 22125             }
       
 22126             
       
 22127             
       
 22128             ERROR;
       
 22129         }
       
 22130         
       
 22131     }/*function_uint_to_sint*/
       
 22132     break;
       
 22133 
       
 22134 /****
       
 22135  *UINT_TO_LINT
       
 22136  */
       
 22137     case function_uint_to_lint :
       
 22138     {
       
 22139         symbol_c *last_type_symbol = NULL;
       
 22140 
       
 22141         {
       
 22142             symbol_c *IN_type_symbol = param_data_type;
       
 22143             last_type_symbol = param_data_type;
       
 22144             
       
 22145             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22146             {
       
 22147         
       
 22148                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22149                 return return_type_symbol;
       
 22150                 
       
 22151             }
       
 22152             
       
 22153             
       
 22154             ERROR;
       
 22155         }
       
 22156         
       
 22157     }/*function_uint_to_lint*/
       
 22158     break;
       
 22159 
       
 22160 /****
       
 22161  *UINT_TO_DINT
       
 22162  */
       
 22163     case function_uint_to_dint :
       
 22164     {
       
 22165         symbol_c *last_type_symbol = NULL;
       
 22166 
       
 22167         {
       
 22168             symbol_c *IN_type_symbol = param_data_type;
       
 22169             last_type_symbol = param_data_type;
       
 22170             
       
 22171             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22172             {
       
 22173         
       
 22174                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22175                 return return_type_symbol;
       
 22176                 
       
 22177             }
       
 22178             
       
 22179             
       
 22180             ERROR;
       
 22181         }
       
 22182         
       
 22183     }/*function_uint_to_dint*/
       
 22184     break;
       
 22185 
       
 22186 /****
       
 22187  *UINT_TO_DATE
       
 22188  */
       
 22189     case function_uint_to_date :
       
 22190     {
       
 22191         symbol_c *last_type_symbol = NULL;
       
 22192 
       
 22193         {
       
 22194             symbol_c *IN_type_symbol = param_data_type;
       
 22195             last_type_symbol = param_data_type;
       
 22196             
       
 22197             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22198             {
       
 22199         
       
 22200                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22201                 return return_type_symbol;
       
 22202                 
       
 22203             }
       
 22204             
       
 22205             
       
 22206             ERROR;
       
 22207         }
       
 22208         
       
 22209     }/*function_uint_to_date*/
       
 22210     break;
       
 22211 
       
 22212 /****
       
 22213  *UINT_TO_DWORD
       
 22214  */
       
 22215     case function_uint_to_dword :
       
 22216     {
       
 22217         symbol_c *last_type_symbol = NULL;
       
 22218 
       
 22219         {
       
 22220             symbol_c *IN_type_symbol = param_data_type;
       
 22221             last_type_symbol = param_data_type;
       
 22222             
       
 22223             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22224             {
       
 22225         
       
 22226                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22227                 return return_type_symbol;
       
 22228                 
       
 22229             }
       
 22230             
       
 22231             
       
 22232             ERROR;
       
 22233         }
       
 22234         
       
 22235     }/*function_uint_to_dword*/
       
 22236     break;
       
 22237 
       
 22238 /****
       
 22239  *UINT_TO_DT
       
 22240  */
       
 22241     case function_uint_to_dt :
       
 22242     {
       
 22243         symbol_c *last_type_symbol = NULL;
       
 22244 
       
 22245         {
       
 22246             symbol_c *IN_type_symbol = param_data_type;
       
 22247             last_type_symbol = param_data_type;
       
 22248             
       
 22249             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22250             {
       
 22251         
       
 22252                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22253                 return return_type_symbol;
       
 22254                 
       
 22255             }
       
 22256             
       
 22257             
       
 22258             ERROR;
       
 22259         }
       
 22260         
       
 22261     }/*function_uint_to_dt*/
       
 22262     break;
       
 22263 
       
 22264 /****
       
 22265  *UINT_TO_TOD
       
 22266  */
       
 22267     case function_uint_to_tod :
       
 22268     {
       
 22269         symbol_c *last_type_symbol = NULL;
       
 22270 
       
 22271         {
       
 22272             symbol_c *IN_type_symbol = param_data_type;
       
 22273             last_type_symbol = param_data_type;
       
 22274             
       
 22275             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22276             {
       
 22277         
       
 22278                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22279                 return return_type_symbol;
       
 22280                 
       
 22281             }
       
 22282             
       
 22283             
       
 22284             ERROR;
       
 22285         }
       
 22286         
       
 22287     }/*function_uint_to_tod*/
       
 22288     break;
       
 22289 
       
 22290 /****
       
 22291  *UINT_TO_UDINT
       
 22292  */
       
 22293     case function_uint_to_udint :
       
 22294     {
       
 22295         symbol_c *last_type_symbol = NULL;
       
 22296 
       
 22297         {
       
 22298             symbol_c *IN_type_symbol = param_data_type;
       
 22299             last_type_symbol = param_data_type;
       
 22300             
       
 22301             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22302             {
       
 22303         
       
 22304                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22305                 return return_type_symbol;
       
 22306                 
       
 22307             }
       
 22308             
       
 22309             
       
 22310             ERROR;
       
 22311         }
       
 22312         
       
 22313     }/*function_uint_to_udint*/
       
 22314     break;
       
 22315 
       
 22316 /****
       
 22317  *UINT_TO_WORD
       
 22318  */
       
 22319     case function_uint_to_word :
       
 22320     {
       
 22321         symbol_c *last_type_symbol = NULL;
       
 22322 
       
 22323         {
       
 22324             symbol_c *IN_type_symbol = param_data_type;
       
 22325             last_type_symbol = param_data_type;
       
 22326             
       
 22327             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22328             {
       
 22329         
       
 22330                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22331                 return return_type_symbol;
       
 22332                 
       
 22333             }
       
 22334             
       
 22335             
       
 22336             ERROR;
       
 22337         }
       
 22338         
       
 22339     }/*function_uint_to_word*/
       
 22340     break;
       
 22341 
       
 22342 /****
       
 22343  *UINT_TO_STRING
       
 22344  */
       
 22345     case function_uint_to_string :
       
 22346     {
       
 22347         symbol_c *last_type_symbol = NULL;
       
 22348 
       
 22349         {
       
 22350             symbol_c *IN_type_symbol = param_data_type;
       
 22351             last_type_symbol = param_data_type;
       
 22352             
       
 22353             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22354             {
       
 22355         
       
 22356                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22357                 return return_type_symbol;
       
 22358                 
       
 22359             }
       
 22360             
       
 22361             
       
 22362             ERROR;
       
 22363         }
       
 22364         
       
 22365     }/*function_uint_to_string*/
       
 22366     break;
       
 22367 
       
 22368 /****
       
 22369  *UINT_TO_LWORD
       
 22370  */
       
 22371     case function_uint_to_lword :
       
 22372     {
       
 22373         symbol_c *last_type_symbol = NULL;
       
 22374 
       
 22375         {
       
 22376             symbol_c *IN_type_symbol = param_data_type;
       
 22377             last_type_symbol = param_data_type;
       
 22378             
       
 22379             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22380             {
       
 22381         
       
 22382                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22383                 return return_type_symbol;
       
 22384                 
       
 22385             }
       
 22386             
       
 22387             
       
 22388             ERROR;
       
 22389         }
       
 22390         
       
 22391     }/*function_uint_to_lword*/
       
 22392     break;
       
 22393 
       
 22394 /****
       
 22395  *UINT_TO_LREAL
       
 22396  */
       
 22397     case function_uint_to_lreal :
       
 22398     {
       
 22399         symbol_c *last_type_symbol = NULL;
       
 22400 
       
 22401         {
       
 22402             symbol_c *IN_type_symbol = param_data_type;
       
 22403             last_type_symbol = param_data_type;
       
 22404             
       
 22405             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22406             {
       
 22407         
       
 22408                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22409                 return return_type_symbol;
       
 22410                 
       
 22411             }
       
 22412             
       
 22413             
       
 22414             ERROR;
       
 22415         }
       
 22416         
       
 22417     }/*function_uint_to_lreal*/
       
 22418     break;
       
 22419 
       
 22420 /****
       
 22421  *UINT_TO_BYTE
       
 22422  */
       
 22423     case function_uint_to_byte :
       
 22424     {
       
 22425         symbol_c *last_type_symbol = NULL;
       
 22426 
       
 22427         {
       
 22428             symbol_c *IN_type_symbol = param_data_type;
       
 22429             last_type_symbol = param_data_type;
       
 22430             
       
 22431             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22432             {
       
 22433         
       
 22434                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22435                 return return_type_symbol;
       
 22436                 
       
 22437             }
       
 22438             
       
 22439             
       
 22440             ERROR;
       
 22441         }
       
 22442         
       
 22443     }/*function_uint_to_byte*/
       
 22444     break;
       
 22445 
       
 22446 /****
       
 22447  *UINT_TO_USINT
       
 22448  */
       
 22449     case function_uint_to_usint :
       
 22450     {
       
 22451         symbol_c *last_type_symbol = NULL;
       
 22452 
       
 22453         {
       
 22454             symbol_c *IN_type_symbol = param_data_type;
       
 22455             last_type_symbol = param_data_type;
       
 22456             
       
 22457             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22458             {
       
 22459         
       
 22460                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22461                 return return_type_symbol;
       
 22462                 
       
 22463             }
       
 22464             
       
 22465             
       
 22466             ERROR;
       
 22467         }
       
 22468         
       
 22469     }/*function_uint_to_usint*/
       
 22470     break;
       
 22471 
       
 22472 /****
       
 22473  *UINT_TO_ULINT
       
 22474  */
       
 22475     case function_uint_to_ulint :
       
 22476     {
       
 22477         symbol_c *last_type_symbol = NULL;
       
 22478 
       
 22479         {
       
 22480             symbol_c *IN_type_symbol = param_data_type;
       
 22481             last_type_symbol = param_data_type;
       
 22482             
       
 22483             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22484             {
       
 22485         
       
 22486                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22487                 return return_type_symbol;
       
 22488                 
       
 22489             }
       
 22490             
       
 22491             
       
 22492             ERROR;
       
 22493         }
       
 22494         
       
 22495     }/*function_uint_to_ulint*/
       
 22496     break;
       
 22497 
       
 22498 /****
       
 22499  *UINT_TO_BOOL
       
 22500  */
       
 22501     case function_uint_to_bool :
       
 22502     {
       
 22503         symbol_c *last_type_symbol = NULL;
       
 22504 
       
 22505         {
       
 22506             symbol_c *IN_type_symbol = param_data_type;
       
 22507             last_type_symbol = param_data_type;
       
 22508             
       
 22509             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22510             {
       
 22511         
       
 22512                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22513                 return return_type_symbol;
       
 22514                 
       
 22515             }
       
 22516             
       
 22517             
       
 22518             ERROR;
       
 22519         }
       
 22520         
       
 22521     }/*function_uint_to_bool*/
       
 22522     break;
       
 22523 
       
 22524 /****
       
 22525  *UINT_TO_TIME
       
 22526  */
       
 22527     case function_uint_to_time :
       
 22528     {
       
 22529         symbol_c *last_type_symbol = NULL;
       
 22530 
       
 22531         {
       
 22532             symbol_c *IN_type_symbol = param_data_type;
       
 22533             last_type_symbol = param_data_type;
       
 22534             
       
 22535             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22536             {
       
 22537         
       
 22538                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22539                 return return_type_symbol;
       
 22540                 
       
 22541             }
       
 22542             
       
 22543             
       
 22544             ERROR;
       
 22545         }
       
 22546         
       
 22547     }/*function_uint_to_time*/
       
 22548     break;
       
 22549 
       
 22550 /****
       
 22551  *UINT_TO_INT
       
 22552  */
       
 22553     case function_uint_to_int :
       
 22554     {
       
 22555         symbol_c *last_type_symbol = NULL;
       
 22556 
       
 22557         {
       
 22558             symbol_c *IN_type_symbol = param_data_type;
       
 22559             last_type_symbol = param_data_type;
       
 22560             
       
 22561             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 22562             {
       
 22563         
       
 22564                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22565                 return return_type_symbol;
       
 22566                 
       
 22567             }
       
 22568             
       
 22569             
       
 22570             ERROR;
       
 22571         }
       
 22572         
       
 22573     }/*function_uint_to_int*/
       
 22574     break;
       
 22575 
       
 22576 /****
       
 22577  *LREAL_TO_REAL
       
 22578  */
       
 22579     case function_lreal_to_real :
       
 22580     {
       
 22581         symbol_c *last_type_symbol = NULL;
       
 22582 
       
 22583         {
       
 22584             symbol_c *IN_type_symbol = param_data_type;
       
 22585             last_type_symbol = param_data_type;
       
 22586             
       
 22587             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22588             {
       
 22589         
       
 22590                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22591                 return return_type_symbol;
       
 22592                 
       
 22593             }
       
 22594             
       
 22595             
       
 22596             ERROR;
       
 22597         }
       
 22598         
       
 22599     }/*function_lreal_to_real*/
       
 22600     break;
       
 22601 
       
 22602 /****
       
 22603  *LREAL_TO_SINT
       
 22604  */
       
 22605     case function_lreal_to_sint :
       
 22606     {
       
 22607         symbol_c *last_type_symbol = NULL;
       
 22608 
       
 22609         {
       
 22610             symbol_c *IN_type_symbol = param_data_type;
       
 22611             last_type_symbol = param_data_type;
       
 22612             
       
 22613             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22614             {
       
 22615         
       
 22616                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22617                 return return_type_symbol;
       
 22618                 
       
 22619             }
       
 22620             
       
 22621             
       
 22622             ERROR;
       
 22623         }
       
 22624         
       
 22625     }/*function_lreal_to_sint*/
       
 22626     break;
       
 22627 
       
 22628 /****
       
 22629  *LREAL_TO_LINT
       
 22630  */
       
 22631     case function_lreal_to_lint :
       
 22632     {
       
 22633         symbol_c *last_type_symbol = NULL;
       
 22634 
       
 22635         {
       
 22636             symbol_c *IN_type_symbol = param_data_type;
       
 22637             last_type_symbol = param_data_type;
       
 22638             
       
 22639             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22640             {
       
 22641         
       
 22642                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22643                 return return_type_symbol;
       
 22644                 
       
 22645             }
       
 22646             
       
 22647             
       
 22648             ERROR;
       
 22649         }
       
 22650         
       
 22651     }/*function_lreal_to_lint*/
       
 22652     break;
       
 22653 
       
 22654 /****
       
 22655  *LREAL_TO_DINT
       
 22656  */
       
 22657     case function_lreal_to_dint :
       
 22658     {
       
 22659         symbol_c *last_type_symbol = NULL;
       
 22660 
       
 22661         {
       
 22662             symbol_c *IN_type_symbol = param_data_type;
       
 22663             last_type_symbol = param_data_type;
       
 22664             
       
 22665             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22666             {
       
 22667         
       
 22668                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22669                 return return_type_symbol;
       
 22670                 
       
 22671             }
       
 22672             
       
 22673             
       
 22674             ERROR;
       
 22675         }
       
 22676         
       
 22677     }/*function_lreal_to_dint*/
       
 22678     break;
       
 22679 
       
 22680 /****
       
 22681  *LREAL_TO_DATE
       
 22682  */
       
 22683     case function_lreal_to_date :
       
 22684     {
       
 22685         symbol_c *last_type_symbol = NULL;
       
 22686 
       
 22687         {
       
 22688             symbol_c *IN_type_symbol = param_data_type;
       
 22689             last_type_symbol = param_data_type;
       
 22690             
       
 22691             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22692             {
       
 22693         
       
 22694                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22695                 return return_type_symbol;
       
 22696                 
       
 22697             }
       
 22698             
       
 22699             
       
 22700             ERROR;
       
 22701         }
       
 22702         
       
 22703     }/*function_lreal_to_date*/
       
 22704     break;
       
 22705 
       
 22706 /****
       
 22707  *LREAL_TO_DWORD
       
 22708  */
       
 22709     case function_lreal_to_dword :
       
 22710     {
       
 22711         symbol_c *last_type_symbol = NULL;
       
 22712 
       
 22713         {
       
 22714             symbol_c *IN_type_symbol = param_data_type;
       
 22715             last_type_symbol = param_data_type;
       
 22716             
       
 22717             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22718             {
       
 22719         
       
 22720                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22721                 return return_type_symbol;
       
 22722                 
       
 22723             }
       
 22724             
       
 22725             
       
 22726             ERROR;
       
 22727         }
       
 22728         
       
 22729     }/*function_lreal_to_dword*/
       
 22730     break;
       
 22731 
       
 22732 /****
       
 22733  *LREAL_TO_DT
       
 22734  */
       
 22735     case function_lreal_to_dt :
       
 22736     {
       
 22737         symbol_c *last_type_symbol = NULL;
       
 22738 
       
 22739         {
       
 22740             symbol_c *IN_type_symbol = param_data_type;
       
 22741             last_type_symbol = param_data_type;
       
 22742             
       
 22743             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22744             {
       
 22745         
       
 22746                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22747                 return return_type_symbol;
       
 22748                 
       
 22749             }
       
 22750             
       
 22751             
       
 22752             ERROR;
       
 22753         }
       
 22754         
       
 22755     }/*function_lreal_to_dt*/
       
 22756     break;
       
 22757 
       
 22758 /****
       
 22759  *LREAL_TO_TOD
       
 22760  */
       
 22761     case function_lreal_to_tod :
       
 22762     {
       
 22763         symbol_c *last_type_symbol = NULL;
       
 22764 
       
 22765         {
       
 22766             symbol_c *IN_type_symbol = param_data_type;
       
 22767             last_type_symbol = param_data_type;
       
 22768             
       
 22769             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22770             {
       
 22771         
       
 22772                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22773                 return return_type_symbol;
       
 22774                 
       
 22775             }
       
 22776             
       
 22777             
       
 22778             ERROR;
       
 22779         }
       
 22780         
       
 22781     }/*function_lreal_to_tod*/
       
 22782     break;
       
 22783 
       
 22784 /****
       
 22785  *LREAL_TO_UDINT
       
 22786  */
       
 22787     case function_lreal_to_udint :
       
 22788     {
       
 22789         symbol_c *last_type_symbol = NULL;
       
 22790 
       
 22791         {
       
 22792             symbol_c *IN_type_symbol = param_data_type;
       
 22793             last_type_symbol = param_data_type;
       
 22794             
       
 22795             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22796             {
       
 22797         
       
 22798                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22799                 return return_type_symbol;
       
 22800                 
       
 22801             }
       
 22802             
       
 22803             
       
 22804             ERROR;
       
 22805         }
       
 22806         
       
 22807     }/*function_lreal_to_udint*/
       
 22808     break;
       
 22809 
       
 22810 /****
       
 22811  *LREAL_TO_WORD
       
 22812  */
       
 22813     case function_lreal_to_word :
       
 22814     {
       
 22815         symbol_c *last_type_symbol = NULL;
       
 22816 
       
 22817         {
       
 22818             symbol_c *IN_type_symbol = param_data_type;
       
 22819             last_type_symbol = param_data_type;
       
 22820             
       
 22821             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22822             {
       
 22823         
       
 22824                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22825                 return return_type_symbol;
       
 22826                 
       
 22827             }
       
 22828             
       
 22829             
       
 22830             ERROR;
       
 22831         }
       
 22832         
       
 22833     }/*function_lreal_to_word*/
       
 22834     break;
       
 22835 
       
 22836 /****
       
 22837  *LREAL_TO_STRING
       
 22838  */
       
 22839     case function_lreal_to_string :
       
 22840     {
       
 22841         symbol_c *last_type_symbol = NULL;
       
 22842 
       
 22843         {
       
 22844             symbol_c *IN_type_symbol = param_data_type;
       
 22845             last_type_symbol = param_data_type;
       
 22846             
       
 22847             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22848             {
       
 22849         
       
 22850                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22851                 return return_type_symbol;
       
 22852                 
       
 22853             }
       
 22854             
       
 22855             
       
 22856             ERROR;
       
 22857         }
       
 22858         
       
 22859     }/*function_lreal_to_string*/
       
 22860     break;
       
 22861 
       
 22862 /****
       
 22863  *LREAL_TO_LWORD
       
 22864  */
       
 22865     case function_lreal_to_lword :
       
 22866     {
       
 22867         symbol_c *last_type_symbol = NULL;
       
 22868 
       
 22869         {
       
 22870             symbol_c *IN_type_symbol = param_data_type;
       
 22871             last_type_symbol = param_data_type;
       
 22872             
       
 22873             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22874             {
       
 22875         
       
 22876                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22877                 return return_type_symbol;
       
 22878                 
       
 22879             }
       
 22880             
       
 22881             
       
 22882             ERROR;
       
 22883         }
       
 22884         
       
 22885     }/*function_lreal_to_lword*/
       
 22886     break;
       
 22887 
       
 22888 /****
       
 22889  *LREAL_TO_UINT
       
 22890  */
       
 22891     case function_lreal_to_uint :
       
 22892     {
       
 22893         symbol_c *last_type_symbol = NULL;
       
 22894 
       
 22895         {
       
 22896             symbol_c *IN_type_symbol = param_data_type;
       
 22897             last_type_symbol = param_data_type;
       
 22898             
       
 22899             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22900             {
       
 22901         
       
 22902                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22903                 return return_type_symbol;
       
 22904                 
       
 22905             }
       
 22906             
       
 22907             
       
 22908             ERROR;
       
 22909         }
       
 22910         
       
 22911     }/*function_lreal_to_uint*/
       
 22912     break;
       
 22913 
       
 22914 /****
       
 22915  *LREAL_TO_BYTE
       
 22916  */
       
 22917     case function_lreal_to_byte :
       
 22918     {
       
 22919         symbol_c *last_type_symbol = NULL;
       
 22920 
       
 22921         {
       
 22922             symbol_c *IN_type_symbol = param_data_type;
       
 22923             last_type_symbol = param_data_type;
       
 22924             
       
 22925             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22926             {
       
 22927         
       
 22928                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22929                 return return_type_symbol;
       
 22930                 
       
 22931             }
       
 22932             
       
 22933             
       
 22934             ERROR;
       
 22935         }
       
 22936         
       
 22937     }/*function_lreal_to_byte*/
       
 22938     break;
       
 22939 
       
 22940 /****
       
 22941  *LREAL_TO_USINT
       
 22942  */
       
 22943     case function_lreal_to_usint :
       
 22944     {
       
 22945         symbol_c *last_type_symbol = NULL;
       
 22946 
       
 22947         {
       
 22948             symbol_c *IN_type_symbol = param_data_type;
       
 22949             last_type_symbol = param_data_type;
       
 22950             
       
 22951             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22952             {
       
 22953         
       
 22954                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22955                 return return_type_symbol;
       
 22956                 
       
 22957             }
       
 22958             
       
 22959             
       
 22960             ERROR;
       
 22961         }
       
 22962         
       
 22963     }/*function_lreal_to_usint*/
       
 22964     break;
       
 22965 
       
 22966 /****
       
 22967  *LREAL_TO_ULINT
       
 22968  */
       
 22969     case function_lreal_to_ulint :
       
 22970     {
       
 22971         symbol_c *last_type_symbol = NULL;
       
 22972 
       
 22973         {
       
 22974             symbol_c *IN_type_symbol = param_data_type;
       
 22975             last_type_symbol = param_data_type;
       
 22976             
       
 22977             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 22978             {
       
 22979         
       
 22980                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22981                 return return_type_symbol;
       
 22982                 
       
 22983             }
       
 22984             
       
 22985             
       
 22986             ERROR;
       
 22987         }
       
 22988         
       
 22989     }/*function_lreal_to_ulint*/
       
 22990     break;
       
 22991 
       
 22992 /****
       
 22993  *LREAL_TO_BOOL
       
 22994  */
       
 22995     case function_lreal_to_bool :
       
 22996     {
       
 22997         symbol_c *last_type_symbol = NULL;
       
 22998 
       
 22999         {
       
 23000             symbol_c *IN_type_symbol = param_data_type;
       
 23001             last_type_symbol = param_data_type;
       
 23002             
       
 23003             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 23004             {
       
 23005         
       
 23006                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23007                 return return_type_symbol;
       
 23008                 
       
 23009             }
       
 23010             
       
 23011             
       
 23012             ERROR;
       
 23013         }
       
 23014         
       
 23015     }/*function_lreal_to_bool*/
       
 23016     break;
       
 23017 
       
 23018 /****
       
 23019  *LREAL_TO_TIME
       
 23020  */
       
 23021     case function_lreal_to_time :
       
 23022     {
       
 23023         symbol_c *last_type_symbol = NULL;
       
 23024 
       
 23025         {
       
 23026             symbol_c *IN_type_symbol = param_data_type;
       
 23027             last_type_symbol = param_data_type;
       
 23028             
       
 23029             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 23030             {
       
 23031         
       
 23032                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23033                 return return_type_symbol;
       
 23034                 
       
 23035             }
       
 23036             
       
 23037             
       
 23038             ERROR;
       
 23039         }
       
 23040         
       
 23041     }/*function_lreal_to_time*/
       
 23042     break;
       
 23043 
       
 23044 /****
       
 23045  *LREAL_TO_INT
       
 23046  */
       
 23047     case function_lreal_to_int :
       
 23048     {
       
 23049         symbol_c *last_type_symbol = NULL;
       
 23050 
       
 23051         {
       
 23052             symbol_c *IN_type_symbol = param_data_type;
       
 23053             last_type_symbol = param_data_type;
       
 23054             
       
 23055             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 23056             {
       
 23057         
       
 23058                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23059                 return return_type_symbol;
       
 23060                 
       
 23061             }
       
 23062             
       
 23063             
       
 23064             ERROR;
       
 23065         }
       
 23066         
       
 23067     }/*function_lreal_to_int*/
       
 23068     break;
       
 23069 
       
 23070 /****
       
 23071  *BYTE_TO_REAL
       
 23072  */
       
 23073     case function_byte_to_real :
       
 23074     {
       
 23075         symbol_c *last_type_symbol = NULL;
       
 23076 
       
 23077         {
       
 23078             symbol_c *IN_type_symbol = param_data_type;
       
 23079             last_type_symbol = param_data_type;
       
 23080             
       
 23081             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23082             {
       
 23083         
       
 23084                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23085                 return return_type_symbol;
       
 23086                 
       
 23087             }
       
 23088             
       
 23089             
       
 23090             ERROR;
       
 23091         }
       
 23092         
       
 23093     }/*function_byte_to_real*/
       
 23094     break;
       
 23095 
       
 23096 /****
       
 23097  *BYTE_TO_SINT
       
 23098  */
       
 23099     case function_byte_to_sint :
       
 23100     {
       
 23101         symbol_c *last_type_symbol = NULL;
       
 23102 
       
 23103         {
       
 23104             symbol_c *IN_type_symbol = param_data_type;
       
 23105             last_type_symbol = param_data_type;
       
 23106             
       
 23107             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23108             {
       
 23109         
       
 23110                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23111                 return return_type_symbol;
       
 23112                 
       
 23113             }
       
 23114             
       
 23115             
       
 23116             ERROR;
       
 23117         }
       
 23118         
       
 23119     }/*function_byte_to_sint*/
       
 23120     break;
       
 23121 
       
 23122 /****
       
 23123  *BYTE_TO_LINT
       
 23124  */
       
 23125     case function_byte_to_lint :
       
 23126     {
       
 23127         symbol_c *last_type_symbol = NULL;
       
 23128 
       
 23129         {
       
 23130             symbol_c *IN_type_symbol = param_data_type;
       
 23131             last_type_symbol = param_data_type;
       
 23132             
       
 23133             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23134             {
       
 23135         
       
 23136                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23137                 return return_type_symbol;
       
 23138                 
       
 23139             }
       
 23140             
       
 23141             
       
 23142             ERROR;
       
 23143         }
       
 23144         
       
 23145     }/*function_byte_to_lint*/
       
 23146     break;
       
 23147 
       
 23148 /****
       
 23149  *BYTE_TO_DINT
       
 23150  */
       
 23151     case function_byte_to_dint :
       
 23152     {
       
 23153         symbol_c *last_type_symbol = NULL;
       
 23154 
       
 23155         {
       
 23156             symbol_c *IN_type_symbol = param_data_type;
       
 23157             last_type_symbol = param_data_type;
       
 23158             
       
 23159             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23160             {
       
 23161         
       
 23162                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23163                 return return_type_symbol;
       
 23164                 
       
 23165             }
       
 23166             
       
 23167             
       
 23168             ERROR;
       
 23169         }
       
 23170         
       
 23171     }/*function_byte_to_dint*/
       
 23172     break;
       
 23173 
       
 23174 /****
       
 23175  *BYTE_TO_DATE
       
 23176  */
       
 23177     case function_byte_to_date :
       
 23178     {
       
 23179         symbol_c *last_type_symbol = NULL;
       
 23180 
       
 23181         {
       
 23182             symbol_c *IN_type_symbol = param_data_type;
       
 23183             last_type_symbol = param_data_type;
       
 23184             
       
 23185             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23186             {
       
 23187         
       
 23188                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23189                 return return_type_symbol;
       
 23190                 
       
 23191             }
       
 23192             
       
 23193             
       
 23194             ERROR;
       
 23195         }
       
 23196         
       
 23197     }/*function_byte_to_date*/
       
 23198     break;
       
 23199 
       
 23200 /****
       
 23201  *BYTE_TO_DWORD
       
 23202  */
       
 23203     case function_byte_to_dword :
       
 23204     {
       
 23205         symbol_c *last_type_symbol = NULL;
       
 23206 
       
 23207         {
       
 23208             symbol_c *IN_type_symbol = param_data_type;
       
 23209             last_type_symbol = param_data_type;
       
 23210             
       
 23211             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23212             {
       
 23213         
       
 23214                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 23215                 return return_type_symbol;
       
 23216                 
       
 23217             }
       
 23218             
       
 23219             
       
 23220             ERROR;
       
 23221         }
       
 23222         
       
 23223     }/*function_byte_to_dword*/
       
 23224     break;
       
 23225 
       
 23226 /****
       
 23227  *BYTE_TO_DT
       
 23228  */
       
 23229     case function_byte_to_dt :
       
 23230     {
       
 23231         symbol_c *last_type_symbol = NULL;
       
 23232 
       
 23233         {
       
 23234             symbol_c *IN_type_symbol = param_data_type;
       
 23235             last_type_symbol = param_data_type;
       
 23236             
       
 23237             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23238             {
       
 23239         
       
 23240                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23241                 return return_type_symbol;
       
 23242                 
       
 23243             }
       
 23244             
       
 23245             
       
 23246             ERROR;
       
 23247         }
       
 23248         
       
 23249     }/*function_byte_to_dt*/
       
 23250     break;
       
 23251 
       
 23252 /****
       
 23253  *BYTE_TO_TOD
       
 23254  */
       
 23255     case function_byte_to_tod :
       
 23256     {
       
 23257         symbol_c *last_type_symbol = NULL;
       
 23258 
       
 23259         {
       
 23260             symbol_c *IN_type_symbol = param_data_type;
       
 23261             last_type_symbol = param_data_type;
       
 23262             
       
 23263             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23264             {
       
 23265         
       
 23266                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23267                 return return_type_symbol;
       
 23268                 
       
 23269             }
       
 23270             
       
 23271             
       
 23272             ERROR;
       
 23273         }
       
 23274         
       
 23275     }/*function_byte_to_tod*/
       
 23276     break;
       
 23277 
       
 23278 /****
       
 23279  *BYTE_TO_UDINT
       
 23280  */
       
 23281     case function_byte_to_udint :
       
 23282     {
       
 23283         symbol_c *last_type_symbol = NULL;
       
 23284 
       
 23285         {
       
 23286             symbol_c *IN_type_symbol = param_data_type;
       
 23287             last_type_symbol = param_data_type;
       
 23288             
       
 23289             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23290             {
       
 23291         
       
 23292                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23293                 return return_type_symbol;
       
 23294                 
       
 23295             }
       
 23296             
       
 23297             
       
 23298             ERROR;
       
 23299         }
       
 23300         
       
 23301     }/*function_byte_to_udint*/
       
 23302     break;
       
 23303 
       
 23304 /****
       
 23305  *BYTE_TO_WORD
       
 23306  */
       
 23307     case function_byte_to_word :
       
 23308     {
       
 23309         symbol_c *last_type_symbol = NULL;
       
 23310 
       
 23311         {
       
 23312             symbol_c *IN_type_symbol = param_data_type;
       
 23313             last_type_symbol = param_data_type;
       
 23314             
       
 23315             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23316             {
       
 23317         
       
 23318                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23319                 return return_type_symbol;
       
 23320                 
       
 23321             }
       
 23322             
       
 23323             
       
 23324             ERROR;
       
 23325         }
       
 23326         
       
 23327     }/*function_byte_to_word*/
       
 23328     break;
       
 23329 
       
 23330 /****
       
 23331  *BYTE_TO_STRING
       
 23332  */
       
 23333     case function_byte_to_string :
       
 23334     {
       
 23335         symbol_c *last_type_symbol = NULL;
       
 23336 
       
 23337         {
       
 23338             symbol_c *IN_type_symbol = param_data_type;
       
 23339             last_type_symbol = param_data_type;
       
 23340             
       
 23341             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23342             {
       
 23343         
       
 23344                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23345                 return return_type_symbol;
       
 23346                 
       
 23347             }
       
 23348             
       
 23349             
       
 23350             ERROR;
       
 23351         }
       
 23352         
       
 23353     }/*function_byte_to_string*/
       
 23354     break;
       
 23355 
       
 23356 /****
       
 23357  *BYTE_TO_LWORD
       
 23358  */
       
 23359     case function_byte_to_lword :
       
 23360     {
       
 23361         symbol_c *last_type_symbol = NULL;
       
 23362 
       
 23363         {
       
 23364             symbol_c *IN_type_symbol = param_data_type;
       
 23365             last_type_symbol = param_data_type;
       
 23366             
       
 23367             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23368             {
       
 23369         
       
 23370                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23371                 return return_type_symbol;
       
 23372                 
       
 23373             }
       
 23374             
       
 23375             
       
 23376             ERROR;
       
 23377         }
       
 23378         
       
 23379     }/*function_byte_to_lword*/
       
 23380     break;
       
 23381 
       
 23382 /****
       
 23383  *BYTE_TO_UINT
       
 23384  */
       
 23385     case function_byte_to_uint :
       
 23386     {
       
 23387         symbol_c *last_type_symbol = NULL;
       
 23388 
       
 23389         {
       
 23390             symbol_c *IN_type_symbol = param_data_type;
       
 23391             last_type_symbol = param_data_type;
       
 23392             
       
 23393             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23394             {
       
 23395         
       
 23396                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23397                 return return_type_symbol;
       
 23398                 
       
 23399             }
       
 23400             
       
 23401             
       
 23402             ERROR;
       
 23403         }
       
 23404         
       
 23405     }/*function_byte_to_uint*/
       
 23406     break;
       
 23407 
       
 23408 /****
       
 23409  *BYTE_TO_LREAL
       
 23410  */
       
 23411     case function_byte_to_lreal :
       
 23412     {
       
 23413         symbol_c *last_type_symbol = NULL;
       
 23414 
       
 23415         {
       
 23416             symbol_c *IN_type_symbol = param_data_type;
       
 23417             last_type_symbol = param_data_type;
       
 23418             
       
 23419             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23420             {
       
 23421         
       
 23422                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23423                 return return_type_symbol;
       
 23424                 
       
 23425             }
       
 23426             
       
 23427             
       
 23428             ERROR;
       
 23429         }
       
 23430         
       
 23431     }/*function_byte_to_lreal*/
       
 23432     break;
       
 23433 
       
 23434 /****
       
 23435  *BYTE_TO_USINT
       
 23436  */
       
 23437     case function_byte_to_usint :
       
 23438     {
       
 23439         symbol_c *last_type_symbol = NULL;
       
 23440 
       
 23441         {
       
 23442             symbol_c *IN_type_symbol = param_data_type;
       
 23443             last_type_symbol = param_data_type;
       
 23444             
       
 23445             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23446             {
       
 23447         
       
 23448                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23449                 return return_type_symbol;
       
 23450                 
       
 23451             }
       
 23452             
       
 23453             
       
 23454             ERROR;
       
 23455         }
       
 23456         
       
 23457     }/*function_byte_to_usint*/
       
 23458     break;
       
 23459 
       
 23460 /****
       
 23461  *BYTE_TO_ULINT
       
 23462  */
       
 23463     case function_byte_to_ulint :
       
 23464     {
       
 23465         symbol_c *last_type_symbol = NULL;
       
 23466 
       
 23467         {
       
 23468             symbol_c *IN_type_symbol = param_data_type;
       
 23469             last_type_symbol = param_data_type;
       
 23470             
       
 23471             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23472             {
       
 23473         
       
 23474                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23475                 return return_type_symbol;
       
 23476                 
       
 23477             }
       
 23478             
       
 23479             
       
 23480             ERROR;
       
 23481         }
       
 23482         
       
 23483     }/*function_byte_to_ulint*/
       
 23484     break;
       
 23485 
       
 23486 /****
       
 23487  *BYTE_TO_BOOL
       
 23488  */
       
 23489     case function_byte_to_bool :
       
 23490     {
       
 23491         symbol_c *last_type_symbol = NULL;
       
 23492 
       
 23493         {
       
 23494             symbol_c *IN_type_symbol = param_data_type;
       
 23495             last_type_symbol = param_data_type;
       
 23496             
       
 23497             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23498             {
       
 23499         
       
 23500                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23501                 return return_type_symbol;
       
 23502                 
       
 23503             }
       
 23504             
       
 23505             
       
 23506             ERROR;
       
 23507         }
       
 23508         
       
 23509     }/*function_byte_to_bool*/
       
 23510     break;
       
 23511 
       
 23512 /****
       
 23513  *BYTE_TO_TIME
       
 23514  */
       
 23515     case function_byte_to_time :
       
 23516     {
       
 23517         symbol_c *last_type_symbol = NULL;
       
 23518 
       
 23519         {
       
 23520             symbol_c *IN_type_symbol = param_data_type;
       
 23521             last_type_symbol = param_data_type;
       
 23522             
       
 23523             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23524             {
       
 23525         
       
 23526                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23527                 return return_type_symbol;
       
 23528                 
       
 23529             }
       
 23530             
       
 23531             
       
 23532             ERROR;
       
 23533         }
       
 23534         
       
 23535     }/*function_byte_to_time*/
       
 23536     break;
       
 23537 
       
 23538 /****
       
 23539  *BYTE_TO_INT
       
 23540  */
       
 23541     case function_byte_to_int :
       
 23542     {
       
 23543         symbol_c *last_type_symbol = NULL;
       
 23544 
       
 23545         {
       
 23546             symbol_c *IN_type_symbol = param_data_type;
       
 23547             last_type_symbol = param_data_type;
       
 23548             
       
 23549             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23550             {
       
 23551         
       
 23552                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23553                 return return_type_symbol;
       
 23554                 
       
 23555             }
       
 23556             
       
 23557             
       
 23558             ERROR;
       
 23559         }
       
 23560         
       
 23561     }/*function_byte_to_int*/
       
 23562     break;
       
 23563 
       
 23564 /****
       
 23565  *USINT_TO_REAL
       
 23566  */
       
 23567     case function_usint_to_real :
       
 23568     {
       
 23569         symbol_c *last_type_symbol = NULL;
       
 23570 
       
 23571         {
       
 23572             symbol_c *IN_type_symbol = param_data_type;
       
 23573             last_type_symbol = param_data_type;
       
 23574             
       
 23575             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23576             {
       
 23577         
       
 23578                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23579                 return return_type_symbol;
       
 23580                 
       
 23581             }
       
 23582             
       
 23583             
       
 23584             ERROR;
       
 23585         }
       
 23586         
       
 23587     }/*function_usint_to_real*/
       
 23588     break;
       
 23589 
       
 23590 /****
       
 23591  *USINT_TO_SINT
       
 23592  */
       
 23593     case function_usint_to_sint :
       
 23594     {
       
 23595         symbol_c *last_type_symbol = NULL;
       
 23596 
       
 23597         {
       
 23598             symbol_c *IN_type_symbol = param_data_type;
       
 23599             last_type_symbol = param_data_type;
       
 23600             
       
 23601             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23602             {
       
 23603         
       
 23604                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23605                 return return_type_symbol;
       
 23606                 
       
 23607             }
       
 23608             
       
 23609             
       
 23610             ERROR;
       
 23611         }
       
 23612         
       
 23613     }/*function_usint_to_sint*/
       
 23614     break;
       
 23615 
       
 23616 /****
       
 23617  *USINT_TO_LINT
       
 23618  */
       
 23619     case function_usint_to_lint :
       
 23620     {
       
 23621         symbol_c *last_type_symbol = NULL;
       
 23622 
       
 23623         {
       
 23624             symbol_c *IN_type_symbol = param_data_type;
       
 23625             last_type_symbol = param_data_type;
       
 23626             
       
 23627             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23628             {
       
 23629         
       
 23630                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23631                 return return_type_symbol;
       
 23632                 
       
 23633             }
       
 23634             
       
 23635             
       
 23636             ERROR;
       
 23637         }
       
 23638         
       
 23639     }/*function_usint_to_lint*/
       
 23640     break;
       
 23641 
       
 23642 /****
       
 23643  *USINT_TO_DINT
       
 23644  */
       
 23645     case function_usint_to_dint :
       
 23646     {
       
 23647         symbol_c *last_type_symbol = NULL;
       
 23648 
       
 23649         {
       
 23650             symbol_c *IN_type_symbol = param_data_type;
       
 23651             last_type_symbol = param_data_type;
       
 23652             
       
 23653             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23654             {
       
 23655         
       
 23656                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23657                 return return_type_symbol;
       
 23658                 
       
 23659             }
       
 23660             
       
 23661             
       
 23662             ERROR;
       
 23663         }
       
 23664         
       
 23665     }/*function_usint_to_dint*/
       
 23666     break;
       
 23667 
       
 23668 /****
       
 23669  *USINT_TO_DATE
       
 23670  */
       
 23671     case function_usint_to_date :
       
 23672     {
       
 23673         symbol_c *last_type_symbol = NULL;
       
 23674 
       
 23675         {
       
 23676             symbol_c *IN_type_symbol = param_data_type;
       
 23677             last_type_symbol = param_data_type;
       
 23678             
       
 23679             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23680             {
       
 23681         
       
 23682                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23683                 return return_type_symbol;
       
 23684                 
       
 23685             }
       
 23686             
       
 23687             
       
 23688             ERROR;
       
 23689         }
       
 23690         
       
 23691     }/*function_usint_to_date*/
       
 23692     break;
       
 23693 
       
 23694 /****
       
 23695  *USINT_TO_DWORD
       
 23696  */
       
 23697     case function_usint_to_dword :
       
 23698     {
       
 23699         symbol_c *last_type_symbol = NULL;
       
 23700 
       
 23701         {
       
 23702             symbol_c *IN_type_symbol = param_data_type;
       
 23703             last_type_symbol = param_data_type;
       
 23704             
       
 23705             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23706             {
       
 23707         
       
 23708                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 23709                 return return_type_symbol;
       
 23710                 
       
 23711             }
       
 23712             
       
 23713             
       
 23714             ERROR;
       
 23715         }
       
 23716         
       
 23717     }/*function_usint_to_dword*/
       
 23718     break;
       
 23719 
       
 23720 /****
       
 23721  *USINT_TO_DT
       
 23722  */
       
 23723     case function_usint_to_dt :
       
 23724     {
       
 23725         symbol_c *last_type_symbol = NULL;
       
 23726 
       
 23727         {
       
 23728             symbol_c *IN_type_symbol = param_data_type;
       
 23729             last_type_symbol = param_data_type;
       
 23730             
       
 23731             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23732             {
       
 23733         
       
 23734                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23735                 return return_type_symbol;
       
 23736                 
       
 23737             }
       
 23738             
       
 23739             
       
 23740             ERROR;
       
 23741         }
       
 23742         
       
 23743     }/*function_usint_to_dt*/
       
 23744     break;
       
 23745 
       
 23746 /****
       
 23747  *USINT_TO_TOD
       
 23748  */
       
 23749     case function_usint_to_tod :
       
 23750     {
       
 23751         symbol_c *last_type_symbol = NULL;
       
 23752 
       
 23753         {
       
 23754             symbol_c *IN_type_symbol = param_data_type;
       
 23755             last_type_symbol = param_data_type;
       
 23756             
       
 23757             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23758             {
       
 23759         
       
 23760                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23761                 return return_type_symbol;
       
 23762                 
       
 23763             }
       
 23764             
       
 23765             
       
 23766             ERROR;
       
 23767         }
       
 23768         
       
 23769     }/*function_usint_to_tod*/
       
 23770     break;
       
 23771 
       
 23772 /****
       
 23773  *USINT_TO_UDINT
       
 23774  */
       
 23775     case function_usint_to_udint :
       
 23776     {
       
 23777         symbol_c *last_type_symbol = NULL;
       
 23778 
       
 23779         {
       
 23780             symbol_c *IN_type_symbol = param_data_type;
       
 23781             last_type_symbol = param_data_type;
       
 23782             
       
 23783             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23784             {
       
 23785         
       
 23786                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23787                 return return_type_symbol;
       
 23788                 
       
 23789             }
       
 23790             
       
 23791             
       
 23792             ERROR;
       
 23793         }
       
 23794         
       
 23795     }/*function_usint_to_udint*/
       
 23796     break;
       
 23797 
       
 23798 /****
       
 23799  *USINT_TO_WORD
       
 23800  */
       
 23801     case function_usint_to_word :
       
 23802     {
       
 23803         symbol_c *last_type_symbol = NULL;
       
 23804 
       
 23805         {
       
 23806             symbol_c *IN_type_symbol = param_data_type;
       
 23807             last_type_symbol = param_data_type;
       
 23808             
       
 23809             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23810             {
       
 23811         
       
 23812                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23813                 return return_type_symbol;
       
 23814                 
       
 23815             }
       
 23816             
       
 23817             
       
 23818             ERROR;
       
 23819         }
       
 23820         
       
 23821     }/*function_usint_to_word*/
       
 23822     break;
       
 23823 
       
 23824 /****
       
 23825  *USINT_TO_STRING
       
 23826  */
       
 23827     case function_usint_to_string :
       
 23828     {
       
 23829         symbol_c *last_type_symbol = NULL;
       
 23830 
       
 23831         {
       
 23832             symbol_c *IN_type_symbol = param_data_type;
       
 23833             last_type_symbol = param_data_type;
       
 23834             
       
 23835             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23836             {
       
 23837         
       
 23838                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23839                 return return_type_symbol;
       
 23840                 
       
 23841             }
       
 23842             
       
 23843             
       
 23844             ERROR;
       
 23845         }
       
 23846         
       
 23847     }/*function_usint_to_string*/
       
 23848     break;
       
 23849 
       
 23850 /****
       
 23851  *USINT_TO_LWORD
       
 23852  */
       
 23853     case function_usint_to_lword :
       
 23854     {
       
 23855         symbol_c *last_type_symbol = NULL;
       
 23856 
       
 23857         {
       
 23858             symbol_c *IN_type_symbol = param_data_type;
       
 23859             last_type_symbol = param_data_type;
       
 23860             
       
 23861             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23862             {
       
 23863         
       
 23864                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23865                 return return_type_symbol;
       
 23866                 
       
 23867             }
       
 23868             
       
 23869             
       
 23870             ERROR;
       
 23871         }
       
 23872         
       
 23873     }/*function_usint_to_lword*/
       
 23874     break;
       
 23875 
       
 23876 /****
       
 23877  *USINT_TO_UINT
       
 23878  */
       
 23879     case function_usint_to_uint :
       
 23880     {
       
 23881         symbol_c *last_type_symbol = NULL;
       
 23882 
       
 23883         {
       
 23884             symbol_c *IN_type_symbol = param_data_type;
       
 23885             last_type_symbol = param_data_type;
       
 23886             
       
 23887             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23888             {
       
 23889         
       
 23890                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23891                 return return_type_symbol;
       
 23892                 
       
 23893             }
       
 23894             
       
 23895             
       
 23896             ERROR;
       
 23897         }
       
 23898         
       
 23899     }/*function_usint_to_uint*/
       
 23900     break;
       
 23901 
       
 23902 /****
       
 23903  *USINT_TO_LREAL
       
 23904  */
       
 23905     case function_usint_to_lreal :
       
 23906     {
       
 23907         symbol_c *last_type_symbol = NULL;
       
 23908 
       
 23909         {
       
 23910             symbol_c *IN_type_symbol = param_data_type;
       
 23911             last_type_symbol = param_data_type;
       
 23912             
       
 23913             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23914             {
       
 23915         
       
 23916                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23917                 return return_type_symbol;
       
 23918                 
       
 23919             }
       
 23920             
       
 23921             
       
 23922             ERROR;
       
 23923         }
       
 23924         
       
 23925     }/*function_usint_to_lreal*/
       
 23926     break;
       
 23927 
       
 23928 /****
       
 23929  *USINT_TO_BYTE
       
 23930  */
       
 23931     case function_usint_to_byte :
       
 23932     {
       
 23933         symbol_c *last_type_symbol = NULL;
       
 23934 
       
 23935         {
       
 23936             symbol_c *IN_type_symbol = param_data_type;
       
 23937             last_type_symbol = param_data_type;
       
 23938             
       
 23939             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23940             {
       
 23941         
       
 23942                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23943                 return return_type_symbol;
       
 23944                 
       
 23945             }
       
 23946             
       
 23947             
       
 23948             ERROR;
       
 23949         }
       
 23950         
       
 23951     }/*function_usint_to_byte*/
       
 23952     break;
       
 23953 
       
 23954 /****
       
 23955  *USINT_TO_ULINT
       
 23956  */
       
 23957     case function_usint_to_ulint :
       
 23958     {
       
 23959         symbol_c *last_type_symbol = NULL;
       
 23960 
       
 23961         {
       
 23962             symbol_c *IN_type_symbol = param_data_type;
       
 23963             last_type_symbol = param_data_type;
       
 23964             
       
 23965             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23966             {
       
 23967         
       
 23968                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23969                 return return_type_symbol;
       
 23970                 
       
 23971             }
       
 23972             
       
 23973             
       
 23974             ERROR;
       
 23975         }
       
 23976         
       
 23977     }/*function_usint_to_ulint*/
       
 23978     break;
       
 23979 
       
 23980 /****
       
 23981  *USINT_TO_BOOL
       
 23982  */
       
 23983     case function_usint_to_bool :
       
 23984     {
       
 23985         symbol_c *last_type_symbol = NULL;
       
 23986 
       
 23987         {
       
 23988             symbol_c *IN_type_symbol = param_data_type;
       
 23989             last_type_symbol = param_data_type;
       
 23990             
       
 23991             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23992             {
       
 23993         
       
 23994                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23995                 return return_type_symbol;
       
 23996                 
       
 23997             }
       
 23998             
       
 23999             
       
 24000             ERROR;
       
 24001         }
       
 24002         
       
 24003     }/*function_usint_to_bool*/
       
 24004     break;
       
 24005 
       
 24006 /****
       
 24007  *USINT_TO_TIME
       
 24008  */
       
 24009     case function_usint_to_time :
       
 24010     {
       
 24011         symbol_c *last_type_symbol = NULL;
       
 24012 
       
 24013         {
       
 24014             symbol_c *IN_type_symbol = param_data_type;
       
 24015             last_type_symbol = param_data_type;
       
 24016             
       
 24017             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 24018             {
       
 24019         
       
 24020                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24021                 return return_type_symbol;
       
 24022                 
       
 24023             }
       
 24024             
       
 24025             
       
 24026             ERROR;
       
 24027         }
       
 24028         
       
 24029     }/*function_usint_to_time*/
       
 24030     break;
       
 24031 
       
 24032 /****
       
 24033  *USINT_TO_INT
       
 24034  */
       
 24035     case function_usint_to_int :
       
 24036     {
       
 24037         symbol_c *last_type_symbol = NULL;
       
 24038 
       
 24039         {
       
 24040             symbol_c *IN_type_symbol = param_data_type;
       
 24041             last_type_symbol = param_data_type;
       
 24042             
       
 24043             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 24044             {
       
 24045         
       
 24046                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 24047                 return return_type_symbol;
       
 24048                 
       
 24049             }
       
 24050             
       
 24051             
       
 24052             ERROR;
       
 24053         }
       
 24054         
       
 24055     }/*function_usint_to_int*/
       
 24056     break;
       
 24057 
       
 24058 /****
       
 24059  *ULINT_TO_REAL
       
 24060  */
       
 24061     case function_ulint_to_real :
       
 24062     {
       
 24063         symbol_c *last_type_symbol = NULL;
       
 24064 
       
 24065         {
       
 24066             symbol_c *IN_type_symbol = param_data_type;
       
 24067             last_type_symbol = param_data_type;
       
 24068             
       
 24069             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24070             {
       
 24071         
       
 24072                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 24073                 return return_type_symbol;
       
 24074                 
       
 24075             }
       
 24076             
       
 24077             
       
 24078             ERROR;
       
 24079         }
       
 24080         
       
 24081     }/*function_ulint_to_real*/
       
 24082     break;
       
 24083 
       
 24084 /****
       
 24085  *ULINT_TO_SINT
       
 24086  */
       
 24087     case function_ulint_to_sint :
       
 24088     {
       
 24089         symbol_c *last_type_symbol = NULL;
       
 24090 
       
 24091         {
       
 24092             symbol_c *IN_type_symbol = param_data_type;
       
 24093             last_type_symbol = param_data_type;
       
 24094             
       
 24095             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24096             {
       
 24097         
       
 24098                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 24099                 return return_type_symbol;
       
 24100                 
       
 24101             }
       
 24102             
       
 24103             
       
 24104             ERROR;
       
 24105         }
       
 24106         
       
 24107     }/*function_ulint_to_sint*/
       
 24108     break;
       
 24109 
       
 24110 /****
       
 24111  *ULINT_TO_LINT
       
 24112  */
       
 24113     case function_ulint_to_lint :
       
 24114     {
       
 24115         symbol_c *last_type_symbol = NULL;
       
 24116 
       
 24117         {
       
 24118             symbol_c *IN_type_symbol = param_data_type;
       
 24119             last_type_symbol = param_data_type;
       
 24120             
       
 24121             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24122             {
       
 24123         
       
 24124                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 24125                 return return_type_symbol;
       
 24126                 
       
 24127             }
       
 24128             
       
 24129             
       
 24130             ERROR;
       
 24131         }
       
 24132         
       
 24133     }/*function_ulint_to_lint*/
       
 24134     break;
       
 24135 
       
 24136 /****
       
 24137  *ULINT_TO_DINT
       
 24138  */
       
 24139     case function_ulint_to_dint :
       
 24140     {
       
 24141         symbol_c *last_type_symbol = NULL;
       
 24142 
       
 24143         {
       
 24144             symbol_c *IN_type_symbol = param_data_type;
       
 24145             last_type_symbol = param_data_type;
       
 24146             
       
 24147             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24148             {
       
 24149         
       
 24150                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 24151                 return return_type_symbol;
       
 24152                 
       
 24153             }
       
 24154             
       
 24155             
       
 24156             ERROR;
       
 24157         }
       
 24158         
       
 24159     }/*function_ulint_to_dint*/
       
 24160     break;
       
 24161 
       
 24162 /****
       
 24163  *ULINT_TO_DATE
       
 24164  */
       
 24165     case function_ulint_to_date :
       
 24166     {
       
 24167         symbol_c *last_type_symbol = NULL;
       
 24168 
       
 24169         {
       
 24170             symbol_c *IN_type_symbol = param_data_type;
       
 24171             last_type_symbol = param_data_type;
       
 24172             
       
 24173             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24174             {
       
 24175         
       
 24176                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 24177                 return return_type_symbol;
       
 24178                 
       
 24179             }
       
 24180             
       
 24181             
       
 24182             ERROR;
       
 24183         }
       
 24184         
       
 24185     }/*function_ulint_to_date*/
       
 24186     break;
       
 24187 
       
 24188 /****
       
 24189  *ULINT_TO_DWORD
       
 24190  */
       
 24191     case function_ulint_to_dword :
       
 24192     {
       
 24193         symbol_c *last_type_symbol = NULL;
       
 24194 
       
 24195         {
       
 24196             symbol_c *IN_type_symbol = param_data_type;
       
 24197             last_type_symbol = param_data_type;
       
 24198             
       
 24199             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24200             {
       
 24201         
       
 24202                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 24203                 return return_type_symbol;
       
 24204                 
       
 24205             }
       
 24206             
       
 24207             
       
 24208             ERROR;
       
 24209         }
       
 24210         
       
 24211     }/*function_ulint_to_dword*/
       
 24212     break;
       
 24213 
       
 24214 /****
       
 24215  *ULINT_TO_DT
       
 24216  */
       
 24217     case function_ulint_to_dt :
       
 24218     {
       
 24219         symbol_c *last_type_symbol = NULL;
       
 24220 
       
 24221         {
       
 24222             symbol_c *IN_type_symbol = param_data_type;
       
 24223             last_type_symbol = param_data_type;
       
 24224             
       
 24225             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24226             {
       
 24227         
       
 24228                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 24229                 return return_type_symbol;
       
 24230                 
       
 24231             }
       
 24232             
       
 24233             
       
 24234             ERROR;
       
 24235         }
       
 24236         
       
 24237     }/*function_ulint_to_dt*/
       
 24238     break;
       
 24239 
       
 24240 /****
       
 24241  *ULINT_TO_TOD
       
 24242  */
       
 24243     case function_ulint_to_tod :
       
 24244     {
       
 24245         symbol_c *last_type_symbol = NULL;
       
 24246 
       
 24247         {
       
 24248             symbol_c *IN_type_symbol = param_data_type;
       
 24249             last_type_symbol = param_data_type;
       
 24250             
       
 24251             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24252             {
       
 24253         
       
 24254                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24255                 return return_type_symbol;
       
 24256                 
       
 24257             }
       
 24258             
       
 24259             
       
 24260             ERROR;
       
 24261         }
       
 24262         
       
 24263     }/*function_ulint_to_tod*/
       
 24264     break;
       
 24265 
       
 24266 /****
       
 24267  *ULINT_TO_UDINT
       
 24268  */
       
 24269     case function_ulint_to_udint :
       
 24270     {
       
 24271         symbol_c *last_type_symbol = NULL;
       
 24272 
       
 24273         {
       
 24274             symbol_c *IN_type_symbol = param_data_type;
       
 24275             last_type_symbol = param_data_type;
       
 24276             
       
 24277             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24278             {
       
 24279         
       
 24280                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 24281                 return return_type_symbol;
       
 24282                 
       
 24283             }
       
 24284             
       
 24285             
       
 24286             ERROR;
       
 24287         }
       
 24288         
       
 24289     }/*function_ulint_to_udint*/
       
 24290     break;
       
 24291 
       
 24292 /****
       
 24293  *ULINT_TO_WORD
       
 24294  */
       
 24295     case function_ulint_to_word :
       
 24296     {
       
 24297         symbol_c *last_type_symbol = NULL;
       
 24298 
       
 24299         {
       
 24300             symbol_c *IN_type_symbol = param_data_type;
       
 24301             last_type_symbol = param_data_type;
       
 24302             
       
 24303             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24304             {
       
 24305         
       
 24306                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 24307                 return return_type_symbol;
       
 24308                 
       
 24309             }
       
 24310             
       
 24311             
       
 24312             ERROR;
       
 24313         }
       
 24314         
       
 24315     }/*function_ulint_to_word*/
       
 24316     break;
       
 24317 
       
 24318 /****
       
 24319  *ULINT_TO_STRING
       
 24320  */
       
 24321     case function_ulint_to_string :
       
 24322     {
       
 24323         symbol_c *last_type_symbol = NULL;
       
 24324 
       
 24325         {
       
 24326             symbol_c *IN_type_symbol = param_data_type;
       
 24327             last_type_symbol = param_data_type;
       
 24328             
       
 24329             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24330             {
       
 24331         
       
 24332                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 24333                 return return_type_symbol;
       
 24334                 
       
 24335             }
       
 24336             
       
 24337             
       
 24338             ERROR;
       
 24339         }
       
 24340         
       
 24341     }/*function_ulint_to_string*/
       
 24342     break;
       
 24343 
       
 24344 /****
       
 24345  *ULINT_TO_LWORD
       
 24346  */
       
 24347     case function_ulint_to_lword :
       
 24348     {
       
 24349         symbol_c *last_type_symbol = NULL;
       
 24350 
       
 24351         {
       
 24352             symbol_c *IN_type_symbol = param_data_type;
       
 24353             last_type_symbol = param_data_type;
       
 24354             
       
 24355             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24356             {
       
 24357         
       
 24358                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 24359                 return return_type_symbol;
       
 24360                 
       
 24361             }
       
 24362             
       
 24363             
       
 24364             ERROR;
       
 24365         }
       
 24366         
       
 24367     }/*function_ulint_to_lword*/
       
 24368     break;
       
 24369 
       
 24370 /****
       
 24371  *ULINT_TO_UINT
       
 24372  */
       
 24373     case function_ulint_to_uint :
       
 24374     {
       
 24375         symbol_c *last_type_symbol = NULL;
       
 24376 
       
 24377         {
       
 24378             symbol_c *IN_type_symbol = param_data_type;
       
 24379             last_type_symbol = param_data_type;
       
 24380             
       
 24381             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24382             {
       
 24383         
       
 24384                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 24385                 return return_type_symbol;
       
 24386                 
       
 24387             }
       
 24388             
       
 24389             
       
 24390             ERROR;
       
 24391         }
       
 24392         
       
 24393     }/*function_ulint_to_uint*/
       
 24394     break;
       
 24395 
       
 24396 /****
       
 24397  *ULINT_TO_LREAL
       
 24398  */
       
 24399     case function_ulint_to_lreal :
       
 24400     {
       
 24401         symbol_c *last_type_symbol = NULL;
       
 24402 
       
 24403         {
       
 24404             symbol_c *IN_type_symbol = param_data_type;
       
 24405             last_type_symbol = param_data_type;
       
 24406             
       
 24407             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24408             {
       
 24409         
       
 24410                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 24411                 return return_type_symbol;
       
 24412                 
       
 24413             }
       
 24414             
       
 24415             
       
 24416             ERROR;
       
 24417         }
       
 24418         
       
 24419     }/*function_ulint_to_lreal*/
       
 24420     break;
       
 24421 
       
 24422 /****
       
 24423  *ULINT_TO_BYTE
       
 24424  */
       
 24425     case function_ulint_to_byte :
       
 24426     {
       
 24427         symbol_c *last_type_symbol = NULL;
       
 24428 
       
 24429         {
       
 24430             symbol_c *IN_type_symbol = param_data_type;
       
 24431             last_type_symbol = param_data_type;
       
 24432             
       
 24433             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24434             {
       
 24435         
       
 24436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 24437                 return return_type_symbol;
       
 24438                 
       
 24439             }
       
 24440             
       
 24441             
       
 24442             ERROR;
       
 24443         }
       
 24444         
       
 24445     }/*function_ulint_to_byte*/
       
 24446     break;
       
 24447 
       
 24448 /****
       
 24449  *ULINT_TO_USINT
       
 24450  */
       
 24451     case function_ulint_to_usint :
       
 24452     {
       
 24453         symbol_c *last_type_symbol = NULL;
       
 24454 
       
 24455         {
       
 24456             symbol_c *IN_type_symbol = param_data_type;
       
 24457             last_type_symbol = param_data_type;
       
 24458             
       
 24459             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24460             {
       
 24461         
       
 24462                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 24463                 return return_type_symbol;
       
 24464                 
       
 24465             }
       
 24466             
       
 24467             
       
 24468             ERROR;
       
 24469         }
       
 24470         
       
 24471     }/*function_ulint_to_usint*/
       
 24472     break;
       
 24473 
       
 24474 /****
       
 24475  *ULINT_TO_BOOL
       
 24476  */
       
 24477     case function_ulint_to_bool :
       
 24478     {
       
 24479         symbol_c *last_type_symbol = NULL;
       
 24480 
       
 24481         {
       
 24482             symbol_c *IN_type_symbol = param_data_type;
       
 24483             last_type_symbol = param_data_type;
       
 24484             
       
 24485             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24486             {
       
 24487         
       
 24488                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 24489                 return return_type_symbol;
       
 24490                 
       
 24491             }
       
 24492             
       
 24493             
       
 24494             ERROR;
       
 24495         }
       
 24496         
       
 24497     }/*function_ulint_to_bool*/
       
 24498     break;
       
 24499 
       
 24500 /****
       
 24501  *ULINT_TO_TIME
       
 24502  */
       
 24503     case function_ulint_to_time :
       
 24504     {
       
 24505         symbol_c *last_type_symbol = NULL;
       
 24506 
       
 24507         {
       
 24508             symbol_c *IN_type_symbol = param_data_type;
       
 24509             last_type_symbol = param_data_type;
       
 24510             
       
 24511             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24512             {
       
 24513         
       
 24514                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24515                 return return_type_symbol;
       
 24516                 
       
 24517             }
       
 24518             
       
 24519             
       
 24520             ERROR;
       
 24521         }
       
 24522         
       
 24523     }/*function_ulint_to_time*/
       
 24524     break;
       
 24525 
       
 24526 /****
       
 24527  *ULINT_TO_INT
       
 24528  */
       
 24529     case function_ulint_to_int :
       
 24530     {
       
 24531         symbol_c *last_type_symbol = NULL;
       
 24532 
       
 24533         {
       
 24534             symbol_c *IN_type_symbol = param_data_type;
       
 24535             last_type_symbol = param_data_type;
       
 24536             
       
 24537             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24538             {
       
 24539         
       
 24540                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 24541                 return return_type_symbol;
       
 24542                 
       
 24543             }
       
 24544             
       
 24545             
       
 24546             ERROR;
       
 24547         }
       
 24548         
       
 24549     }/*function_ulint_to_int*/
       
 24550     break;
       
 24551 
       
 24552 /****
       
 24553  *BOOL_TO_REAL
       
 24554  */
       
 24555     case function_bool_to_real :
       
 24556     {
       
 24557         symbol_c *last_type_symbol = NULL;
       
 24558 
       
 24559         {
       
 24560             symbol_c *IN_type_symbol = param_data_type;
       
 24561             last_type_symbol = param_data_type;
       
 24562             
       
 24563             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24564             {
       
 24565         
       
 24566                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 24567                 return return_type_symbol;
       
 24568                 
       
 24569             }
       
 24570             
       
 24571             
       
 24572             ERROR;
       
 24573         }
       
 24574         
       
 24575     }/*function_bool_to_real*/
       
 24576     break;
       
 24577 
       
 24578 /****
       
 24579  *BOOL_TO_SINT
       
 24580  */
       
 24581     case function_bool_to_sint :
       
 24582     {
       
 24583         symbol_c *last_type_symbol = NULL;
       
 24584 
       
 24585         {
       
 24586             symbol_c *IN_type_symbol = param_data_type;
       
 24587             last_type_symbol = param_data_type;
       
 24588             
       
 24589             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24590             {
       
 24591         
       
 24592                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 24593                 return return_type_symbol;
       
 24594                 
       
 24595             }
       
 24596             
       
 24597             
       
 24598             ERROR;
       
 24599         }
       
 24600         
       
 24601     }/*function_bool_to_sint*/
       
 24602     break;
       
 24603 
       
 24604 /****
       
 24605  *BOOL_TO_LINT
       
 24606  */
       
 24607     case function_bool_to_lint :
       
 24608     {
       
 24609         symbol_c *last_type_symbol = NULL;
       
 24610 
       
 24611         {
       
 24612             symbol_c *IN_type_symbol = param_data_type;
       
 24613             last_type_symbol = param_data_type;
       
 24614             
       
 24615             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24616             {
       
 24617         
       
 24618                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 24619                 return return_type_symbol;
       
 24620                 
       
 24621             }
       
 24622             
       
 24623             
       
 24624             ERROR;
       
 24625         }
       
 24626         
       
 24627     }/*function_bool_to_lint*/
       
 24628     break;
       
 24629 
       
 24630 /****
       
 24631  *BOOL_TO_DINT
       
 24632  */
       
 24633     case function_bool_to_dint :
       
 24634     {
       
 24635         symbol_c *last_type_symbol = NULL;
       
 24636 
       
 24637         {
       
 24638             symbol_c *IN_type_symbol = param_data_type;
       
 24639             last_type_symbol = param_data_type;
       
 24640             
       
 24641             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24642             {
       
 24643         
       
 24644                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 24645                 return return_type_symbol;
       
 24646                 
       
 24647             }
       
 24648             
       
 24649             
       
 24650             ERROR;
       
 24651         }
       
 24652         
       
 24653     }/*function_bool_to_dint*/
       
 24654     break;
       
 24655 
       
 24656 /****
       
 24657  *BOOL_TO_DATE
       
 24658  */
       
 24659     case function_bool_to_date :
       
 24660     {
       
 24661         symbol_c *last_type_symbol = NULL;
       
 24662 
       
 24663         {
       
 24664             symbol_c *IN_type_symbol = param_data_type;
       
 24665             last_type_symbol = param_data_type;
       
 24666             
       
 24667             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24668             {
       
 24669         
       
 24670                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 24671                 return return_type_symbol;
       
 24672                 
       
 24673             }
       
 24674             
       
 24675             
       
 24676             ERROR;
       
 24677         }
       
 24678         
       
 24679     }/*function_bool_to_date*/
       
 24680     break;
       
 24681 
       
 24682 /****
       
 24683  *BOOL_TO_DWORD
       
 24684  */
       
 24685     case function_bool_to_dword :
       
 24686     {
       
 24687         symbol_c *last_type_symbol = NULL;
       
 24688 
       
 24689         {
       
 24690             symbol_c *IN_type_symbol = param_data_type;
       
 24691             last_type_symbol = param_data_type;
       
 24692             
       
 24693             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24694             {
       
 24695         
       
 24696                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 24697                 return return_type_symbol;
       
 24698                 
       
 24699             }
       
 24700             
       
 24701             
       
 24702             ERROR;
       
 24703         }
       
 24704         
       
 24705     }/*function_bool_to_dword*/
       
 24706     break;
       
 24707 
       
 24708 /****
       
 24709  *BOOL_TO_DT
       
 24710  */
       
 24711     case function_bool_to_dt :
       
 24712     {
       
 24713         symbol_c *last_type_symbol = NULL;
       
 24714 
       
 24715         {
       
 24716             symbol_c *IN_type_symbol = param_data_type;
       
 24717             last_type_symbol = param_data_type;
       
 24718             
       
 24719             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24720             {
       
 24721         
       
 24722                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 24723                 return return_type_symbol;
       
 24724                 
       
 24725             }
       
 24726             
       
 24727             
       
 24728             ERROR;
       
 24729         }
       
 24730         
       
 24731     }/*function_bool_to_dt*/
       
 24732     break;
       
 24733 
       
 24734 /****
       
 24735  *BOOL_TO_TOD
       
 24736  */
       
 24737     case function_bool_to_tod :
       
 24738     {
       
 24739         symbol_c *last_type_symbol = NULL;
       
 24740 
       
 24741         {
       
 24742             symbol_c *IN_type_symbol = param_data_type;
       
 24743             last_type_symbol = param_data_type;
       
 24744             
       
 24745             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24746             {
       
 24747         
       
 24748                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24749                 return return_type_symbol;
       
 24750                 
       
 24751             }
       
 24752             
       
 24753             
       
 24754             ERROR;
       
 24755         }
       
 24756         
       
 24757     }/*function_bool_to_tod*/
       
 24758     break;
       
 24759 
       
 24760 /****
       
 24761  *BOOL_TO_UDINT
       
 24762  */
       
 24763     case function_bool_to_udint :
       
 24764     {
       
 24765         symbol_c *last_type_symbol = NULL;
       
 24766 
       
 24767         {
       
 24768             symbol_c *IN_type_symbol = param_data_type;
       
 24769             last_type_symbol = param_data_type;
       
 24770             
       
 24771             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24772             {
       
 24773         
       
 24774                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 24775                 return return_type_symbol;
       
 24776                 
       
 24777             }
       
 24778             
       
 24779             
       
 24780             ERROR;
       
 24781         }
       
 24782         
       
 24783     }/*function_bool_to_udint*/
       
 24784     break;
       
 24785 
       
 24786 /****
       
 24787  *BOOL_TO_WORD
       
 24788  */
       
 24789     case function_bool_to_word :
       
 24790     {
       
 24791         symbol_c *last_type_symbol = NULL;
       
 24792 
       
 24793         {
       
 24794             symbol_c *IN_type_symbol = param_data_type;
       
 24795             last_type_symbol = param_data_type;
       
 24796             
       
 24797             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24798             {
       
 24799         
       
 24800                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 24801                 return return_type_symbol;
       
 24802                 
       
 24803             }
       
 24804             
       
 24805             
       
 24806             ERROR;
       
 24807         }
       
 24808         
       
 24809     }/*function_bool_to_word*/
       
 24810     break;
       
 24811 
       
 24812 /****
       
 24813  *BOOL_TO_STRING
       
 24814  */
       
 24815     case function_bool_to_string :
       
 24816     {
       
 24817         symbol_c *last_type_symbol = NULL;
       
 24818 
       
 24819         {
       
 24820             symbol_c *IN_type_symbol = param_data_type;
       
 24821             last_type_symbol = param_data_type;
       
 24822             
       
 24823             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24824             {
       
 24825         
       
 24826                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 24827                 return return_type_symbol;
       
 24828                 
       
 24829             }
       
 24830             
       
 24831             
       
 24832             ERROR;
       
 24833         }
       
 24834         
       
 24835     }/*function_bool_to_string*/
       
 24836     break;
       
 24837 
       
 24838 /****
       
 24839  *BOOL_TO_LWORD
       
 24840  */
       
 24841     case function_bool_to_lword :
       
 24842     {
       
 24843         symbol_c *last_type_symbol = NULL;
       
 24844 
       
 24845         {
       
 24846             symbol_c *IN_type_symbol = param_data_type;
       
 24847             last_type_symbol = param_data_type;
       
 24848             
       
 24849             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24850             {
       
 24851         
       
 24852                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 24853                 return return_type_symbol;
       
 24854                 
       
 24855             }
       
 24856             
       
 24857             
       
 24858             ERROR;
       
 24859         }
       
 24860         
       
 24861     }/*function_bool_to_lword*/
       
 24862     break;
       
 24863 
       
 24864 /****
       
 24865  *BOOL_TO_UINT
       
 24866  */
       
 24867     case function_bool_to_uint :
       
 24868     {
       
 24869         symbol_c *last_type_symbol = NULL;
       
 24870 
       
 24871         {
       
 24872             symbol_c *IN_type_symbol = param_data_type;
       
 24873             last_type_symbol = param_data_type;
       
 24874             
       
 24875             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24876             {
       
 24877         
       
 24878                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 24879                 return return_type_symbol;
       
 24880                 
       
 24881             }
       
 24882             
       
 24883             
       
 24884             ERROR;
       
 24885         }
       
 24886         
       
 24887     }/*function_bool_to_uint*/
       
 24888     break;
       
 24889 
       
 24890 /****
       
 24891  *BOOL_TO_LREAL
       
 24892  */
       
 24893     case function_bool_to_lreal :
       
 24894     {
       
 24895         symbol_c *last_type_symbol = NULL;
       
 24896 
       
 24897         {
       
 24898             symbol_c *IN_type_symbol = param_data_type;
       
 24899             last_type_symbol = param_data_type;
       
 24900             
       
 24901             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24902             {
       
 24903         
       
 24904                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 24905                 return return_type_symbol;
       
 24906                 
       
 24907             }
       
 24908             
       
 24909             
       
 24910             ERROR;
       
 24911         }
       
 24912         
       
 24913     }/*function_bool_to_lreal*/
       
 24914     break;
       
 24915 
       
 24916 /****
       
 24917  *BOOL_TO_BYTE
       
 24918  */
       
 24919     case function_bool_to_byte :
       
 24920     {
       
 24921         symbol_c *last_type_symbol = NULL;
       
 24922 
       
 24923         {
       
 24924             symbol_c *IN_type_symbol = param_data_type;
       
 24925             last_type_symbol = param_data_type;
       
 24926             
       
 24927             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24928             {
       
 24929         
       
 24930                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 24931                 return return_type_symbol;
       
 24932                 
       
 24933             }
       
 24934             
       
 24935             
       
 24936             ERROR;
       
 24937         }
       
 24938         
       
 24939     }/*function_bool_to_byte*/
       
 24940     break;
       
 24941 
       
 24942 /****
       
 24943  *BOOL_TO_USINT
       
 24944  */
       
 24945     case function_bool_to_usint :
       
 24946     {
       
 24947         symbol_c *last_type_symbol = NULL;
       
 24948 
       
 24949         {
       
 24950             symbol_c *IN_type_symbol = param_data_type;
       
 24951             last_type_symbol = param_data_type;
       
 24952             
       
 24953             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24954             {
       
 24955         
       
 24956                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 24957                 return return_type_symbol;
       
 24958                 
       
 24959             }
       
 24960             
       
 24961             
       
 24962             ERROR;
       
 24963         }
       
 24964         
       
 24965     }/*function_bool_to_usint*/
       
 24966     break;
       
 24967 
       
 24968 /****
       
 24969  *BOOL_TO_ULINT
       
 24970  */
       
 24971     case function_bool_to_ulint :
       
 24972     {
       
 24973         symbol_c *last_type_symbol = NULL;
       
 24974 
       
 24975         {
       
 24976             symbol_c *IN_type_symbol = param_data_type;
       
 24977             last_type_symbol = param_data_type;
       
 24978             
       
 24979             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 24980             {
       
 24981         
       
 24982                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 24983                 return return_type_symbol;
       
 24984                 
       
 24985             }
       
 24986             
       
 24987             
       
 24988             ERROR;
       
 24989         }
       
 24990         
       
 24991     }/*function_bool_to_ulint*/
       
 24992     break;
       
 24993 
       
 24994 /****
       
 24995  *BOOL_TO_TIME
       
 24996  */
       
 24997     case function_bool_to_time :
       
 24998     {
       
 24999         symbol_c *last_type_symbol = NULL;
       
 25000 
       
 25001         {
       
 25002             symbol_c *IN_type_symbol = param_data_type;
       
 25003             last_type_symbol = param_data_type;
       
 25004             
       
 25005             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 25006             {
       
 25007         
       
 25008                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 25009                 return return_type_symbol;
       
 25010                 
       
 25011             }
       
 25012             
       
 25013             
       
 25014             ERROR;
       
 25015         }
       
 25016         
       
 25017     }/*function_bool_to_time*/
       
 25018     break;
       
 25019 
       
 25020 /****
       
 25021  *BOOL_TO_INT
       
 25022  */
       
 25023     case function_bool_to_int :
       
 25024     {
       
 25025         symbol_c *last_type_symbol = NULL;
       
 25026 
       
 25027         {
       
 25028             symbol_c *IN_type_symbol = param_data_type;
       
 25029             last_type_symbol = param_data_type;
       
 25030             
       
 25031             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 25032             {
       
 25033         
       
 25034                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 25035                 return return_type_symbol;
       
 25036                 
       
 25037             }
       
 25038             
       
 25039             
       
 25040             ERROR;
       
 25041         }
       
 25042         
       
 25043     }/*function_bool_to_int*/
       
 25044     break;
       
 25045 
       
 25046 /****
       
 25047  *TIME_TO_REAL
       
 25048  */
       
 25049     case function_time_to_real :
       
 25050     {
       
 25051         symbol_c *last_type_symbol = NULL;
       
 25052 
       
 25053         {
       
 25054             symbol_c *IN_type_symbol = param_data_type;
       
 25055             last_type_symbol = param_data_type;
       
 25056             
       
 25057             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25058             {
       
 25059         
       
 25060                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 25061                 return return_type_symbol;
       
 25062                 
       
 25063             }
       
 25064             
       
 25065             
       
 25066             ERROR;
       
 25067         }
       
 25068         
       
 25069     }/*function_time_to_real*/
       
 25070     break;
       
 25071 
       
 25072 /****
       
 25073  *TIME_TO_SINT
       
 25074  */
       
 25075     case function_time_to_sint :
       
 25076     {
       
 25077         symbol_c *last_type_symbol = NULL;
       
 25078 
       
 25079         {
       
 25080             symbol_c *IN_type_symbol = param_data_type;
       
 25081             last_type_symbol = param_data_type;
       
 25082             
       
 25083             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25084             {
       
 25085         
       
 25086                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 25087                 return return_type_symbol;
       
 25088                 
       
 25089             }
       
 25090             
       
 25091             
       
 25092             ERROR;
       
 25093         }
       
 25094         
       
 25095     }/*function_time_to_sint*/
       
 25096     break;
       
 25097 
       
 25098 /****
       
 25099  *TIME_TO_LINT
       
 25100  */
       
 25101     case function_time_to_lint :
       
 25102     {
       
 25103         symbol_c *last_type_symbol = NULL;
       
 25104 
       
 25105         {
       
 25106             symbol_c *IN_type_symbol = param_data_type;
       
 25107             last_type_symbol = param_data_type;
       
 25108             
       
 25109             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25110             {
       
 25111         
       
 25112                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 25113                 return return_type_symbol;
       
 25114                 
       
 25115             }
       
 25116             
       
 25117             
       
 25118             ERROR;
       
 25119         }
       
 25120         
       
 25121     }/*function_time_to_lint*/
       
 25122     break;
       
 25123 
       
 25124 /****
       
 25125  *TIME_TO_DINT
       
 25126  */
       
 25127     case function_time_to_dint :
       
 25128     {
       
 25129         symbol_c *last_type_symbol = NULL;
       
 25130 
       
 25131         {
       
 25132             symbol_c *IN_type_symbol = param_data_type;
       
 25133             last_type_symbol = param_data_type;
       
 25134             
       
 25135             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25136             {
       
 25137         
       
 25138                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 25139                 return return_type_symbol;
       
 25140                 
       
 25141             }
       
 25142             
       
 25143             
       
 25144             ERROR;
       
 25145         }
       
 25146         
       
 25147     }/*function_time_to_dint*/
       
 25148     break;
       
 25149 
       
 25150 /****
       
 25151  *TIME_TO_DWORD
       
 25152  */
       
 25153     case function_time_to_dword :
       
 25154     {
       
 25155         symbol_c *last_type_symbol = NULL;
       
 25156 
       
 25157         {
       
 25158             symbol_c *IN_type_symbol = param_data_type;
       
 25159             last_type_symbol = param_data_type;
       
 25160             
       
 25161             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25162             {
       
 25163         
       
 25164                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 25165                 return return_type_symbol;
       
 25166                 
       
 25167             }
       
 25168             
       
 25169             
       
 25170             ERROR;
       
 25171         }
       
 25172         
       
 25173     }/*function_time_to_dword*/
       
 25174     break;
       
 25175 
       
 25176 /****
       
 25177  *TIME_TO_UDINT
       
 25178  */
       
 25179     case function_time_to_udint :
       
 25180     {
       
 25181         symbol_c *last_type_symbol = NULL;
       
 25182 
       
 25183         {
       
 25184             symbol_c *IN_type_symbol = param_data_type;
       
 25185             last_type_symbol = param_data_type;
       
 25186             
       
 25187             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25188             {
       
 25189         
       
 25190                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 25191                 return return_type_symbol;
       
 25192                 
       
 25193             }
       
 25194             
       
 25195             
       
 25196             ERROR;
       
 25197         }
       
 25198         
       
 25199     }/*function_time_to_udint*/
       
 25200     break;
       
 25201 
       
 25202 /****
       
 25203  *TIME_TO_WORD
       
 25204  */
       
 25205     case function_time_to_word :
       
 25206     {
       
 25207         symbol_c *last_type_symbol = NULL;
       
 25208 
       
 25209         {
       
 25210             symbol_c *IN_type_symbol = param_data_type;
       
 25211             last_type_symbol = param_data_type;
       
 25212             
       
 25213             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25214             {
       
 25215         
       
 25216                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 25217                 return return_type_symbol;
       
 25218                 
       
 25219             }
       
 25220             
       
 25221             
       
 25222             ERROR;
       
 25223         }
       
 25224         
       
 25225     }/*function_time_to_word*/
       
 25226     break;
       
 25227 
       
 25228 /****
       
 25229  *TIME_TO_STRING
       
 25230  */
       
 25231     case function_time_to_string :
       
 25232     {
       
 25233         symbol_c *last_type_symbol = NULL;
       
 25234 
       
 25235         {
       
 25236             symbol_c *IN_type_symbol = param_data_type;
       
 25237             last_type_symbol = param_data_type;
       
 25238             
       
 25239             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25240             {
       
 25241         
       
 25242                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25243                 return return_type_symbol;
       
 25244                 
       
 25245             }
       
 25246             
       
 25247             
       
 25248             ERROR;
       
 25249         }
       
 25250         
       
 25251     }/*function_time_to_string*/
       
 25252     break;
       
 25253 
       
 25254 /****
       
 25255  *TIME_TO_LWORD
       
 25256  */
       
 25257     case function_time_to_lword :
       
 25258     {
       
 25259         symbol_c *last_type_symbol = NULL;
       
 25260 
       
 25261         {
       
 25262             symbol_c *IN_type_symbol = param_data_type;
       
 25263             last_type_symbol = param_data_type;
       
 25264             
       
 25265             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25266             {
       
 25267         
       
 25268                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 25269                 return return_type_symbol;
       
 25270                 
       
 25271             }
       
 25272             
       
 25273             
       
 25274             ERROR;
       
 25275         }
       
 25276         
       
 25277     }/*function_time_to_lword*/
       
 25278     break;
       
 25279 
       
 25280 /****
       
 25281  *TIME_TO_UINT
       
 25282  */
       
 25283     case function_time_to_uint :
       
 25284     {
       
 25285         symbol_c *last_type_symbol = NULL;
       
 25286 
       
 25287         {
       
 25288             symbol_c *IN_type_symbol = param_data_type;
       
 25289             last_type_symbol = param_data_type;
       
 25290             
       
 25291             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25292             {
       
 25293         
       
 25294                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 25295                 return return_type_symbol;
       
 25296                 
       
 25297             }
       
 25298             
       
 25299             
       
 25300             ERROR;
       
 25301         }
       
 25302         
       
 25303     }/*function_time_to_uint*/
       
 25304     break;
       
 25305 
       
 25306 /****
       
 25307  *TIME_TO_LREAL
       
 25308  */
       
 25309     case function_time_to_lreal :
       
 25310     {
       
 25311         symbol_c *last_type_symbol = NULL;
       
 25312 
       
 25313         {
       
 25314             symbol_c *IN_type_symbol = param_data_type;
       
 25315             last_type_symbol = param_data_type;
       
 25316             
       
 25317             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25318             {
       
 25319         
       
 25320                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 25321                 return return_type_symbol;
       
 25322                 
       
 25323             }
       
 25324             
       
 25325             
       
 25326             ERROR;
       
 25327         }
       
 25328         
       
 25329     }/*function_time_to_lreal*/
       
 25330     break;
       
 25331 
       
 25332 /****
       
 25333  *TIME_TO_BYTE
       
 25334  */
       
 25335     case function_time_to_byte :
       
 25336     {
       
 25337         symbol_c *last_type_symbol = NULL;
       
 25338 
       
 25339         {
       
 25340             symbol_c *IN_type_symbol = param_data_type;
       
 25341             last_type_symbol = param_data_type;
       
 25342             
       
 25343             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25344             {
       
 25345         
       
 25346                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 25347                 return return_type_symbol;
       
 25348                 
       
 25349             }
       
 25350             
       
 25351             
       
 25352             ERROR;
       
 25353         }
       
 25354         
       
 25355     }/*function_time_to_byte*/
       
 25356     break;
       
 25357 
       
 25358 /****
       
 25359  *TIME_TO_USINT
       
 25360  */
       
 25361     case function_time_to_usint :
       
 25362     {
       
 25363         symbol_c *last_type_symbol = NULL;
       
 25364 
       
 25365         {
       
 25366             symbol_c *IN_type_symbol = param_data_type;
       
 25367             last_type_symbol = param_data_type;
       
 25368             
       
 25369             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25370             {
       
 25371         
       
 25372                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 25373                 return return_type_symbol;
       
 25374                 
       
 25375             }
       
 25376             
       
 25377             
       
 25378             ERROR;
       
 25379         }
       
 25380         
       
 25381     }/*function_time_to_usint*/
       
 25382     break;
       
 25383 
       
 25384 /****
       
 25385  *TIME_TO_ULINT
       
 25386  */
       
 25387     case function_time_to_ulint :
       
 25388     {
       
 25389         symbol_c *last_type_symbol = NULL;
       
 25390 
       
 25391         {
       
 25392             symbol_c *IN_type_symbol = param_data_type;
       
 25393             last_type_symbol = param_data_type;
       
 25394             
       
 25395             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25396             {
       
 25397         
       
 25398                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 25399                 return return_type_symbol;
       
 25400                 
       
 25401             }
       
 25402             
       
 25403             
       
 25404             ERROR;
       
 25405         }
       
 25406         
       
 25407     }/*function_time_to_ulint*/
       
 25408     break;
       
 25409 
       
 25410 /****
       
 25411  *TIME_TO_INT
       
 25412  */
       
 25413     case function_time_to_int :
       
 25414     {
       
 25415         symbol_c *last_type_symbol = NULL;
       
 25416 
       
 25417         {
       
 25418             symbol_c *IN_type_symbol = param_data_type;
       
 25419             last_type_symbol = param_data_type;
       
 25420             
       
 25421             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 25422             {
       
 25423         
       
 25424                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 25425                 return return_type_symbol;
       
 25426                 
       
 25427             }
       
 25428             
       
 25429             
       
 25430             ERROR;
       
 25431         }
       
 25432         
       
 25433     }/*function_time_to_int*/
       
 25434     break;
       
 25435 
       
 25436 /****
       
 25437  *INT_TO_REAL
       
 25438  */
       
 25439     case function_int_to_real :
       
 25440     {
       
 25441         symbol_c *last_type_symbol = NULL;
       
 25442 
       
 25443         {
       
 25444             symbol_c *IN_type_symbol = param_data_type;
       
 25445             last_type_symbol = param_data_type;
       
 25446             
       
 25447             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25448             {
       
 25449         
       
 25450                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 25451                 return return_type_symbol;
       
 25452                 
       
 25453             }
       
 25454             
       
 25455             
       
 25456             ERROR;
       
 25457         }
       
 25458         
       
 25459     }/*function_int_to_real*/
       
 25460     break;
       
 25461 
       
 25462 /****
       
 25463  *INT_TO_SINT
       
 25464  */
       
 25465     case function_int_to_sint :
       
 25466     {
       
 25467         symbol_c *last_type_symbol = NULL;
       
 25468 
       
 25469         {
       
 25470             symbol_c *IN_type_symbol = param_data_type;
       
 25471             last_type_symbol = param_data_type;
       
 25472             
       
 25473             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25474             {
       
 25475         
       
 25476                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 25477                 return return_type_symbol;
       
 25478                 
       
 25479             }
       
 25480             
       
 25481             
       
 25482             ERROR;
       
 25483         }
       
 25484         
       
 25485     }/*function_int_to_sint*/
       
 25486     break;
       
 25487 
       
 25488 /****
       
 25489  *INT_TO_LINT
       
 25490  */
       
 25491     case function_int_to_lint :
       
 25492     {
       
 25493         symbol_c *last_type_symbol = NULL;
       
 25494 
       
 25495         {
       
 25496             symbol_c *IN_type_symbol = param_data_type;
       
 25497             last_type_symbol = param_data_type;
       
 25498             
       
 25499             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25500             {
       
 25501         
       
 25502                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 25503                 return return_type_symbol;
       
 25504                 
       
 25505             }
       
 25506             
       
 25507             
       
 25508             ERROR;
       
 25509         }
       
 25510         
       
 25511     }/*function_int_to_lint*/
       
 25512     break;
       
 25513 
       
 25514 /****
       
 25515  *INT_TO_DINT
       
 25516  */
       
 25517     case function_int_to_dint :
       
 25518     {
       
 25519         symbol_c *last_type_symbol = NULL;
       
 25520 
       
 25521         {
       
 25522             symbol_c *IN_type_symbol = param_data_type;
       
 25523             last_type_symbol = param_data_type;
       
 25524             
       
 25525             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25526             {
       
 25527         
       
 25528                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 25529                 return return_type_symbol;
       
 25530                 
       
 25531             }
       
 25532             
       
 25533             
       
 25534             ERROR;
       
 25535         }
       
 25536         
       
 25537     }/*function_int_to_dint*/
       
 25538     break;
       
 25539 
       
 25540 /****
       
 25541  *INT_TO_DATE
       
 25542  */
       
 25543     case function_int_to_date :
       
 25544     {
       
 25545         symbol_c *last_type_symbol = NULL;
       
 25546 
       
 25547         {
       
 25548             symbol_c *IN_type_symbol = param_data_type;
       
 25549             last_type_symbol = param_data_type;
       
 25550             
       
 25551             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25552             {
       
 25553         
       
 25554                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 25555                 return return_type_symbol;
       
 25556                 
       
 25557             }
       
 25558             
       
 25559             
       
 25560             ERROR;
       
 25561         }
       
 25562         
       
 25563     }/*function_int_to_date*/
       
 25564     break;
       
 25565 
       
 25566 /****
       
 25567  *INT_TO_DWORD
       
 25568  */
       
 25569     case function_int_to_dword :
       
 25570     {
       
 25571         symbol_c *last_type_symbol = NULL;
       
 25572 
       
 25573         {
       
 25574             symbol_c *IN_type_symbol = param_data_type;
       
 25575             last_type_symbol = param_data_type;
       
 25576             
       
 25577             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25578             {
       
 25579         
       
 25580                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 25581                 return return_type_symbol;
       
 25582                 
       
 25583             }
       
 25584             
       
 25585             
       
 25586             ERROR;
       
 25587         }
       
 25588         
       
 25589     }/*function_int_to_dword*/
       
 25590     break;
       
 25591 
       
 25592 /****
       
 25593  *INT_TO_DT
       
 25594  */
       
 25595     case function_int_to_dt :
       
 25596     {
       
 25597         symbol_c *last_type_symbol = NULL;
       
 25598 
       
 25599         {
       
 25600             symbol_c *IN_type_symbol = param_data_type;
       
 25601             last_type_symbol = param_data_type;
       
 25602             
       
 25603             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25604             {
       
 25605         
       
 25606                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 25607                 return return_type_symbol;
       
 25608                 
       
 25609             }
       
 25610             
       
 25611             
       
 25612             ERROR;
       
 25613         }
       
 25614         
       
 25615     }/*function_int_to_dt*/
       
 25616     break;
       
 25617 
       
 25618 /****
       
 25619  *INT_TO_TOD
       
 25620  */
       
 25621     case function_int_to_tod :
       
 25622     {
       
 25623         symbol_c *last_type_symbol = NULL;
       
 25624 
       
 25625         {
       
 25626             symbol_c *IN_type_symbol = param_data_type;
       
 25627             last_type_symbol = param_data_type;
       
 25628             
       
 25629             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25630             {
       
 25631         
       
 25632                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 25633                 return return_type_symbol;
       
 25634                 
       
 25635             }
       
 25636             
       
 25637             
       
 25638             ERROR;
       
 25639         }
       
 25640         
       
 25641     }/*function_int_to_tod*/
       
 25642     break;
       
 25643 
       
 25644 /****
       
 25645  *INT_TO_UDINT
       
 25646  */
       
 25647     case function_int_to_udint :
       
 25648     {
       
 25649         symbol_c *last_type_symbol = NULL;
       
 25650 
       
 25651         {
       
 25652             symbol_c *IN_type_symbol = param_data_type;
       
 25653             last_type_symbol = param_data_type;
       
 25654             
       
 25655             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25656             {
       
 25657         
       
 25658                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 25659                 return return_type_symbol;
       
 25660                 
       
 25661             }
       
 25662             
       
 25663             
       
 25664             ERROR;
       
 25665         }
       
 25666         
       
 25667     }/*function_int_to_udint*/
       
 25668     break;
       
 25669 
       
 25670 /****
       
 25671  *INT_TO_WORD
       
 25672  */
       
 25673     case function_int_to_word :
       
 25674     {
       
 25675         symbol_c *last_type_symbol = NULL;
       
 25676 
       
 25677         {
       
 25678             symbol_c *IN_type_symbol = param_data_type;
       
 25679             last_type_symbol = param_data_type;
       
 25680             
       
 25681             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25682             {
       
 25683         
       
 25684                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 25685                 return return_type_symbol;
       
 25686                 
       
 25687             }
       
 25688             
       
 25689             
       
 25690             ERROR;
       
 25691         }
       
 25692         
       
 25693     }/*function_int_to_word*/
       
 25694     break;
       
 25695 
       
 25696 /****
       
 25697  *INT_TO_STRING
       
 25698  */
       
 25699     case function_int_to_string :
       
 25700     {
       
 25701         symbol_c *last_type_symbol = NULL;
       
 25702 
       
 25703         {
       
 25704             symbol_c *IN_type_symbol = param_data_type;
       
 25705             last_type_symbol = param_data_type;
       
 25706             
       
 25707             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25708             {
       
 25709         
       
 25710                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25711                 return return_type_symbol;
       
 25712                 
       
 25713             }
       
 25714             
       
 25715             
       
 25716             ERROR;
       
 25717         }
       
 25718         
       
 25719     }/*function_int_to_string*/
       
 25720     break;
       
 25721 
       
 25722 /****
       
 25723  *INT_TO_LWORD
       
 25724  */
       
 25725     case function_int_to_lword :
       
 25726     {
       
 25727         symbol_c *last_type_symbol = NULL;
       
 25728 
       
 25729         {
       
 25730             symbol_c *IN_type_symbol = param_data_type;
       
 25731             last_type_symbol = param_data_type;
       
 25732             
       
 25733             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25734             {
       
 25735         
       
 25736                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 25737                 return return_type_symbol;
       
 25738                 
       
 25739             }
       
 25740             
       
 25741             
       
 25742             ERROR;
       
 25743         }
       
 25744         
       
 25745     }/*function_int_to_lword*/
       
 25746     break;
       
 25747 
       
 25748 /****
       
 25749  *INT_TO_UINT
       
 25750  */
       
 25751     case function_int_to_uint :
       
 25752     {
       
 25753         symbol_c *last_type_symbol = NULL;
       
 25754 
       
 25755         {
       
 25756             symbol_c *IN_type_symbol = param_data_type;
       
 25757             last_type_symbol = param_data_type;
       
 25758             
       
 25759             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25760             {
       
 25761         
       
 25762                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 25763                 return return_type_symbol;
       
 25764                 
       
 25765             }
       
 25766             
       
 25767             
       
 25768             ERROR;
       
 25769         }
       
 25770         
       
 25771     }/*function_int_to_uint*/
       
 25772     break;
       
 25773 
       
 25774 /****
       
 25775  *INT_TO_LREAL
       
 25776  */
       
 25777     case function_int_to_lreal :
       
 25778     {
       
 25779         symbol_c *last_type_symbol = NULL;
       
 25780 
       
 25781         {
       
 25782             symbol_c *IN_type_symbol = param_data_type;
       
 25783             last_type_symbol = param_data_type;
       
 25784             
       
 25785             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25786             {
       
 25787         
       
 25788                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 25789                 return return_type_symbol;
       
 25790                 
       
 25791             }
       
 25792             
       
 25793             
       
 25794             ERROR;
       
 25795         }
       
 25796         
       
 25797     }/*function_int_to_lreal*/
       
 25798     break;
       
 25799 
       
 25800 /****
       
 25801  *INT_TO_BYTE
       
 25802  */
       
 25803     case function_int_to_byte :
       
 25804     {
       
 25805         symbol_c *last_type_symbol = NULL;
       
 25806 
       
 25807         {
       
 25808             symbol_c *IN_type_symbol = param_data_type;
       
 25809             last_type_symbol = param_data_type;
       
 25810             
       
 25811             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25812             {
       
 25813         
       
 25814                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 25815                 return return_type_symbol;
       
 25816                 
       
 25817             }
       
 25818             
       
 25819             
       
 25820             ERROR;
       
 25821         }
       
 25822         
       
 25823     }/*function_int_to_byte*/
       
 25824     break;
       
 25825 
       
 25826 /****
       
 25827  *INT_TO_USINT
       
 25828  */
       
 25829     case function_int_to_usint :
       
 25830     {
       
 25831         symbol_c *last_type_symbol = NULL;
       
 25832 
       
 25833         {
       
 25834             symbol_c *IN_type_symbol = param_data_type;
       
 25835             last_type_symbol = param_data_type;
       
 25836             
       
 25837             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25838             {
       
 25839         
       
 25840                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 25841                 return return_type_symbol;
       
 25842                 
       
 25843             }
       
 25844             
       
 25845             
       
 25846             ERROR;
       
 25847         }
       
 25848         
       
 25849     }/*function_int_to_usint*/
       
 25850     break;
       
 25851 
       
 25852 /****
       
 25853  *INT_TO_ULINT
       
 25854  */
       
 25855     case function_int_to_ulint :
       
 25856     {
       
 25857         symbol_c *last_type_symbol = NULL;
       
 25858 
       
 25859         {
       
 25860             symbol_c *IN_type_symbol = param_data_type;
       
 25861             last_type_symbol = param_data_type;
       
 25862             
       
 25863             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25864             {
       
 25865         
       
 25866                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 25867                 return return_type_symbol;
       
 25868                 
       
 25869             }
       
 25870             
       
 25871             
       
 25872             ERROR;
       
 25873         }
       
 25874         
       
 25875     }/*function_int_to_ulint*/
       
 25876     break;
       
 25877 
       
 25878 /****
       
 25879  *INT_TO_BOOL
       
 25880  */
       
 25881     case function_int_to_bool :
       
 25882     {
       
 25883         symbol_c *last_type_symbol = NULL;
       
 25884 
       
 25885         {
       
 25886             symbol_c *IN_type_symbol = param_data_type;
       
 25887             last_type_symbol = param_data_type;
       
 25888             
       
 25889             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25890             {
       
 25891         
       
 25892                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25893                 return return_type_symbol;
       
 25894                 
       
 25895             }
       
 25896             
       
 25897             
       
 25898             ERROR;
       
 25899         }
       
 25900         
       
 25901     }/*function_int_to_bool*/
       
 25902     break;
       
 25903 
       
 25904 /****
       
 25905  *INT_TO_TIME
       
 25906  */
       
 25907     case function_int_to_time :
       
 25908     {
       
 25909         symbol_c *last_type_symbol = NULL;
       
 25910 
       
 25911         {
       
 25912             symbol_c *IN_type_symbol = param_data_type;
       
 25913             last_type_symbol = param_data_type;
       
 25914             
       
 25915             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 25916             {
       
 25917         
       
 25918                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 25919                 return return_type_symbol;
       
 25920                 
       
 25921             }
       
 25922             
       
 25923             
       
 25924             ERROR;
       
 25925         }
       
 25926         
       
 25927     }/*function_int_to_time*/
       
 25928     break;
       
 25929 
       
 25930 /****
       
 25931  *TRUNC
       
 25932  */
       
 25933     case function_trunc :
       
 25934     {
       
 25935         symbol_c *last_type_symbol = NULL;
       
 25936 
       
 25937         {
       
 25938             symbol_c *IN_type_symbol = param_data_type;
       
 25939             last_type_symbol = param_data_type;
       
 25940             
       
 25941             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 25942             {
       
 25943         
       
 25944                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 25945                 return return_type_symbol;
       
 25946                 
       
 25947             }
       
 25948             
       
 25949             
       
 25950             ERROR;
       
 25951         }
       
 25952         
       
 25953     }/*function_trunc*/
       
 25954     break;
       
 25955 
       
 25956 /****
       
 25957  *BCD_TO_UDINT
       
 25958  */
       
 25959     case function_bcd_to_udint :
       
 25960     {
       
 25961         symbol_c *last_type_symbol = NULL;
       
 25962 
       
 25963         {
       
 25964             symbol_c *IN_type_symbol = param_data_type;
       
 25965             last_type_symbol = param_data_type;
       
 25966             
       
 25967             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 25968             {
       
 25969         
       
 25970                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 25971                 return return_type_symbol;
       
 25972                 
       
 25973             }
       
 25974             
       
 25975             
       
 25976             ERROR;
       
 25977         }
       
 25978         
       
 25979     }/*function_bcd_to_udint*/
       
 25980     break;
       
 25981 
       
 25982 /****
       
 25983  *BCD_TO_UINT
       
 25984  */
       
 25985     case function_bcd_to_uint :
       
 25986     {
       
 25987         symbol_c *last_type_symbol = NULL;
       
 25988 
       
 25989         {
       
 25990             symbol_c *IN_type_symbol = param_data_type;
       
 25991             last_type_symbol = param_data_type;
       
 25992             
       
 25993             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 25994             {
       
 25995         
       
 25996                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 25997                 return return_type_symbol;
       
 25998                 
       
 25999             }
       
 26000             
       
 26001             
       
 26002             ERROR;
       
 26003         }
       
 26004         
       
 26005     }/*function_bcd_to_uint*/
       
 26006     break;
       
 26007 
       
 26008 /****
       
 26009  *BCD_TO_ULINT
       
 26010  */
       
 26011     case function_bcd_to_ulint :
       
 26012     {
       
 26013         symbol_c *last_type_symbol = NULL;
       
 26014 
       
 26015         {
       
 26016             symbol_c *IN_type_symbol = param_data_type;
       
 26017             last_type_symbol = param_data_type;
       
 26018             
       
 26019             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 26020             {
       
 26021         
       
 26022                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 26023                 return return_type_symbol;
       
 26024                 
       
 26025             }
       
 26026             
       
 26027             
       
 26028             ERROR;
       
 26029         }
       
 26030         
       
 26031     }/*function_bcd_to_ulint*/
       
 26032     break;
       
 26033 
       
 26034 /****
       
 26035  *BCD_TO_USINT
       
 26036  */
       
 26037     case function_bcd_to_usint :
       
 26038     {
       
 26039         symbol_c *last_type_symbol = NULL;
       
 26040 
       
 26041         {
       
 26042             symbol_c *IN_type_symbol = param_data_type;
       
 26043             last_type_symbol = param_data_type;
       
 26044             
       
 26045             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 26046             {
       
 26047         
       
 26048                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 26049                 return return_type_symbol;
       
 26050                 
       
 26051             }
       
 26052             
       
 26053             
       
 26054             ERROR;
       
 26055         }
       
 26056         
       
 26057     }/*function_bcd_to_usint*/
       
 26058     break;
       
 26059 
       
 26060 /****
       
 26061  *UDINT_TO_BCD
       
 26062  */
       
 26063     case function_udint_to_bcd :
       
 26064     {
       
 26065         symbol_c *last_type_symbol = NULL;
       
 26066 
       
 26067         {
       
 26068             symbol_c *IN_type_symbol = param_data_type;
       
 26069             last_type_symbol = param_data_type;
       
 26070             
       
 26071             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 26072             {
       
 26073         
       
 26074                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26075                 return return_type_symbol;
       
 26076                 
       
 26077             }
       
 26078             
       
 26079             
       
 26080             ERROR;
       
 26081         }
       
 26082         
       
 26083     }/*function_udint_to_bcd*/
       
 26084     break;
       
 26085 
       
 26086 /****
       
 26087  *UINT_TO_BCD
       
 26088  */
       
 26089     case function_uint_to_bcd :
       
 26090     {
       
 26091         symbol_c *last_type_symbol = NULL;
       
 26092 
       
 26093         {
       
 26094             symbol_c *IN_type_symbol = param_data_type;
       
 26095             last_type_symbol = param_data_type;
       
 26096             
       
 26097             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 26098             {
       
 26099         
       
 26100                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26101                 return return_type_symbol;
       
 26102                 
       
 26103             }
       
 26104             
       
 26105             
       
 26106             ERROR;
       
 26107         }
       
 26108         
       
 26109     }/*function_uint_to_bcd*/
       
 26110     break;
       
 26111 
       
 26112 /****
       
 26113  *USINT_TO_BCD
       
 26114  */
       
 26115     case function_usint_to_bcd :
       
 26116     {
       
 26117         symbol_c *last_type_symbol = NULL;
       
 26118 
       
 26119         {
       
 26120             symbol_c *IN_type_symbol = param_data_type;
       
 26121             last_type_symbol = param_data_type;
       
 26122             
       
 26123             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 26124             {
       
 26125         
       
 26126                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26127                 return return_type_symbol;
       
 26128                 
       
 26129             }
       
 26130             
       
 26131             
       
 26132             ERROR;
       
 26133         }
       
 26134         
       
 26135     }/*function_usint_to_bcd*/
       
 26136     break;
       
 26137 
       
 26138 /****
       
 26139  *ULINT_TO_BCD
       
 26140  */
       
 26141     case function_ulint_to_bcd :
       
 26142     {
       
 26143         symbol_c *last_type_symbol = NULL;
       
 26144 
       
 26145         {
       
 26146             symbol_c *IN_type_symbol = param_data_type;
       
 26147             last_type_symbol = param_data_type;
       
 26148             
       
 26149             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 26150             {
       
 26151         
       
 26152                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 26153                 return return_type_symbol;
       
 26154                 
       
 26155             }
       
 26156             
       
 26157             
       
 26158             ERROR;
       
 26159         }
       
 26160         
       
 26161     }/*function_ulint_to_bcd*/
       
 26162     break;
       
 26163 
       
 26164 /****
       
 26165  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 26166  */
       
 26167     case function_date_and_time_to_time_of_day :
       
 26168     {
       
 26169         symbol_c *last_type_symbol = NULL;
       
 26170 
       
 26171         {
       
 26172             symbol_c *IN_type_symbol = param_data_type;
       
 26173             last_type_symbol = param_data_type;
       
 26174             
       
 26175             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 26176             {
       
 26177         
       
 26178                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 26179                 return return_type_symbol;
       
 26180                 
       
 26181             }
       
 26182             
       
 26183             
       
 26184             ERROR;
       
 26185         }
       
 26186         
       
 26187     }/*function_date_and_time_to_time_of_day*/
       
 26188     break;
       
 26189 
       
 26190 /****
       
 26191  *DATE_AND_TIME_TO_DATE
       
 26192  */
       
 26193     case function_date_and_time_to_date :
       
 26194     {
       
 26195         symbol_c *last_type_symbol = NULL;
       
 26196 
       
 26197         {
       
 26198             symbol_c *IN_type_symbol = param_data_type;
       
 26199             last_type_symbol = param_data_type;
       
 26200             
       
 26201             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 26202             {
       
 26203         
       
 26204                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 26205                 return return_type_symbol;
       
 26206                 
       
 26207             }
       
 26208             
       
 26209             
       
 26210             ERROR;
       
 26211         }
       
 26212         
       
 26213     }/*function_date_and_time_to_date*/
       
 26214     break;
       
 26215 
       
 26216 /****
       
 26217  *ABS
       
 26218  */
       
 26219     case function_abs :
       
 26220     {
       
 26221         symbol_c *last_type_symbol = NULL;
       
 26222 
       
 26223         {
       
 26224             symbol_c *IN_type_symbol = param_data_type;
       
 26225             last_type_symbol = param_data_type;
       
 26226             
       
 26227             if(IN_type_symbol == NULL || search_expression_type->is_num_type(IN_type_symbol))
       
 26228             {
       
 26229         
       
 26230                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26231                 return return_type_symbol;
       
 26232                 
       
 26233             }
       
 26234             
       
 26235             
       
 26236             ERROR;
       
 26237         }
       
 26238         
       
 26239     }/*function_abs*/
       
 26240     break;
       
 26241 
       
 26242 /****
       
 26243  *SQRT
       
 26244  */
       
 26245     case function_sqrt :
       
 26246     {
       
 26247         symbol_c *last_type_symbol = NULL;
       
 26248 
       
 26249         {
       
 26250             symbol_c *IN_type_symbol = param_data_type;
       
 26251             last_type_symbol = param_data_type;
       
 26252             
       
 26253             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26254             {
       
 26255         
       
 26256                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26257                 return return_type_symbol;
       
 26258                 
       
 26259             }
       
 26260             
       
 26261             
       
 26262             ERROR;
       
 26263         }
       
 26264         
       
 26265     }/*function_sqrt*/
       
 26266     break;
       
 26267 
       
 26268 /****
       
 26269  *LN
       
 26270  */
       
 26271     case function_ln :
       
 26272     {
       
 26273         symbol_c *last_type_symbol = NULL;
       
 26274 
       
 26275         {
       
 26276             symbol_c *IN_type_symbol = param_data_type;
       
 26277             last_type_symbol = param_data_type;
       
 26278             
       
 26279             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26280             {
       
 26281         
       
 26282                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26283                 return return_type_symbol;
       
 26284                 
       
 26285             }
       
 26286             
       
 26287             
       
 26288             ERROR;
       
 26289         }
       
 26290         
       
 26291     }/*function_ln*/
       
 26292     break;
       
 26293 
       
 26294 /****
       
 26295  *LOG
       
 26296  */
       
 26297     case function_log :
       
 26298     {
       
 26299         symbol_c *last_type_symbol = NULL;
       
 26300 
       
 26301         {
       
 26302             symbol_c *IN_type_symbol = param_data_type;
       
 26303             last_type_symbol = param_data_type;
       
 26304             
       
 26305             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26306             {
       
 26307         
       
 26308                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26309                 return return_type_symbol;
       
 26310                 
       
 26311             }
       
 26312             
       
 26313             
       
 26314             ERROR;
       
 26315         }
       
 26316         
       
 26317     }/*function_log*/
       
 26318     break;
       
 26319 
       
 26320 /****
       
 26321  *EXP
       
 26322  */
       
 26323     case function_exp :
       
 26324     {
       
 26325         symbol_c *last_type_symbol = NULL;
       
 26326 
       
 26327         {
       
 26328             symbol_c *IN_type_symbol = param_data_type;
       
 26329             last_type_symbol = param_data_type;
       
 26330             
       
 26331             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26332             {
       
 26333         
       
 26334                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26335                 return return_type_symbol;
       
 26336                 
       
 26337             }
       
 26338             
       
 26339             
       
 26340             ERROR;
       
 26341         }
       
 26342         
       
 26343     }/*function_exp*/
       
 26344     break;
       
 26345 
       
 26346 /****
       
 26347  *SIN
       
 26348  */
       
 26349     case function_sin :
       
 26350     {
       
 26351         symbol_c *last_type_symbol = NULL;
       
 26352 
       
 26353         {
       
 26354             symbol_c *IN_type_symbol = param_data_type;
       
 26355             last_type_symbol = param_data_type;
       
 26356             
       
 26357             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26358             {
       
 26359         
       
 26360                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26361                 return return_type_symbol;
       
 26362                 
       
 26363             }
       
 26364             
       
 26365             
       
 26366             ERROR;
       
 26367         }
       
 26368         
       
 26369     }/*function_sin*/
       
 26370     break;
       
 26371 
       
 26372 /****
       
 26373  *COS
       
 26374  */
       
 26375     case function_cos :
       
 26376     {
       
 26377         symbol_c *last_type_symbol = NULL;
       
 26378 
       
 26379         {
       
 26380             symbol_c *IN_type_symbol = param_data_type;
       
 26381             last_type_symbol = param_data_type;
       
 26382             
       
 26383             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26384             {
       
 26385         
       
 26386                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26387                 return return_type_symbol;
       
 26388                 
       
 26389             }
       
 26390             
       
 26391             
       
 26392             ERROR;
       
 26393         }
       
 26394         
       
 26395     }/*function_cos*/
       
 26396     break;
       
 26397 
       
 26398 /****
       
 26399  *TAN
       
 26400  */
       
 26401     case function_tan :
       
 26402     {
       
 26403         symbol_c *last_type_symbol = NULL;
       
 26404 
       
 26405         {
       
 26406             symbol_c *IN_type_symbol = param_data_type;
       
 26407             last_type_symbol = param_data_type;
       
 26408             
       
 26409             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26410             {
       
 26411         
       
 26412                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26413                 return return_type_symbol;
       
 26414                 
       
 26415             }
       
 26416             
       
 26417             
       
 26418             ERROR;
       
 26419         }
       
 26420         
       
 26421     }/*function_tan*/
       
 26422     break;
       
 26423 
       
 26424 /****
       
 26425  *ASIN
       
 26426  */
       
 26427     case function_asin :
       
 26428     {
       
 26429         symbol_c *last_type_symbol = NULL;
       
 26430 
       
 26431         {
       
 26432             symbol_c *IN_type_symbol = param_data_type;
       
 26433             last_type_symbol = param_data_type;
       
 26434             
       
 26435             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26436             {
       
 26437         
       
 26438                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26439                 return return_type_symbol;
       
 26440                 
       
 26441             }
       
 26442             
       
 26443             
       
 26444             ERROR;
       
 26445         }
       
 26446         
       
 26447     }/*function_asin*/
       
 26448     break;
       
 26449 
       
 26450 /****
       
 26451  *ACOS
       
 26452  */
       
 26453     case function_acos :
       
 26454     {
       
 26455         symbol_c *last_type_symbol = NULL;
       
 26456 
       
 26457         {
       
 26458             symbol_c *IN_type_symbol = param_data_type;
       
 26459             last_type_symbol = param_data_type;
       
 26460             
       
 26461             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26462             {
       
 26463         
       
 26464                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26465                 return return_type_symbol;
       
 26466                 
       
 26467             }
       
 26468             
       
 26469             
       
 26470             ERROR;
       
 26471         }
       
 26472         
       
 26473     }/*function_acos*/
       
 26474     break;
       
 26475 
       
 26476 /****
       
 26477  *ATAN
       
 26478  */
       
 26479     case function_atan :
       
 26480     {
       
 26481         symbol_c *last_type_symbol = NULL;
       
 26482 
       
 26483         {
       
 26484             symbol_c *IN_type_symbol = param_data_type;
       
 26485             last_type_symbol = param_data_type;
       
 26486             
       
 26487             if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol))
       
 26488             {
       
 26489         
       
 26490                 symbol_c * return_type_symbol = IN_type_symbol;
       
 26491                 return return_type_symbol;
       
 26492                 
       
 26493             }
       
 26494             
       
 26495             
       
 26496             ERROR;
       
 26497         }
       
 26498         
       
 26499     }/*function_atan*/
       
 26500     break;
       
 26501 
       
 26502 /****
       
 26503  *ADD
       
 26504  */
       
 26505     case function_add :
       
 26506     {
       
 26507         symbol_c *last_type_symbol = NULL;
       
 26508 
       
 26509         {
       
 26510             symbol_c *IN1_type_symbol = param_data_type;
       
 26511             last_type_symbol = param_data_type;
       
 26512             
       
 26513             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 26514             {
       
 26515         
       
 26516                 {
       
 26517                     identifier_c param_name("IN2");
       
 26518                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26519                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26520                     symbol_c *IN2_type_symbol = NULL;
       
 26521                     
       
 26522                     /* Get the value from a foo(<param_value>) style call */
       
 26523                     if (IN2_param_value == NULL)
       
 26524                       IN2_param_value = function_call_param_iterator.next();
       
 26525                     if (IN2_param_value != NULL) {
       
 26526                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26527                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26528                     }
       
 26529                     
       
 26530                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 26531                     {
       
 26532                 
       
 26533                         symbol_c * return_type_symbol = last_type_symbol;
       
 26534                         return return_type_symbol;
       
 26535                         
       
 26536                     }
       
 26537                     
       
 26538                     
       
 26539                     ERROR;
       
 26540                 }
       
 26541                 
       
 26542             }
       
 26543             
       
 26544             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 26545             {
       
 26546         
       
 26547                 {
       
 26548                     identifier_c param_name("IN2");
       
 26549                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26550                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26551                     symbol_c *IN2_type_symbol = NULL;
       
 26552                     
       
 26553                     /* Get the value from a foo(<param_value>) style call */
       
 26554                     if (IN2_param_value == NULL)
       
 26555                       IN2_param_value = function_call_param_iterator.next();
       
 26556                     if (IN2_param_value != NULL) {
       
 26557                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26558                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26559                     }
       
 26560                     
       
 26561                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26562                     {
       
 26563                 
       
 26564                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 26565                         return return_type_symbol;
       
 26566                         
       
 26567                     }
       
 26568                     
       
 26569                     
       
 26570                     ERROR;
       
 26571                 }
       
 26572                 
       
 26573             }
       
 26574             
       
 26575             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 26576             {
       
 26577         
       
 26578                 {
       
 26579                     identifier_c param_name("IN2");
       
 26580                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26581                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26582                     symbol_c *IN2_type_symbol = NULL;
       
 26583                     
       
 26584                     /* Get the value from a foo(<param_value>) style call */
       
 26585                     if (IN2_param_value == NULL)
       
 26586                       IN2_param_value = function_call_param_iterator.next();
       
 26587                     if (IN2_param_value != NULL) {
       
 26588                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26589                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26590                     }
       
 26591                     
       
 26592                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26593                     {
       
 26594                 
       
 26595                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 26596                         return return_type_symbol;
       
 26597                         
       
 26598                     }
       
 26599                     
       
 26600                     
       
 26601                     ERROR;
       
 26602                 }
       
 26603                 
       
 26604             }
       
 26605             
       
 26606             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26607             {
       
 26608         
       
 26609                 {
       
 26610                     identifier_c param_name("IN2");
       
 26611                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26612                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26613                     symbol_c *IN2_type_symbol = NULL;
       
 26614                     
       
 26615                     /* Get the value from a foo(<param_value>) style call */
       
 26616                     if (IN2_param_value == NULL)
       
 26617                       IN2_param_value = function_call_param_iterator.next();
       
 26618                     if (IN2_param_value != NULL) {
       
 26619                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26620                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26621                     }
       
 26622                     
       
 26623                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26624                     {
       
 26625                 
       
 26626                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 26627                         return return_type_symbol;
       
 26628                         
       
 26629                     }
       
 26630                     
       
 26631                     
       
 26632                     ERROR;
       
 26633                 }
       
 26634                 
       
 26635             }
       
 26636             
       
 26637             
       
 26638             ERROR;
       
 26639         }
       
 26640         
       
 26641     }/*function_add*/
       
 26642     break;
       
 26643 
       
 26644 /****
       
 26645  *MUL
       
 26646  */
       
 26647     case function_mul :
       
 26648     {
       
 26649         symbol_c *last_type_symbol = NULL;
       
 26650 
       
 26651         {
       
 26652             symbol_c *IN1_type_symbol = param_data_type;
       
 26653             last_type_symbol = param_data_type;
       
 26654             
       
 26655             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 26656             {
       
 26657         
       
 26658                 {
       
 26659                     identifier_c param_name("IN2");
       
 26660                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26661                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26662                     symbol_c *IN2_type_symbol = NULL;
       
 26663                     
       
 26664                     /* Get the value from a foo(<param_value>) style call */
       
 26665                     if (IN2_param_value == NULL)
       
 26666                       IN2_param_value = function_call_param_iterator.next();
       
 26667                     if (IN2_param_value != NULL) {
       
 26668                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26669                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26670                     }
       
 26671                     
       
 26672                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 26673                     {
       
 26674                 
       
 26675                         symbol_c * return_type_symbol = last_type_symbol;
       
 26676                         return return_type_symbol;
       
 26677                         
       
 26678                     }
       
 26679                     
       
 26680                     
       
 26681                     ERROR;
       
 26682                 }
       
 26683                 
       
 26684             }
       
 26685             
       
 26686             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26687             {
       
 26688         
       
 26689                 {
       
 26690                     identifier_c param_name("IN2");
       
 26691                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26692                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26693                     symbol_c *IN2_type_symbol = NULL;
       
 26694                     
       
 26695                     /* Get the value from a foo(<param_value>) style call */
       
 26696                     if (IN2_param_value == NULL)
       
 26697                       IN2_param_value = function_call_param_iterator.next();
       
 26698                     if (IN2_param_value != NULL) {
       
 26699                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26700                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26701                     }
       
 26702                     
       
 26703                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 26704                     {
       
 26705                 
       
 26706                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 26707                         return return_type_symbol;
       
 26708                         
       
 26709                     }
       
 26710                     
       
 26711                     
       
 26712                     ERROR;
       
 26713                 }
       
 26714                 
       
 26715             }
       
 26716             
       
 26717             
       
 26718             ERROR;
       
 26719         }
       
 26720         
       
 26721     }/*function_mul*/
       
 26722     break;
       
 26723 
       
 26724 /****
       
 26725  *SUB
       
 26726  */
       
 26727     case function_sub :
       
 26728     {
       
 26729         symbol_c *last_type_symbol = NULL;
       
 26730 
       
 26731         {
       
 26732             symbol_c *IN1_type_symbol = param_data_type;
       
 26733             last_type_symbol = param_data_type;
       
 26734             
       
 26735             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 26736             {
       
 26737         
       
 26738                 {
       
 26739                     identifier_c param_name("IN2");
       
 26740                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26741                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26742                     symbol_c *IN2_type_symbol = NULL;
       
 26743                     
       
 26744                     /* Get the value from a foo(<param_value>) style call */
       
 26745                     if (IN2_param_value == NULL)
       
 26746                       IN2_param_value = function_call_param_iterator.next();
       
 26747                     if (IN2_param_value != NULL) {
       
 26748                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26749                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26750                     }
       
 26751                     
       
 26752                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 26753                     {
       
 26754                 
       
 26755                         symbol_c * return_type_symbol = last_type_symbol;
       
 26756                         return return_type_symbol;
       
 26757                         
       
 26758                     }
       
 26759                     
       
 26760                     
       
 26761                     ERROR;
       
 26762                 }
       
 26763                 
       
 26764             }
       
 26765             
       
 26766             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 26767             {
       
 26768         
       
 26769                 {
       
 26770                     identifier_c param_name("IN2");
       
 26771                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26772                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26773                     symbol_c *IN2_type_symbol = NULL;
       
 26774                     
       
 26775                     /* Get the value from a foo(<param_value>) style call */
       
 26776                     if (IN2_param_value == NULL)
       
 26777                       IN2_param_value = function_call_param_iterator.next();
       
 26778                     if (IN2_param_value != NULL) {
       
 26779                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26780                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26781                     }
       
 26782                     
       
 26783                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 26784                     {
       
 26785                 
       
 26786                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 26787                         return return_type_symbol;
       
 26788                         
       
 26789                     }
       
 26790                     
       
 26791                     
       
 26792                     ERROR;
       
 26793                 }
       
 26794                 
       
 26795             }
       
 26796             
       
 26797             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 26798             {
       
 26799         
       
 26800                 {
       
 26801                     identifier_c param_name("IN2");
       
 26802                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26803                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26804                     symbol_c *IN2_type_symbol = NULL;
       
 26805                     
       
 26806                     /* Get the value from a foo(<param_value>) style call */
       
 26807                     if (IN2_param_value == NULL)
       
 26808                       IN2_param_value = function_call_param_iterator.next();
       
 26809                     if (IN2_param_value != NULL) {
       
 26810                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26811                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26812                     }
       
 26813                     
       
 26814                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 26815                     {
       
 26816                 
       
 26817                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 26818                         return return_type_symbol;
       
 26819                         
       
 26820                     }
       
 26821                     
       
 26822                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26823                     {
       
 26824                 
       
 26825                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 26826                         return return_type_symbol;
       
 26827                         
       
 26828                     }
       
 26829                     
       
 26830                     
       
 26831                     ERROR;
       
 26832                 }
       
 26833                 
       
 26834             }
       
 26835             
       
 26836             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 26837             {
       
 26838         
       
 26839                 {
       
 26840                     identifier_c param_name("IN2");
       
 26841                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26842                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26843                     symbol_c *IN2_type_symbol = NULL;
       
 26844                     
       
 26845                     /* Get the value from a foo(<param_value>) style call */
       
 26846                     if (IN2_param_value == NULL)
       
 26847                       IN2_param_value = function_call_param_iterator.next();
       
 26848                     if (IN2_param_value != NULL) {
       
 26849                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26850                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26851                     }
       
 26852                     
       
 26853                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 26854                     {
       
 26855                 
       
 26856                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 26857                         return return_type_symbol;
       
 26858                         
       
 26859                     }
       
 26860                     
       
 26861                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26862                     {
       
 26863                 
       
 26864                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 26865                         return return_type_symbol;
       
 26866                         
       
 26867                     }
       
 26868                     
       
 26869                     
       
 26870                     ERROR;
       
 26871                 }
       
 26872                 
       
 26873             }
       
 26874             
       
 26875             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26876             {
       
 26877         
       
 26878                 {
       
 26879                     identifier_c param_name("IN2");
       
 26880                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26881                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26882                     symbol_c *IN2_type_symbol = NULL;
       
 26883                     
       
 26884                     /* Get the value from a foo(<param_value>) style call */
       
 26885                     if (IN2_param_value == NULL)
       
 26886                       IN2_param_value = function_call_param_iterator.next();
       
 26887                     if (IN2_param_value != NULL) {
       
 26888                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26889                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26890                     }
       
 26891                     
       
 26892                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26893                     {
       
 26894                 
       
 26895                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 26896                         return return_type_symbol;
       
 26897                         
       
 26898                     }
       
 26899                     
       
 26900                     
       
 26901                     ERROR;
       
 26902                 }
       
 26903                 
       
 26904             }
       
 26905             
       
 26906             
       
 26907             ERROR;
       
 26908         }
       
 26909         
       
 26910     }/*function_sub*/
       
 26911     break;
       
 26912 
       
 26913 /****
       
 26914  *DIV
       
 26915  */
       
 26916     case function_div :
       
 26917     {
       
 26918         symbol_c *last_type_symbol = NULL;
       
 26919 
       
 26920         {
       
 26921             symbol_c *IN1_type_symbol = param_data_type;
       
 26922             last_type_symbol = param_data_type;
       
 26923             
       
 26924             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 26925             {
       
 26926         
       
 26927                 {
       
 26928                     identifier_c param_name("IN2");
       
 26929                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26930                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26931                     symbol_c *IN2_type_symbol = NULL;
       
 26932                     
       
 26933                     /* Get the value from a foo(<param_value>) style call */
       
 26934                     if (IN2_param_value == NULL)
       
 26935                       IN2_param_value = function_call_param_iterator.next();
       
 26936                     if (IN2_param_value != NULL) {
       
 26937                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26938                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26939                     }
       
 26940                     
       
 26941                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 26942                     {
       
 26943                 
       
 26944                         symbol_c * return_type_symbol = last_type_symbol;
       
 26945                         return return_type_symbol;
       
 26946                         
       
 26947                     }
       
 26948                     
       
 26949                     
       
 26950                     ERROR;
       
 26951                 }
       
 26952                 
       
 26953             }
       
 26954             
       
 26955             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 26956             {
       
 26957         
       
 26958                 {
       
 26959                     identifier_c param_name("IN2");
       
 26960                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26961                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26962                     symbol_c *IN2_type_symbol = NULL;
       
 26963                     
       
 26964                     /* Get the value from a foo(<param_value>) style call */
       
 26965                     if (IN2_param_value == NULL)
       
 26966                       IN2_param_value = function_call_param_iterator.next();
       
 26967                     if (IN2_param_value != NULL) {
       
 26968                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26969                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 26970                     }
       
 26971                     
       
 26972                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 26973                     {
       
 26974                 
       
 26975                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 26976                         return return_type_symbol;
       
 26977                         
       
 26978                     }
       
 26979                     
       
 26980                     
       
 26981                     ERROR;
       
 26982                 }
       
 26983                 
       
 26984             }
       
 26985             
       
 26986             
       
 26987             ERROR;
       
 26988         }
       
 26989         
       
 26990     }/*function_div*/
       
 26991     break;
       
 26992 
       
 26993 /****
       
 26994  *MOD
       
 26995  */
       
 26996     case function_mod :
       
 26997     {
       
 26998         symbol_c *last_type_symbol = NULL;
       
 26999 
       
 27000         {
       
 27001             symbol_c *IN1_type_symbol = param_data_type;
       
 27002             last_type_symbol = param_data_type;
       
 27003             
       
 27004             if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol))
       
 27005             {
       
 27006         
       
 27007                 {
       
 27008                     identifier_c param_name("IN2");
       
 27009                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27010                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27011                     symbol_c *IN2_type_symbol = NULL;
       
 27012                     
       
 27013                     /* Get the value from a foo(<param_value>) style call */
       
 27014                     if (IN2_param_value == NULL)
       
 27015                       IN2_param_value = function_call_param_iterator.next();
       
 27016                     if (IN2_param_value != NULL) {
       
 27017                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27018                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27019                     }
       
 27020                     
       
 27021                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 27022                     {
       
 27023                 
       
 27024                         symbol_c * return_type_symbol = last_type_symbol;
       
 27025                         return return_type_symbol;
       
 27026                         
       
 27027                     }
       
 27028                     
       
 27029                     
       
 27030                     ERROR;
       
 27031                 }
       
 27032                 
       
 27033             }
       
 27034             
       
 27035             
       
 27036             ERROR;
       
 27037         }
       
 27038         
       
 27039     }/*function_mod*/
       
 27040     break;
       
 27041 
       
 27042 /****
       
 27043  *EXPT
       
 27044  */
       
 27045     case function_expt :
       
 27046     {
       
 27047         symbol_c *last_type_symbol = NULL;
       
 27048 
       
 27049         {
       
 27050             symbol_c *IN1_type_symbol = param_data_type;
       
 27051             last_type_symbol = param_data_type;
       
 27052             
       
 27053             if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol))
       
 27054             {
       
 27055         
       
 27056                 {
       
 27057                     identifier_c param_name("IN2");
       
 27058                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27059                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27060                     symbol_c *IN2_type_symbol = NULL;
       
 27061                     
       
 27062                     /* Get the value from a foo(<param_value>) style call */
       
 27063                     if (IN2_param_value == NULL)
       
 27064                       IN2_param_value = function_call_param_iterator.next();
       
 27065                     if (IN2_param_value != NULL) {
       
 27066                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27067                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27068                     }
       
 27069                     
       
 27070                     if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol))
       
 27071                     {
       
 27072                 
       
 27073                         symbol_c * return_type_symbol = last_type_symbol;
       
 27074                         return return_type_symbol;
       
 27075                         
       
 27076                     }
       
 27077                     
       
 27078                     
       
 27079                     ERROR;
       
 27080                 }
       
 27081                 
       
 27082             }
       
 27083             
       
 27084             
       
 27085             ERROR;
       
 27086         }
       
 27087         
       
 27088     }/*function_expt*/
       
 27089     break;
       
 27090 
       
 27091 /****
       
 27092  *MOVE
       
 27093  */
       
 27094     case function_move :
       
 27095     {
       
 27096         symbol_c *last_type_symbol = NULL;
       
 27097 
       
 27098         {
       
 27099             symbol_c *IN_type_symbol = param_data_type;
       
 27100             last_type_symbol = param_data_type;
       
 27101             
       
 27102             
       
 27103             {
       
 27104         
       
 27105                 symbol_c * return_type_symbol = last_type_symbol;
       
 27106                 return return_type_symbol;
       
 27107                 
       
 27108             }
       
 27109             
       
 27110             
       
 27111             ERROR;
       
 27112         }
       
 27113         
       
 27114     }/*function_move*/
       
 27115     break;
       
 27116 
       
 27117 /****
       
 27118  *SHL
       
 27119  */
       
 27120     case function_shl :
       
 27121     {
       
 27122         symbol_c *last_type_symbol = NULL;
       
 27123 
       
 27124         {
       
 27125             symbol_c *IN_type_symbol = param_data_type;
       
 27126             last_type_symbol = param_data_type;
       
 27127             
       
 27128             if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
       
 27129             {
       
 27130         
       
 27131                 {
       
 27132                     identifier_c param_name("N");
       
 27133                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27134                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 27135                     symbol_c *N_type_symbol = NULL;
       
 27136                     
       
 27137                     /* Get the value from a foo(<param_value>) style call */
       
 27138                     if (N_param_value == NULL)
       
 27139                       N_param_value = function_call_param_iterator.next();
       
 27140                     if (N_param_value != NULL) {
       
 27141                       N_type_symbol = search_expression_type->get_type(N_param_value);
       
 27142                       last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 27143                     }
       
 27144                     
       
 27145                     if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
       
 27146                     {
       
 27147                 
       
 27148                         symbol_c * return_type_symbol = IN_type_symbol;
       
 27149                         return return_type_symbol;
       
 27150                         
       
 27151                     }
       
 27152                     
       
 27153                     
       
 27154                     ERROR;
       
 27155                 }
       
 27156                 
       
 27157             }
       
 27158             
       
 27159             
       
 27160             ERROR;
       
 27161         }
       
 27162         
       
 27163     }/*function_shl*/
       
 27164     break;
       
 27165 
       
 27166 /****
       
 27167  *SHR
       
 27168  */
       
 27169     case function_shr :
       
 27170     {
       
 27171         symbol_c *last_type_symbol = NULL;
       
 27172 
       
 27173         {
       
 27174             symbol_c *IN_type_symbol = param_data_type;
       
 27175             last_type_symbol = param_data_type;
       
 27176             
       
 27177             if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
       
 27178             {
       
 27179         
       
 27180                 {
       
 27181                     identifier_c param_name("N");
       
 27182                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27183                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 27184                     symbol_c *N_type_symbol = NULL;
       
 27185                     
       
 27186                     /* Get the value from a foo(<param_value>) style call */
       
 27187                     if (N_param_value == NULL)
       
 27188                       N_param_value = function_call_param_iterator.next();
       
 27189                     if (N_param_value != NULL) {
       
 27190                       N_type_symbol = search_expression_type->get_type(N_param_value);
       
 27191                       last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 27192                     }
       
 27193                     
       
 27194                     if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
       
 27195                     {
       
 27196                 
       
 27197                         symbol_c * return_type_symbol = IN_type_symbol;
       
 27198                         return return_type_symbol;
       
 27199                         
       
 27200                     }
       
 27201                     
       
 27202                     
       
 27203                     ERROR;
       
 27204                 }
       
 27205                 
       
 27206             }
       
 27207             
       
 27208             
       
 27209             ERROR;
       
 27210         }
       
 27211         
       
 27212     }/*function_shr*/
       
 27213     break;
       
 27214 
       
 27215 /****
       
 27216  *ROR
       
 27217  */
       
 27218     case function_ror :
       
 27219     {
       
 27220         symbol_c *last_type_symbol = NULL;
       
 27221 
       
 27222         {
       
 27223             symbol_c *IN_type_symbol = param_data_type;
       
 27224             last_type_symbol = param_data_type;
       
 27225             
       
 27226             if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
       
 27227             {
       
 27228         
       
 27229                 {
       
 27230                     identifier_c param_name("N");
       
 27231                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27232                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 27233                     symbol_c *N_type_symbol = NULL;
       
 27234                     
       
 27235                     /* Get the value from a foo(<param_value>) style call */
       
 27236                     if (N_param_value == NULL)
       
 27237                       N_param_value = function_call_param_iterator.next();
       
 27238                     if (N_param_value != NULL) {
       
 27239                       N_type_symbol = search_expression_type->get_type(N_param_value);
       
 27240                       last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 27241                     }
       
 27242                     
       
 27243                     if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
       
 27244                     {
       
 27245                 
       
 27246                         symbol_c * return_type_symbol = IN_type_symbol;
       
 27247                         return return_type_symbol;
       
 27248                         
       
 27249                     }
       
 27250                     
       
 27251                     
       
 27252                     ERROR;
       
 27253                 }
       
 27254                 
       
 27255             }
       
 27256             
       
 27257             
       
 27258             ERROR;
       
 27259         }
       
 27260         
       
 27261     }/*function_ror*/
       
 27262     break;
       
 27263 
       
 27264 /****
       
 27265  *ROL
       
 27266  */
       
 27267     case function_rol :
       
 27268     {
       
 27269         symbol_c *last_type_symbol = NULL;
       
 27270 
       
 27271         {
       
 27272             symbol_c *IN_type_symbol = param_data_type;
       
 27273             last_type_symbol = param_data_type;
       
 27274             
       
 27275             if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol))
       
 27276             {
       
 27277         
       
 27278                 {
       
 27279                     identifier_c param_name("N");
       
 27280                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27281                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 27282                     symbol_c *N_type_symbol = NULL;
       
 27283                     
       
 27284                     /* Get the value from a foo(<param_value>) style call */
       
 27285                     if (N_param_value == NULL)
       
 27286                       N_param_value = function_call_param_iterator.next();
       
 27287                     if (N_param_value != NULL) {
       
 27288                       N_type_symbol = search_expression_type->get_type(N_param_value);
       
 27289                       last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ;
       
 27290                     }
       
 27291                     
       
 27292                     if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol))
       
 27293                     {
       
 27294                 
       
 27295                         symbol_c * return_type_symbol = IN_type_symbol;
       
 27296                         return return_type_symbol;
       
 27297                         
       
 27298                     }
       
 27299                     
       
 27300                     
       
 27301                     ERROR;
       
 27302                 }
       
 27303                 
       
 27304             }
       
 27305             
       
 27306             
       
 27307             ERROR;
       
 27308         }
       
 27309         
       
 27310     }/*function_rol*/
       
 27311     break;
       
 27312 
       
 27313 /****
       
 27314  *AND
       
 27315  */
       
 27316     case function_and :
       
 27317     {
       
 27318         symbol_c *last_type_symbol = NULL;
       
 27319 
       
 27320         {
       
 27321             symbol_c *IN1_type_symbol = param_data_type;
       
 27322             last_type_symbol = param_data_type;
       
 27323             
       
 27324             if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
       
 27325             {
       
 27326         
       
 27327                 {
       
 27328                     identifier_c param_name("IN2");
       
 27329                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27330                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27331                     symbol_c *IN2_type_symbol = NULL;
       
 27332                     
       
 27333                     /* Get the value from a foo(<param_value>) style call */
       
 27334                     if (IN2_param_value == NULL)
       
 27335                       IN2_param_value = function_call_param_iterator.next();
       
 27336                     if (IN2_param_value != NULL) {
       
 27337                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27338                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27339                     }
       
 27340                     
       
 27341                     if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
       
 27342                     {
       
 27343                 
       
 27344                         symbol_c * return_type_symbol = last_type_symbol;
       
 27345                         return return_type_symbol;
       
 27346                         
       
 27347                     }
       
 27348                     
       
 27349                     
       
 27350                     ERROR;
       
 27351                 }
       
 27352                 
       
 27353             }
       
 27354             
       
 27355             
       
 27356             ERROR;
       
 27357         }
       
 27358         
       
 27359     }/*function_and*/
       
 27360     break;
       
 27361 
       
 27362 /****
       
 27363  *OR
       
 27364  */
       
 27365     case function_or :
       
 27366     {
       
 27367         symbol_c *last_type_symbol = NULL;
       
 27368 
       
 27369         {
       
 27370             symbol_c *IN1_type_symbol = param_data_type;
       
 27371             last_type_symbol = param_data_type;
       
 27372             
       
 27373             if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
       
 27374             {
       
 27375         
       
 27376                 {
       
 27377                     identifier_c param_name("IN2");
       
 27378                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27379                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27380                     symbol_c *IN2_type_symbol = NULL;
       
 27381                     
       
 27382                     /* Get the value from a foo(<param_value>) style call */
       
 27383                     if (IN2_param_value == NULL)
       
 27384                       IN2_param_value = function_call_param_iterator.next();
       
 27385                     if (IN2_param_value != NULL) {
       
 27386                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27387                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27388                     }
       
 27389                     
       
 27390                     if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
       
 27391                     {
       
 27392                 
       
 27393                         symbol_c * return_type_symbol = last_type_symbol;
       
 27394                         return return_type_symbol;
       
 27395                         
       
 27396                     }
       
 27397                     
       
 27398                     
       
 27399                     ERROR;
       
 27400                 }
       
 27401                 
       
 27402             }
       
 27403             
       
 27404             
       
 27405             ERROR;
       
 27406         }
       
 27407         
       
 27408     }/*function_or*/
       
 27409     break;
       
 27410 
       
 27411 /****
       
 27412  *XOR
       
 27413  */
       
 27414     case function_xor :
       
 27415     {
       
 27416         symbol_c *last_type_symbol = NULL;
       
 27417 
       
 27418         {
       
 27419             symbol_c *IN1_type_symbol = param_data_type;
       
 27420             last_type_symbol = param_data_type;
       
 27421             
       
 27422             if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol))
       
 27423             {
       
 27424         
       
 27425                 {
       
 27426                     identifier_c param_name("IN2");
       
 27427                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27428                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27429                     symbol_c *IN2_type_symbol = NULL;
       
 27430                     
       
 27431                     /* Get the value from a foo(<param_value>) style call */
       
 27432                     if (IN2_param_value == NULL)
       
 27433                       IN2_param_value = function_call_param_iterator.next();
       
 27434                     if (IN2_param_value != NULL) {
       
 27435                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27436                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27437                     }
       
 27438                     
       
 27439                     if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol))
       
 27440                     {
       
 27441                 
       
 27442                         symbol_c * return_type_symbol = last_type_symbol;
       
 27443                         return return_type_symbol;
       
 27444                         
       
 27445                     }
       
 27446                     
       
 27447                     
       
 27448                     ERROR;
       
 27449                 }
       
 27450                 
       
 27451             }
       
 27452             
       
 27453             
       
 27454             ERROR;
       
 27455         }
       
 27456         
       
 27457     }/*function_xor*/
       
 27458     break;
       
 27459 
       
 27460 /****
       
 27461  *NOT
       
 27462  */
       
 27463     case function_not :
       
 27464     {
       
 27465         symbol_c *last_type_symbol = NULL;
       
 27466 
       
 27467         {
       
 27468             symbol_c *IN_type_symbol = param_data_type;
       
 27469             last_type_symbol = param_data_type;
       
 27470             
       
 27471             if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol))
       
 27472             {
       
 27473         
       
 27474                 symbol_c * return_type_symbol = IN_type_symbol;
       
 27475                 return return_type_symbol;
       
 27476                 
       
 27477             }
       
 27478             
       
 27479             
       
 27480             ERROR;
       
 27481         }
       
 27482         
       
 27483     }/*function_not*/
       
 27484     break;
       
 27485 
       
 27486 /****
       
 27487  *SEL
       
 27488  */
       
 27489     case function_sel :
       
 27490     {
       
 27491         symbol_c *last_type_symbol = NULL;
       
 27492 
       
 27493         {
       
 27494             symbol_c *G_type_symbol = param_data_type;
       
 27495             last_type_symbol = param_data_type;
       
 27496             
       
 27497             if(G_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 27498             {
       
 27499         
       
 27500                 {
       
 27501                     identifier_c param_name("IN0");
       
 27502                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27503                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 27504                     symbol_c *IN0_type_symbol = NULL;
       
 27505                     
       
 27506                     /* Get the value from a foo(<param_value>) style call */
       
 27507                     if (IN0_param_value == NULL)
       
 27508                       IN0_param_value = function_call_param_iterator.next();
       
 27509                     if (IN0_param_value != NULL) {
       
 27510                       IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 27511                       last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
       
 27512                     }
       
 27513                     
       
 27514                     
       
 27515                     {
       
 27516                 
       
 27517                         {
       
 27518                             identifier_c param_name("IN1");
       
 27519                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27520                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 27521                             symbol_c *IN1_type_symbol = NULL;
       
 27522                             
       
 27523                             /* Get the value from a foo(<param_value>) style call */
       
 27524                             if (IN1_param_value == NULL)
       
 27525                               IN1_param_value = function_call_param_iterator.next();
       
 27526                             if (IN1_param_value != NULL) {
       
 27527                               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 27528                               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 27529                             }
       
 27530                             
       
 27531                             
       
 27532                             {
       
 27533                         
       
 27534                                 symbol_c * return_type_symbol = last_type_symbol;
       
 27535                                 return return_type_symbol;
       
 27536                                 
       
 27537                             }
       
 27538                             
       
 27539                             
       
 27540                             ERROR;
       
 27541                         }
       
 27542                         
       
 27543                     }
       
 27544                     
       
 27545                     
       
 27546                     ERROR;
       
 27547                 }
       
 27548                 
       
 27549             }
       
 27550             
       
 27551             
       
 27552             ERROR;
       
 27553         }
       
 27554         
       
 27555     }/*function_sel*/
       
 27556     break;
       
 27557 
       
 27558 /****
       
 27559  *MAX
       
 27560  */
       
 27561     case function_max :
       
 27562     {
       
 27563         symbol_c *last_type_symbol = NULL;
       
 27564 
       
 27565         {
       
 27566             symbol_c *IN1_type_symbol = param_data_type;
       
 27567             last_type_symbol = param_data_type;
       
 27568             
       
 27569             
       
 27570             {
       
 27571         
       
 27572                 {
       
 27573                     identifier_c param_name("IN2");
       
 27574                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27575                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27576                     symbol_c *IN2_type_symbol = NULL;
       
 27577                     
       
 27578                     /* Get the value from a foo(<param_value>) style call */
       
 27579                     if (IN2_param_value == NULL)
       
 27580                       IN2_param_value = function_call_param_iterator.next();
       
 27581                     if (IN2_param_value != NULL) {
       
 27582                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27583                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27584                     }
       
 27585                     
       
 27586                     
       
 27587                     {
       
 27588                 
       
 27589                         symbol_c * return_type_symbol = last_type_symbol;
       
 27590                         return return_type_symbol;
       
 27591                         
       
 27592                     }
       
 27593                     
       
 27594                     
       
 27595                     ERROR;
       
 27596                 }
       
 27597                 
       
 27598             }
       
 27599             
       
 27600             
       
 27601             ERROR;
       
 27602         }
       
 27603         
       
 27604     }/*function_max*/
       
 27605     break;
       
 27606 
       
 27607 /****
       
 27608  *MIN
       
 27609  */
       
 27610     case function_min :
       
 27611     {
       
 27612         symbol_c *last_type_symbol = NULL;
       
 27613 
       
 27614         {
       
 27615             symbol_c *IN1_type_symbol = param_data_type;
       
 27616             last_type_symbol = param_data_type;
       
 27617             
       
 27618             
       
 27619             {
       
 27620         
       
 27621                 {
       
 27622                     identifier_c param_name("IN2");
       
 27623                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27624                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27625                     symbol_c *IN2_type_symbol = NULL;
       
 27626                     
       
 27627                     /* Get the value from a foo(<param_value>) style call */
       
 27628                     if (IN2_param_value == NULL)
       
 27629                       IN2_param_value = function_call_param_iterator.next();
       
 27630                     if (IN2_param_value != NULL) {
       
 27631                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27632                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27633                     }
       
 27634                     
       
 27635                     
       
 27636                     {
       
 27637                 
       
 27638                         symbol_c * return_type_symbol = last_type_symbol;
       
 27639                         return return_type_symbol;
       
 27640                         
       
 27641                     }
       
 27642                     
       
 27643                     
       
 27644                     ERROR;
       
 27645                 }
       
 27646                 
       
 27647             }
       
 27648             
       
 27649             
       
 27650             ERROR;
       
 27651         }
       
 27652         
       
 27653     }/*function_min*/
       
 27654     break;
       
 27655 
       
 27656 /****
       
 27657  *LIMIT
       
 27658  */
       
 27659     case function_limit :
       
 27660     {
       
 27661         symbol_c *last_type_symbol = NULL;
       
 27662 
       
 27663         {
       
 27664             symbol_c *MN_type_symbol = param_data_type;
       
 27665             last_type_symbol = param_data_type;
       
 27666             
       
 27667             
       
 27668             {
       
 27669         
       
 27670                 {
       
 27671                     identifier_c param_name("IN");
       
 27672                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27673                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 27674                     symbol_c *IN_type_symbol = NULL;
       
 27675                     
       
 27676                     /* Get the value from a foo(<param_value>) style call */
       
 27677                     if (IN_param_value == NULL)
       
 27678                       IN_param_value = function_call_param_iterator.next();
       
 27679                     if (IN_param_value != NULL) {
       
 27680                       IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 27681                       last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 27682                     }
       
 27683                     
       
 27684                     
       
 27685                     {
       
 27686                 
       
 27687                         {
       
 27688                             identifier_c param_name("MX");
       
 27689                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27690                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
       
 27691                             symbol_c *MX_type_symbol = NULL;
       
 27692                             
       
 27693                             /* Get the value from a foo(<param_value>) style call */
       
 27694                             if (MX_param_value == NULL)
       
 27695                               MX_param_value = function_call_param_iterator.next();
       
 27696                             if (MX_param_value != NULL) {
       
 27697                               MX_type_symbol = search_expression_type->get_type(MX_param_value);
       
 27698                               last_type_symbol = last_type_symbol && MX_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ;
       
 27699                             }
       
 27700                             
       
 27701                             
       
 27702                             {
       
 27703                         
       
 27704                                 symbol_c * return_type_symbol = IN_type_symbol;
       
 27705                                 return return_type_symbol;
       
 27706                                 
       
 27707                             }
       
 27708                             
       
 27709                             
       
 27710                             ERROR;
       
 27711                         }
       
 27712                         
       
 27713                     }
       
 27714                     
       
 27715                     
       
 27716                     ERROR;
       
 27717                 }
       
 27718                 
       
 27719             }
       
 27720             
       
 27721             
       
 27722             ERROR;
       
 27723         }
       
 27724         
       
 27725     }/*function_limit*/
       
 27726     break;
       
 27727 
       
 27728 /****
       
 27729  *MUX
       
 27730  */
       
 27731     case function_mux :
       
 27732     {
       
 27733         symbol_c *last_type_symbol = NULL;
       
 27734 
       
 27735         {
       
 27736             symbol_c *K_type_symbol = param_data_type;
       
 27737             last_type_symbol = param_data_type;
       
 27738             
       
 27739             if(K_type_symbol == NULL || search_expression_type->is_integer_type(K_type_symbol))
       
 27740             {
       
 27741         
       
 27742                 {
       
 27743                     identifier_c param_name("IN0");
       
 27744                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27745                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 27746                     symbol_c *IN0_type_symbol = NULL;
       
 27747                     
       
 27748                     /* Get the value from a foo(<param_value>) style call */
       
 27749                     if (IN0_param_value == NULL)
       
 27750                       IN0_param_value = function_call_param_iterator.next();
       
 27751                     if (IN0_param_value != NULL) {
       
 27752                       IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 27753                       last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ;
       
 27754                     }
       
 27755                     
       
 27756                     
       
 27757                     {
       
 27758                 
       
 27759                         {
       
 27760                             identifier_c param_name("IN1");
       
 27761                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27762                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 27763                             symbol_c *IN1_type_symbol = NULL;
       
 27764                             
       
 27765                             /* Get the value from a foo(<param_value>) style call */
       
 27766                             if (IN1_param_value == NULL)
       
 27767                               IN1_param_value = function_call_param_iterator.next();
       
 27768                             if (IN1_param_value != NULL) {
       
 27769                               IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 27770                               last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
       
 27771                             }
       
 27772                             
       
 27773                             
       
 27774                             {
       
 27775                         
       
 27776                                 symbol_c * return_type_symbol = last_type_symbol;
       
 27777                                 return return_type_symbol;
       
 27778                                 
       
 27779                             }
       
 27780                             
       
 27781                             
       
 27782                             ERROR;
       
 27783                         }
       
 27784                         
       
 27785                     }
       
 27786                     
       
 27787                     
       
 27788                     ERROR;
       
 27789                 }
       
 27790                 
       
 27791             }
       
 27792             
       
 27793             
       
 27794             ERROR;
       
 27795         }
       
 27796         
       
 27797     }/*function_mux*/
       
 27798     break;
       
 27799 
       
 27800 /****
       
 27801  *GT
       
 27802  */
       
 27803     case function_gt :
       
 27804     {
       
 27805         symbol_c *last_type_symbol = NULL;
       
 27806 
       
 27807         {
       
 27808             symbol_c *IN1_type_symbol = param_data_type;
       
 27809             last_type_symbol = param_data_type;
       
 27810             
       
 27811             
       
 27812             {
       
 27813         
       
 27814                 {
       
 27815                     identifier_c param_name("IN2");
       
 27816                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27817                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27818                     symbol_c *IN2_type_symbol = NULL;
       
 27819                     
       
 27820                     /* Get the value from a foo(<param_value>) style call */
       
 27821                     if (IN2_param_value == NULL)
       
 27822                       IN2_param_value = function_call_param_iterator.next();
       
 27823                     if (IN2_param_value != NULL) {
       
 27824                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27825                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27826                     }
       
 27827                     
       
 27828                     
       
 27829                     {
       
 27830                 
       
 27831                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 27832                         return return_type_symbol;
       
 27833                         
       
 27834                     }
       
 27835                     
       
 27836                     
       
 27837                     ERROR;
       
 27838                 }
       
 27839                 
       
 27840             }
       
 27841             
       
 27842             
       
 27843             ERROR;
       
 27844         }
       
 27845         
       
 27846     }/*function_gt*/
       
 27847     break;
       
 27848 
       
 27849 /****
       
 27850  *GE
       
 27851  */
       
 27852     case function_ge :
       
 27853     {
       
 27854         symbol_c *last_type_symbol = NULL;
       
 27855 
       
 27856         {
       
 27857             symbol_c *IN1_type_symbol = param_data_type;
       
 27858             last_type_symbol = param_data_type;
       
 27859             
       
 27860             
       
 27861             {
       
 27862         
       
 27863                 {
       
 27864                     identifier_c param_name("IN2");
       
 27865                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27866                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27867                     symbol_c *IN2_type_symbol = NULL;
       
 27868                     
       
 27869                     /* Get the value from a foo(<param_value>) style call */
       
 27870                     if (IN2_param_value == NULL)
       
 27871                       IN2_param_value = function_call_param_iterator.next();
       
 27872                     if (IN2_param_value != NULL) {
       
 27873                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27874                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27875                     }
       
 27876                     
       
 27877                     
       
 27878                     {
       
 27879                 
       
 27880                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 27881                         return return_type_symbol;
       
 27882                         
       
 27883                     }
       
 27884                     
       
 27885                     
       
 27886                     ERROR;
       
 27887                 }
       
 27888                 
       
 27889             }
       
 27890             
       
 27891             
       
 27892             ERROR;
       
 27893         }
       
 27894         
       
 27895     }/*function_ge*/
       
 27896     break;
       
 27897 
       
 27898 /****
       
 27899  *EQ
       
 27900  */
       
 27901     case function_eq :
       
 27902     {
       
 27903         symbol_c *last_type_symbol = NULL;
       
 27904 
       
 27905         {
       
 27906             symbol_c *IN1_type_symbol = param_data_type;
       
 27907             last_type_symbol = param_data_type;
       
 27908             
       
 27909             
       
 27910             {
       
 27911         
       
 27912                 {
       
 27913                     identifier_c param_name("IN2");
       
 27914                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27915                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27916                     symbol_c *IN2_type_symbol = NULL;
       
 27917                     
       
 27918                     /* Get the value from a foo(<param_value>) style call */
       
 27919                     if (IN2_param_value == NULL)
       
 27920                       IN2_param_value = function_call_param_iterator.next();
       
 27921                     if (IN2_param_value != NULL) {
       
 27922                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27923                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27924                     }
       
 27925                     
       
 27926                     
       
 27927                     {
       
 27928                 
       
 27929                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 27930                         return return_type_symbol;
       
 27931                         
       
 27932                     }
       
 27933                     
       
 27934                     
       
 27935                     ERROR;
       
 27936                 }
       
 27937                 
       
 27938             }
       
 27939             
       
 27940             
       
 27941             ERROR;
       
 27942         }
       
 27943         
       
 27944     }/*function_eq*/
       
 27945     break;
       
 27946 
       
 27947 /****
       
 27948  *LT
       
 27949  */
       
 27950     case function_lt :
       
 27951     {
       
 27952         symbol_c *last_type_symbol = NULL;
       
 27953 
       
 27954         {
       
 27955             symbol_c *IN1_type_symbol = param_data_type;
       
 27956             last_type_symbol = param_data_type;
       
 27957             
       
 27958             
       
 27959             {
       
 27960         
       
 27961                 {
       
 27962                     identifier_c param_name("IN2");
       
 27963                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 27964                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 27965                     symbol_c *IN2_type_symbol = NULL;
       
 27966                     
       
 27967                     /* Get the value from a foo(<param_value>) style call */
       
 27968                     if (IN2_param_value == NULL)
       
 27969                       IN2_param_value = function_call_param_iterator.next();
       
 27970                     if (IN2_param_value != NULL) {
       
 27971                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 27972                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 27973                     }
       
 27974                     
       
 27975                     
       
 27976                     {
       
 27977                 
       
 27978                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 27979                         return return_type_symbol;
       
 27980                         
       
 27981                     }
       
 27982                     
       
 27983                     
       
 27984                     ERROR;
       
 27985                 }
       
 27986                 
       
 27987             }
       
 27988             
       
 27989             
       
 27990             ERROR;
       
 27991         }
       
 27992         
       
 27993     }/*function_lt*/
       
 27994     break;
       
 27995 
       
 27996 /****
       
 27997  *LE
       
 27998  */
       
 27999     case function_le :
       
 28000     {
       
 28001         symbol_c *last_type_symbol = NULL;
       
 28002 
       
 28003         {
       
 28004             symbol_c *IN1_type_symbol = param_data_type;
       
 28005             last_type_symbol = param_data_type;
       
 28006             
       
 28007             
       
 28008             {
       
 28009         
       
 28010                 {
       
 28011                     identifier_c param_name("IN2");
       
 28012                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28013                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 28014                     symbol_c *IN2_type_symbol = NULL;
       
 28015                     
       
 28016                     /* Get the value from a foo(<param_value>) style call */
       
 28017                     if (IN2_param_value == NULL)
       
 28018                       IN2_param_value = function_call_param_iterator.next();
       
 28019                     if (IN2_param_value != NULL) {
       
 28020                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28021                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28022                     }
       
 28023                     
       
 28024                     
       
 28025                     {
       
 28026                 
       
 28027                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 28028                         return return_type_symbol;
       
 28029                         
       
 28030                     }
       
 28031                     
       
 28032                     
       
 28033                     ERROR;
       
 28034                 }
       
 28035                 
       
 28036             }
       
 28037             
       
 28038             
       
 28039             ERROR;
       
 28040         }
       
 28041         
       
 28042     }/*function_le*/
       
 28043     break;
       
 28044 
       
 28045 /****
       
 28046  *NE
       
 28047  */
       
 28048     case function_ne :
       
 28049     {
       
 28050         symbol_c *last_type_symbol = NULL;
       
 28051 
       
 28052         {
       
 28053             symbol_c *IN1_type_symbol = param_data_type;
       
 28054             last_type_symbol = param_data_type;
       
 28055             
       
 28056             
       
 28057             {
       
 28058         
       
 28059                 {
       
 28060                     identifier_c param_name("IN2");
       
 28061                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28062                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 28063                     symbol_c *IN2_type_symbol = NULL;
       
 28064                     
       
 28065                     /* Get the value from a foo(<param_value>) style call */
       
 28066                     if (IN2_param_value == NULL)
       
 28067                       IN2_param_value = function_call_param_iterator.next();
       
 28068                     if (IN2_param_value != NULL) {
       
 28069                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28070                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28071                     }
       
 28072                     
       
 28073                     
       
 28074                     {
       
 28075                 
       
 28076                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 28077                         return return_type_symbol;
       
 28078                         
       
 28079                     }
       
 28080                     
       
 28081                     
       
 28082                     ERROR;
       
 28083                 }
       
 28084                 
       
 28085             }
       
 28086             
       
 28087             
       
 28088             ERROR;
       
 28089         }
       
 28090         
       
 28091     }/*function_ne*/
       
 28092     break;
       
 28093 
       
 28094 /****
       
 28095  *LEN
       
 28096  */
       
 28097     case function_len :
       
 28098     {
       
 28099         symbol_c *last_type_symbol = NULL;
       
 28100 
       
 28101         {
       
 28102             symbol_c *IN_type_symbol = param_data_type;
       
 28103             last_type_symbol = param_data_type;
       
 28104             
       
 28105             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28106             {
       
 28107         
       
 28108                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 28109                 return return_type_symbol;
       
 28110                 
       
 28111             }
       
 28112             
       
 28113             
       
 28114             ERROR;
       
 28115         }
       
 28116         
       
 28117     }/*function_len*/
       
 28118     break;
       
 28119 
       
 28120 /****
       
 28121  *LEFT
       
 28122  */
       
 28123     case function_left :
       
 28124     {
       
 28125         symbol_c *last_type_symbol = NULL;
       
 28126 
       
 28127         {
       
 28128             symbol_c *IN_type_symbol = param_data_type;
       
 28129             last_type_symbol = param_data_type;
       
 28130             
       
 28131             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28132             {
       
 28133         
       
 28134                 {
       
 28135                     identifier_c param_name("L");
       
 28136                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28137                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 28138                     symbol_c *L_type_symbol = NULL;
       
 28139                     
       
 28140                     /* Get the value from a foo(<param_value>) style call */
       
 28141                     if (L_param_value == NULL)
       
 28142                       L_param_value = function_call_param_iterator.next();
       
 28143                     if (L_param_value != NULL) {
       
 28144                       L_type_symbol = search_expression_type->get_type(L_param_value);
       
 28145                       last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 28146                     }
       
 28147                     
       
 28148                     if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 28149                     {
       
 28150                 
       
 28151                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 28152                         return return_type_symbol;
       
 28153                         
       
 28154                     }
       
 28155                     
       
 28156                     
       
 28157                     ERROR;
       
 28158                 }
       
 28159                 
       
 28160             }
       
 28161             
       
 28162             
       
 28163             ERROR;
       
 28164         }
       
 28165         
       
 28166     }/*function_left*/
       
 28167     break;
       
 28168 
       
 28169 /****
       
 28170  *RIGHT
       
 28171  */
       
 28172     case function_right :
       
 28173     {
       
 28174         symbol_c *last_type_symbol = NULL;
       
 28175 
       
 28176         {
       
 28177             symbol_c *IN_type_symbol = param_data_type;
       
 28178             last_type_symbol = param_data_type;
       
 28179             
       
 28180             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28181             {
       
 28182         
       
 28183                 {
       
 28184                     identifier_c param_name("L");
       
 28185                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28186                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 28187                     symbol_c *L_type_symbol = NULL;
       
 28188                     
       
 28189                     /* Get the value from a foo(<param_value>) style call */
       
 28190                     if (L_param_value == NULL)
       
 28191                       L_param_value = function_call_param_iterator.next();
       
 28192                     if (L_param_value != NULL) {
       
 28193                       L_type_symbol = search_expression_type->get_type(L_param_value);
       
 28194                       last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 28195                     }
       
 28196                     
       
 28197                     if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 28198                     {
       
 28199                 
       
 28200                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 28201                         return return_type_symbol;
       
 28202                         
       
 28203                     }
       
 28204                     
       
 28205                     
       
 28206                     ERROR;
       
 28207                 }
       
 28208                 
       
 28209             }
       
 28210             
       
 28211             
       
 28212             ERROR;
       
 28213         }
       
 28214         
       
 28215     }/*function_right*/
       
 28216     break;
       
 28217 
       
 28218 /****
       
 28219  *MID
       
 28220  */
       
 28221     case function_mid :
       
 28222     {
       
 28223         symbol_c *last_type_symbol = NULL;
       
 28224 
       
 28225         {
       
 28226             symbol_c *IN_type_symbol = param_data_type;
       
 28227             last_type_symbol = param_data_type;
       
 28228             
       
 28229             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28230             {
       
 28231         
       
 28232                 {
       
 28233                     identifier_c param_name("L");
       
 28234                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28235                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 28236                     symbol_c *L_type_symbol = NULL;
       
 28237                     
       
 28238                     /* Get the value from a foo(<param_value>) style call */
       
 28239                     if (L_param_value == NULL)
       
 28240                       L_param_value = function_call_param_iterator.next();
       
 28241                     if (L_param_value != NULL) {
       
 28242                       L_type_symbol = search_expression_type->get_type(L_param_value);
       
 28243                       last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 28244                     }
       
 28245                     
       
 28246                     if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 28247                     {
       
 28248                 
       
 28249                         {
       
 28250                             identifier_c param_name("P");
       
 28251                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28252                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 28253                             symbol_c *P_type_symbol = NULL;
       
 28254                             
       
 28255                             /* Get the value from a foo(<param_value>) style call */
       
 28256                             if (P_param_value == NULL)
       
 28257                               P_param_value = function_call_param_iterator.next();
       
 28258                             if (P_param_value != NULL) {
       
 28259                               P_type_symbol = search_expression_type->get_type(P_param_value);
       
 28260                               last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 28261                             }
       
 28262                             
       
 28263                             if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
       
 28264                             {
       
 28265                         
       
 28266                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 28267                                 return return_type_symbol;
       
 28268                                 
       
 28269                             }
       
 28270                             
       
 28271                             
       
 28272                             ERROR;
       
 28273                         }
       
 28274                         
       
 28275                     }
       
 28276                     
       
 28277                     
       
 28278                     ERROR;
       
 28279                 }
       
 28280                 
       
 28281             }
       
 28282             
       
 28283             
       
 28284             ERROR;
       
 28285         }
       
 28286         
       
 28287     }/*function_mid*/
       
 28288     break;
       
 28289 
       
 28290 /****
       
 28291  *CONCAT
       
 28292  */
       
 28293     case function_concat :
       
 28294     {
       
 28295         symbol_c *last_type_symbol = NULL;
       
 28296 
       
 28297         {
       
 28298             symbol_c *IN1_type_symbol = param_data_type;
       
 28299             last_type_symbol = param_data_type;
       
 28300             
       
 28301             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 28302             {
       
 28303         
       
 28304                 {
       
 28305                     identifier_c param_name("IN2");
       
 28306                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28307                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 28308                     symbol_c *IN2_type_symbol = NULL;
       
 28309                     
       
 28310                     /* Get the value from a foo(<param_value>) style call */
       
 28311                     if (IN2_param_value == NULL)
       
 28312                       IN2_param_value = function_call_param_iterator.next();
       
 28313                     if (IN2_param_value != NULL) {
       
 28314                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28315                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28316                     }
       
 28317                     
       
 28318                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 28319                     {
       
 28320                 
       
 28321                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 28322                         return return_type_symbol;
       
 28323                         
       
 28324                     }
       
 28325                     
       
 28326                     
       
 28327                     ERROR;
       
 28328                 }
       
 28329                 
       
 28330             }
       
 28331             
       
 28332             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28333             {
       
 28334         
       
 28335                 {
       
 28336                     identifier_c param_name("IN2");
       
 28337                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28338                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 28339                     symbol_c *IN2_type_symbol = NULL;
       
 28340                     
       
 28341                     /* Get the value from a foo(<param_value>) style call */
       
 28342                     if (IN2_param_value == NULL)
       
 28343                       IN2_param_value = function_call_param_iterator.next();
       
 28344                     if (IN2_param_value != NULL) {
       
 28345                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28346                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28347                     }
       
 28348                     
       
 28349                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28350                     {
       
 28351                 
       
 28352                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 28353                         return return_type_symbol;
       
 28354                         
       
 28355                     }
       
 28356                     
       
 28357                     
       
 28358                     ERROR;
       
 28359                 }
       
 28360                 
       
 28361             }
       
 28362             
       
 28363             
       
 28364             ERROR;
       
 28365         }
       
 28366         
       
 28367     }/*function_concat*/
       
 28368     break;
       
 28369 
       
 28370 /****
       
 28371  *INSERT
       
 28372  */
       
 28373     case function_insert :
       
 28374     {
       
 28375         symbol_c *last_type_symbol = NULL;
       
 28376 
       
 28377         {
       
 28378             symbol_c *IN1_type_symbol = param_data_type;
       
 28379             last_type_symbol = param_data_type;
       
 28380             
       
 28381             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28382             {
       
 28383         
       
 28384                 {
       
 28385                     identifier_c param_name("IN2");
       
 28386                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28387                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 28388                     symbol_c *IN2_type_symbol = NULL;
       
 28389                     
       
 28390                     /* Get the value from a foo(<param_value>) style call */
       
 28391                     if (IN2_param_value == NULL)
       
 28392                       IN2_param_value = function_call_param_iterator.next();
       
 28393                     if (IN2_param_value != NULL) {
       
 28394                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28395                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28396                     }
       
 28397                     
       
 28398                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28399                     {
       
 28400                 
       
 28401                         {
       
 28402                             identifier_c param_name("P");
       
 28403                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28404                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 28405                             symbol_c *P_type_symbol = NULL;
       
 28406                             
       
 28407                             /* Get the value from a foo(<param_value>) style call */
       
 28408                             if (P_param_value == NULL)
       
 28409                               P_param_value = function_call_param_iterator.next();
       
 28410                             if (P_param_value != NULL) {
       
 28411                               P_type_symbol = search_expression_type->get_type(P_param_value);
       
 28412                               last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 28413                             }
       
 28414                             
       
 28415                             if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
       
 28416                             {
       
 28417                         
       
 28418                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 28419                                 return return_type_symbol;
       
 28420                                 
       
 28421                             }
       
 28422                             
       
 28423                             
       
 28424                             ERROR;
       
 28425                         }
       
 28426                         
       
 28427                     }
       
 28428                     
       
 28429                     
       
 28430                     ERROR;
       
 28431                 }
       
 28432                 
       
 28433             }
       
 28434             
       
 28435             
       
 28436             ERROR;
       
 28437         }
       
 28438         
       
 28439     }/*function_insert*/
       
 28440     break;
       
 28441 
       
 28442 /****
       
 28443  *DELETE
       
 28444  */
       
 28445     case function_delete :
       
 28446     {
       
 28447         symbol_c *last_type_symbol = NULL;
       
 28448 
       
 28449         {
       
 28450             symbol_c *IN_type_symbol = param_data_type;
       
 28451             last_type_symbol = param_data_type;
       
 28452             
       
 28453             if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28454             {
       
 28455         
       
 28456                 {
       
 28457                     identifier_c param_name("L");
       
 28458                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28459                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 28460                     symbol_c *L_type_symbol = NULL;
       
 28461                     
       
 28462                     /* Get the value from a foo(<param_value>) style call */
       
 28463                     if (L_param_value == NULL)
       
 28464                       L_param_value = function_call_param_iterator.next();
       
 28465                     if (L_param_value != NULL) {
       
 28466                       L_type_symbol = search_expression_type->get_type(L_param_value);
       
 28467                       last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 28468                     }
       
 28469                     
       
 28470                     if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 28471                     {
       
 28472                 
       
 28473                         {
       
 28474                             identifier_c param_name("P");
       
 28475                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28476                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 28477                             symbol_c *P_type_symbol = NULL;
       
 28478                             
       
 28479                             /* Get the value from a foo(<param_value>) style call */
       
 28480                             if (P_param_value == NULL)
       
 28481                               P_param_value = function_call_param_iterator.next();
       
 28482                             if (P_param_value != NULL) {
       
 28483                               P_type_symbol = search_expression_type->get_type(P_param_value);
       
 28484                               last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 28485                             }
       
 28486                             
       
 28487                             if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
       
 28488                             {
       
 28489                         
       
 28490                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 28491                                 return return_type_symbol;
       
 28492                                 
       
 28493                             }
       
 28494                             
       
 28495                             
       
 28496                             ERROR;
       
 28497                         }
       
 28498                         
       
 28499                     }
       
 28500                     
       
 28501                     
       
 28502                     ERROR;
       
 28503                 }
       
 28504                 
       
 28505             }
       
 28506             
       
 28507             
       
 28508             ERROR;
       
 28509         }
       
 28510         
       
 28511     }/*function_delete*/
       
 28512     break;
       
 28513 
       
 28514 /****
       
 28515  *REPLACE
       
 28516  */
       
 28517     case function_replace :
       
 28518     {
       
 28519         symbol_c *last_type_symbol = NULL;
       
 28520 
       
 28521         {
       
 28522             symbol_c *IN1_type_symbol = param_data_type;
       
 28523             last_type_symbol = param_data_type;
       
 28524             
       
 28525             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28526             {
       
 28527         
       
 28528                 {
       
 28529                     identifier_c param_name("IN2");
       
 28530                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28531                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 28532                     symbol_c *IN2_type_symbol = NULL;
       
 28533                     
       
 28534                     /* Get the value from a foo(<param_value>) style call */
       
 28535                     if (IN2_param_value == NULL)
       
 28536                       IN2_param_value = function_call_param_iterator.next();
       
 28537                     if (IN2_param_value != NULL) {
       
 28538                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28539                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28540                     }
       
 28541                     
       
 28542                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28543                     {
       
 28544                 
       
 28545                         {
       
 28546                             identifier_c param_name("L");
       
 28547                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28548                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 28549                             symbol_c *L_type_symbol = NULL;
       
 28550                             
       
 28551                             /* Get the value from a foo(<param_value>) style call */
       
 28552                             if (L_param_value == NULL)
       
 28553                               L_param_value = function_call_param_iterator.next();
       
 28554                             if (L_param_value != NULL) {
       
 28555                               L_type_symbol = search_expression_type->get_type(L_param_value);
       
 28556                               last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ;
       
 28557                             }
       
 28558                             
       
 28559                             if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol))
       
 28560                             {
       
 28561                         
       
 28562                                 {
       
 28563                                     identifier_c param_name("P");
       
 28564                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28565                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 28566                                     symbol_c *P_type_symbol = NULL;
       
 28567                                     
       
 28568                                     /* Get the value from a foo(<param_value>) style call */
       
 28569                                     if (P_param_value == NULL)
       
 28570                                       P_param_value = function_call_param_iterator.next();
       
 28571                                     if (P_param_value != NULL) {
       
 28572                                       P_type_symbol = search_expression_type->get_type(P_param_value);
       
 28573                                       last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ;
       
 28574                                     }
       
 28575                                     
       
 28576                                     if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol))
       
 28577                                     {
       
 28578                                 
       
 28579                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 28580                                         return return_type_symbol;
       
 28581                                         
       
 28582                                     }
       
 28583                                     
       
 28584                                     
       
 28585                                     ERROR;
       
 28586                                 }
       
 28587                                 
       
 28588                             }
       
 28589                             
       
 28590                             
       
 28591                             ERROR;
       
 28592                         }
       
 28593                         
       
 28594                     }
       
 28595                     
       
 28596                     
       
 28597                     ERROR;
       
 28598                 }
       
 28599                 
       
 28600             }
       
 28601             
       
 28602             
       
 28603             ERROR;
       
 28604         }
       
 28605         
       
 28606     }/*function_replace*/
       
 28607     break;
       
 28608 
       
 28609 /****
       
 28610  *FIND
       
 28611  */
       
 28612     case function_find :
       
 28613     {
       
 28614         symbol_c *last_type_symbol = NULL;
       
 28615 
       
 28616         {
       
 28617             symbol_c *IN1_type_symbol = param_data_type;
       
 28618             last_type_symbol = param_data_type;
       
 28619             
       
 28620             if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28621             {
       
 28622         
       
 28623                 {
       
 28624                     identifier_c param_name("IN2");
       
 28625                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 28626                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 28627                     symbol_c *IN2_type_symbol = NULL;
       
 28628                     
       
 28629                     /* Get the value from a foo(<param_value>) style call */
       
 28630                     if (IN2_param_value == NULL)
       
 28631                       IN2_param_value = function_call_param_iterator.next();
       
 28632                     if (IN2_param_value != NULL) {
       
 28633                       IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 28634                       last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
       
 28635                     }
       
 28636                     
       
 28637                     if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 28638                     {
       
 28639                 
       
 28640                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 28641                         return return_type_symbol;
       
 28642                         
       
 28643                     }
       
 28644                     
       
 28645                     
       
 28646                     ERROR;
       
 28647                 }
       
 28648                 
       
 28649             }
       
 28650             
       
 28651             
       
 28652             ERROR;
       
 28653         }
       
 28654         
       
 28655     }/*function_find*/
       
 28656     break;
       
 28657 
       
 28658     case function_none :
       
 28659     ERROR;
       
 28660   }
       
 28661   return NULL;
       
 28662 }