stage4/generate_c/search_type_code.c
changeset 70 e1f0ebd2d9ec
child 149 05ca171a3d57
equal deleted inserted replaced
69:41cb5b80416e 70:e1f0ebd2d9ec
       
     1 /*
       
     2  * (c) 2003 Mario de Sousa
       
     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 /****
       
    27  * IEC 61131-3 standard function lib
       
    28  * generated code, do not edit by hand
       
    29  */
       
    30 
       
    31 void *compute_standard_function_st(function_invocation_c *symbol) {
       
    32 
       
    33   function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
       
    34   function_call_param_iterator_c function_call_param_iterator(symbol);
       
    35   search_expression_type_c* search_expression_type = this;
       
    36 
       
    37   switch(current_function_type){
       
    38 
       
    39 /****
       
    40  *BOOL_TO_SINT
       
    41  */
       
    42     case function_bool_to_sint :
       
    43     {
       
    44         symbol_c *last_type_symbol = NULL;
       
    45 
       
    46         {
       
    47             identifier_c param_name("IN");
       
    48             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    49             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    50             
       
    51             /* Get the value from a foo(<param_value>) style call */
       
    52             if (IN_param_value == NULL)
       
    53               IN_param_value = function_call_param_iterator.next();
       
    54             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    55             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    56             
       
    57             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
    58             {
       
    59         
       
    60                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
    61                 return return_type_symbol;
       
    62                 
       
    63             }
       
    64             
       
    65             ERROR;
       
    66         }
       
    67         
       
    68     }/*function_bool_to_sint*/
       
    69     break;
       
    70 
       
    71 /****
       
    72  *BOOL_TO_INT
       
    73  */
       
    74     case function_bool_to_int :
       
    75     {
       
    76         symbol_c *last_type_symbol = NULL;
       
    77 
       
    78         {
       
    79             identifier_c param_name("IN");
       
    80             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    81             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    82             
       
    83             /* Get the value from a foo(<param_value>) style call */
       
    84             if (IN_param_value == NULL)
       
    85               IN_param_value = function_call_param_iterator.next();
       
    86             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    87             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    88             
       
    89             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
    90             {
       
    91         
       
    92                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
    93                 return return_type_symbol;
       
    94                 
       
    95             }
       
    96             
       
    97             ERROR;
       
    98         }
       
    99         
       
   100     }/*function_bool_to_int*/
       
   101     break;
       
   102 
       
   103 /****
       
   104  *BOOL_TO_DINT
       
   105  */
       
   106     case function_bool_to_dint :
       
   107     {
       
   108         symbol_c *last_type_symbol = NULL;
       
   109 
       
   110         {
       
   111             identifier_c param_name("IN");
       
   112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   114             
       
   115             /* Get the value from a foo(<param_value>) style call */
       
   116             if (IN_param_value == NULL)
       
   117               IN_param_value = function_call_param_iterator.next();
       
   118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   120             
       
   121             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   122             {
       
   123         
       
   124                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   125                 return return_type_symbol;
       
   126                 
       
   127             }
       
   128             
       
   129             ERROR;
       
   130         }
       
   131         
       
   132     }/*function_bool_to_dint*/
       
   133     break;
       
   134 
       
   135 /****
       
   136  *BOOL_TO_LINT
       
   137  */
       
   138     case function_bool_to_lint :
       
   139     {
       
   140         symbol_c *last_type_symbol = NULL;
       
   141 
       
   142         {
       
   143             identifier_c param_name("IN");
       
   144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   146             
       
   147             /* Get the value from a foo(<param_value>) style call */
       
   148             if (IN_param_value == NULL)
       
   149               IN_param_value = function_call_param_iterator.next();
       
   150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   152             
       
   153             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   154             {
       
   155         
       
   156                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   157                 return return_type_symbol;
       
   158                 
       
   159             }
       
   160             
       
   161             ERROR;
       
   162         }
       
   163         
       
   164     }/*function_bool_to_lint*/
       
   165     break;
       
   166 
       
   167 /****
       
   168  *BOOL_TO_USINT
       
   169  */
       
   170     case function_bool_to_usint :
       
   171     {
       
   172         symbol_c *last_type_symbol = NULL;
       
   173 
       
   174         {
       
   175             identifier_c param_name("IN");
       
   176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   178             
       
   179             /* Get the value from a foo(<param_value>) style call */
       
   180             if (IN_param_value == NULL)
       
   181               IN_param_value = function_call_param_iterator.next();
       
   182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   184             
       
   185             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   186             {
       
   187         
       
   188                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   189                 return return_type_symbol;
       
   190                 
       
   191             }
       
   192             
       
   193             ERROR;
       
   194         }
       
   195         
       
   196     }/*function_bool_to_usint*/
       
   197     break;
       
   198 
       
   199 /****
       
   200  *BOOL_TO_UINT
       
   201  */
       
   202     case function_bool_to_uint :
       
   203     {
       
   204         symbol_c *last_type_symbol = NULL;
       
   205 
       
   206         {
       
   207             identifier_c param_name("IN");
       
   208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   210             
       
   211             /* Get the value from a foo(<param_value>) style call */
       
   212             if (IN_param_value == NULL)
       
   213               IN_param_value = function_call_param_iterator.next();
       
   214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   216             
       
   217             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   218             {
       
   219         
       
   220                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   221                 return return_type_symbol;
       
   222                 
       
   223             }
       
   224             
       
   225             ERROR;
       
   226         }
       
   227         
       
   228     }/*function_bool_to_uint*/
       
   229     break;
       
   230 
       
   231 /****
       
   232  *BOOL_TO_UDINT
       
   233  */
       
   234     case function_bool_to_udint :
       
   235     {
       
   236         symbol_c *last_type_symbol = NULL;
       
   237 
       
   238         {
       
   239             identifier_c param_name("IN");
       
   240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   248             
       
   249             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   250             {
       
   251         
       
   252                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   253                 return return_type_symbol;
       
   254                 
       
   255             }
       
   256             
       
   257             ERROR;
       
   258         }
       
   259         
       
   260     }/*function_bool_to_udint*/
       
   261     break;
       
   262 
       
   263 /****
       
   264  *BOOL_TO_ULINT
       
   265  */
       
   266     case function_bool_to_ulint :
       
   267     {
       
   268         symbol_c *last_type_symbol = NULL;
       
   269 
       
   270         {
       
   271             identifier_c param_name("IN");
       
   272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   274             
       
   275             /* Get the value from a foo(<param_value>) style call */
       
   276             if (IN_param_value == NULL)
       
   277               IN_param_value = function_call_param_iterator.next();
       
   278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   280             
       
   281             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   282             {
       
   283         
       
   284                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   285                 return return_type_symbol;
       
   286                 
       
   287             }
       
   288             
       
   289             ERROR;
       
   290         }
       
   291         
       
   292     }/*function_bool_to_ulint*/
       
   293     break;
       
   294 
       
   295 /****
       
   296  *BOOL_TO_REAL
       
   297  */
       
   298     case function_bool_to_real :
       
   299     {
       
   300         symbol_c *last_type_symbol = NULL;
       
   301 
       
   302         {
       
   303             identifier_c param_name("IN");
       
   304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   306             
       
   307             /* Get the value from a foo(<param_value>) style call */
       
   308             if (IN_param_value == NULL)
       
   309               IN_param_value = function_call_param_iterator.next();
       
   310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   312             
       
   313             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   314             {
       
   315         
       
   316                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   317                 return return_type_symbol;
       
   318                 
       
   319             }
       
   320             
       
   321             ERROR;
       
   322         }
       
   323         
       
   324     }/*function_bool_to_real*/
       
   325     break;
       
   326 
       
   327 /****
       
   328  *BOOL_TO_LREAL
       
   329  */
       
   330     case function_bool_to_lreal :
       
   331     {
       
   332         symbol_c *last_type_symbol = NULL;
       
   333 
       
   334         {
       
   335             identifier_c param_name("IN");
       
   336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   338             
       
   339             /* Get the value from a foo(<param_value>) style call */
       
   340             if (IN_param_value == NULL)
       
   341               IN_param_value = function_call_param_iterator.next();
       
   342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   344             
       
   345             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   346             {
       
   347         
       
   348                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
   349                 return return_type_symbol;
       
   350                 
       
   351             }
       
   352             
       
   353             ERROR;
       
   354         }
       
   355         
       
   356     }/*function_bool_to_lreal*/
       
   357     break;
       
   358 
       
   359 /****
       
   360  *BOOL_TO_TIME
       
   361  */
       
   362     case function_bool_to_time :
       
   363     {
       
   364         symbol_c *last_type_symbol = NULL;
       
   365 
       
   366         {
       
   367             identifier_c param_name("IN");
       
   368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   370             
       
   371             /* Get the value from a foo(<param_value>) style call */
       
   372             if (IN_param_value == NULL)
       
   373               IN_param_value = function_call_param_iterator.next();
       
   374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   376             
       
   377             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   378             {
       
   379         
       
   380                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   381                 return return_type_symbol;
       
   382                 
       
   383             }
       
   384             
       
   385             ERROR;
       
   386         }
       
   387         
       
   388     }/*function_bool_to_time*/
       
   389     break;
       
   390 
       
   391 /****
       
   392  *BOOL_TO_DATE
       
   393  */
       
   394     case function_bool_to_date :
       
   395     {
       
   396         symbol_c *last_type_symbol = NULL;
       
   397 
       
   398         {
       
   399             identifier_c param_name("IN");
       
   400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   402             
       
   403             /* Get the value from a foo(<param_value>) style call */
       
   404             if (IN_param_value == NULL)
       
   405               IN_param_value = function_call_param_iterator.next();
       
   406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   408             
       
   409             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   410             {
       
   411         
       
   412                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   413                 return return_type_symbol;
       
   414                 
       
   415             }
       
   416             
       
   417             ERROR;
       
   418         }
       
   419         
       
   420     }/*function_bool_to_date*/
       
   421     break;
       
   422 
       
   423 /****
       
   424  *BOOL_TO_TOD
       
   425  */
       
   426     case function_bool_to_tod :
       
   427     {
       
   428         symbol_c *last_type_symbol = NULL;
       
   429 
       
   430         {
       
   431             identifier_c param_name("IN");
       
   432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   434             
       
   435             /* Get the value from a foo(<param_value>) style call */
       
   436             if (IN_param_value == NULL)
       
   437               IN_param_value = function_call_param_iterator.next();
       
   438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   440             
       
   441             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   442             {
       
   443         
       
   444                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   445                 return return_type_symbol;
       
   446                 
       
   447             }
       
   448             
       
   449             ERROR;
       
   450         }
       
   451         
       
   452     }/*function_bool_to_tod*/
       
   453     break;
       
   454 
       
   455 /****
       
   456  *BOOL_TO_DT
       
   457  */
       
   458     case function_bool_to_dt :
       
   459     {
       
   460         symbol_c *last_type_symbol = NULL;
       
   461 
       
   462         {
       
   463             identifier_c param_name("IN");
       
   464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   466             
       
   467             /* Get the value from a foo(<param_value>) style call */
       
   468             if (IN_param_value == NULL)
       
   469               IN_param_value = function_call_param_iterator.next();
       
   470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   472             
       
   473             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   474             {
       
   475         
       
   476                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   477                 return return_type_symbol;
       
   478                 
       
   479             }
       
   480             
       
   481             ERROR;
       
   482         }
       
   483         
       
   484     }/*function_bool_to_dt*/
       
   485     break;
       
   486 
       
   487 /****
       
   488  *BOOL_TO_STRING
       
   489  */
       
   490     case function_bool_to_string :
       
   491     {
       
   492         symbol_c *last_type_symbol = NULL;
       
   493 
       
   494         {
       
   495             identifier_c param_name("IN");
       
   496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   498             
       
   499             /* Get the value from a foo(<param_value>) style call */
       
   500             if (IN_param_value == NULL)
       
   501               IN_param_value = function_call_param_iterator.next();
       
   502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   504             
       
   505             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   506             {
       
   507         
       
   508                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   509                 return return_type_symbol;
       
   510                 
       
   511             }
       
   512             
       
   513             ERROR;
       
   514         }
       
   515         
       
   516     }/*function_bool_to_string*/
       
   517     break;
       
   518 
       
   519 /****
       
   520  *BOOL_TO_BYTE
       
   521  */
       
   522     case function_bool_to_byte :
       
   523     {
       
   524         symbol_c *last_type_symbol = NULL;
       
   525 
       
   526         {
       
   527             identifier_c param_name("IN");
       
   528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   536             
       
   537             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   538             {
       
   539         
       
   540                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   541                 return return_type_symbol;
       
   542                 
       
   543             }
       
   544             
       
   545             ERROR;
       
   546         }
       
   547         
       
   548     }/*function_bool_to_byte*/
       
   549     break;
       
   550 
       
   551 /****
       
   552  *BOOL_TO_WORD
       
   553  */
       
   554     case function_bool_to_word :
       
   555     {
       
   556         symbol_c *last_type_symbol = NULL;
       
   557 
       
   558         {
       
   559             identifier_c param_name("IN");
       
   560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   562             
       
   563             /* Get the value from a foo(<param_value>) style call */
       
   564             if (IN_param_value == NULL)
       
   565               IN_param_value = function_call_param_iterator.next();
       
   566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   568             
       
   569             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   570             {
       
   571         
       
   572                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   573                 return return_type_symbol;
       
   574                 
       
   575             }
       
   576             
       
   577             ERROR;
       
   578         }
       
   579         
       
   580     }/*function_bool_to_word*/
       
   581     break;
       
   582 
       
   583 /****
       
   584  *BOOL_TO_DWORD
       
   585  */
       
   586     case function_bool_to_dword :
       
   587     {
       
   588         symbol_c *last_type_symbol = NULL;
       
   589 
       
   590         {
       
   591             identifier_c param_name("IN");
       
   592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   594             
       
   595             /* Get the value from a foo(<param_value>) style call */
       
   596             if (IN_param_value == NULL)
       
   597               IN_param_value = function_call_param_iterator.next();
       
   598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   600             
       
   601             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   602             {
       
   603         
       
   604                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   605                 return return_type_symbol;
       
   606                 
       
   607             }
       
   608             
       
   609             ERROR;
       
   610         }
       
   611         
       
   612     }/*function_bool_to_dword*/
       
   613     break;
       
   614 
       
   615 /****
       
   616  *BOOL_TO_LWORD
       
   617  */
       
   618     case function_bool_to_lword :
       
   619     {
       
   620         symbol_c *last_type_symbol = NULL;
       
   621 
       
   622         {
       
   623             identifier_c param_name("IN");
       
   624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   626             
       
   627             /* Get the value from a foo(<param_value>) style call */
       
   628             if (IN_param_value == NULL)
       
   629               IN_param_value = function_call_param_iterator.next();
       
   630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   632             
       
   633             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
   634             {
       
   635         
       
   636                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
   637                 return return_type_symbol;
       
   638                 
       
   639             }
       
   640             
       
   641             ERROR;
       
   642         }
       
   643         
       
   644     }/*function_bool_to_lword*/
       
   645     break;
       
   646 
       
   647 /****
       
   648  *SINT_TO_BOOL
       
   649  */
       
   650     case function_sint_to_bool :
       
   651     {
       
   652         symbol_c *last_type_symbol = NULL;
       
   653 
       
   654         {
       
   655             identifier_c param_name("IN");
       
   656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   658             
       
   659             /* Get the value from a foo(<param_value>) style call */
       
   660             if (IN_param_value == NULL)
       
   661               IN_param_value = function_call_param_iterator.next();
       
   662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   664             
       
   665             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   666             {
       
   667         
       
   668                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   669                 return return_type_symbol;
       
   670                 
       
   671             }
       
   672             
       
   673             ERROR;
       
   674         }
       
   675         
       
   676     }/*function_sint_to_bool*/
       
   677     break;
       
   678 
       
   679 /****
       
   680  *SINT_TO_INT
       
   681  */
       
   682     case function_sint_to_int :
       
   683     {
       
   684         symbol_c *last_type_symbol = NULL;
       
   685 
       
   686         {
       
   687             identifier_c param_name("IN");
       
   688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   690             
       
   691             /* Get the value from a foo(<param_value>) style call */
       
   692             if (IN_param_value == NULL)
       
   693               IN_param_value = function_call_param_iterator.next();
       
   694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   696             
       
   697             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   698             {
       
   699         
       
   700                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   701                 return return_type_symbol;
       
   702                 
       
   703             }
       
   704             
       
   705             ERROR;
       
   706         }
       
   707         
       
   708     }/*function_sint_to_int*/
       
   709     break;
       
   710 
       
   711 /****
       
   712  *SINT_TO_DINT
       
   713  */
       
   714     case function_sint_to_dint :
       
   715     {
       
   716         symbol_c *last_type_symbol = NULL;
       
   717 
       
   718         {
       
   719             identifier_c param_name("IN");
       
   720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   722             
       
   723             /* Get the value from a foo(<param_value>) style call */
       
   724             if (IN_param_value == NULL)
       
   725               IN_param_value = function_call_param_iterator.next();
       
   726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   728             
       
   729             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   730             {
       
   731         
       
   732                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   733                 return return_type_symbol;
       
   734                 
       
   735             }
       
   736             
       
   737             ERROR;
       
   738         }
       
   739         
       
   740     }/*function_sint_to_dint*/
       
   741     break;
       
   742 
       
   743 /****
       
   744  *SINT_TO_LINT
       
   745  */
       
   746     case function_sint_to_lint :
       
   747     {
       
   748         symbol_c *last_type_symbol = NULL;
       
   749 
       
   750         {
       
   751             identifier_c param_name("IN");
       
   752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   754             
       
   755             /* Get the value from a foo(<param_value>) style call */
       
   756             if (IN_param_value == NULL)
       
   757               IN_param_value = function_call_param_iterator.next();
       
   758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   760             
       
   761             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   762             {
       
   763         
       
   764                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   765                 return return_type_symbol;
       
   766                 
       
   767             }
       
   768             
       
   769             ERROR;
       
   770         }
       
   771         
       
   772     }/*function_sint_to_lint*/
       
   773     break;
       
   774 
       
   775 /****
       
   776  *SINT_TO_USINT
       
   777  */
       
   778     case function_sint_to_usint :
       
   779     {
       
   780         symbol_c *last_type_symbol = NULL;
       
   781 
       
   782         {
       
   783             identifier_c param_name("IN");
       
   784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   786             
       
   787             /* Get the value from a foo(<param_value>) style call */
       
   788             if (IN_param_value == NULL)
       
   789               IN_param_value = function_call_param_iterator.next();
       
   790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   792             
       
   793             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   794             {
       
   795         
       
   796                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   797                 return return_type_symbol;
       
   798                 
       
   799             }
       
   800             
       
   801             ERROR;
       
   802         }
       
   803         
       
   804     }/*function_sint_to_usint*/
       
   805     break;
       
   806 
       
   807 /****
       
   808  *SINT_TO_UINT
       
   809  */
       
   810     case function_sint_to_uint :
       
   811     {
       
   812         symbol_c *last_type_symbol = NULL;
       
   813 
       
   814         {
       
   815             identifier_c param_name("IN");
       
   816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   824             
       
   825             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   826             {
       
   827         
       
   828                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   829                 return return_type_symbol;
       
   830                 
       
   831             }
       
   832             
       
   833             ERROR;
       
   834         }
       
   835         
       
   836     }/*function_sint_to_uint*/
       
   837     break;
       
   838 
       
   839 /****
       
   840  *SINT_TO_UDINT
       
   841  */
       
   842     case function_sint_to_udint :
       
   843     {
       
   844         symbol_c *last_type_symbol = NULL;
       
   845 
       
   846         {
       
   847             identifier_c param_name("IN");
       
   848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   850             
       
   851             /* Get the value from a foo(<param_value>) style call */
       
   852             if (IN_param_value == NULL)
       
   853               IN_param_value = function_call_param_iterator.next();
       
   854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   856             
       
   857             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   858             {
       
   859         
       
   860                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   861                 return return_type_symbol;
       
   862                 
       
   863             }
       
   864             
       
   865             ERROR;
       
   866         }
       
   867         
       
   868     }/*function_sint_to_udint*/
       
   869     break;
       
   870 
       
   871 /****
       
   872  *SINT_TO_ULINT
       
   873  */
       
   874     case function_sint_to_ulint :
       
   875     {
       
   876         symbol_c *last_type_symbol = NULL;
       
   877 
       
   878         {
       
   879             identifier_c param_name("IN");
       
   880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   882             
       
   883             /* Get the value from a foo(<param_value>) style call */
       
   884             if (IN_param_value == NULL)
       
   885               IN_param_value = function_call_param_iterator.next();
       
   886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   888             
       
   889             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   890             {
       
   891         
       
   892                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   893                 return return_type_symbol;
       
   894                 
       
   895             }
       
   896             
       
   897             ERROR;
       
   898         }
       
   899         
       
   900     }/*function_sint_to_ulint*/
       
   901     break;
       
   902 
       
   903 /****
       
   904  *SINT_TO_REAL
       
   905  */
       
   906     case function_sint_to_real :
       
   907     {
       
   908         symbol_c *last_type_symbol = NULL;
       
   909 
       
   910         {
       
   911             identifier_c param_name("IN");
       
   912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   914             
       
   915             /* Get the value from a foo(<param_value>) style call */
       
   916             if (IN_param_value == NULL)
       
   917               IN_param_value = function_call_param_iterator.next();
       
   918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   920             
       
   921             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   922             {
       
   923         
       
   924                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   925                 return return_type_symbol;
       
   926                 
       
   927             }
       
   928             
       
   929             ERROR;
       
   930         }
       
   931         
       
   932     }/*function_sint_to_real*/
       
   933     break;
       
   934 
       
   935 /****
       
   936  *SINT_TO_LREAL
       
   937  */
       
   938     case function_sint_to_lreal :
       
   939     {
       
   940         symbol_c *last_type_symbol = NULL;
       
   941 
       
   942         {
       
   943             identifier_c param_name("IN");
       
   944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   946             
       
   947             /* Get the value from a foo(<param_value>) style call */
       
   948             if (IN_param_value == NULL)
       
   949               IN_param_value = function_call_param_iterator.next();
       
   950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   952             
       
   953             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   954             {
       
   955         
       
   956                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
   957                 return return_type_symbol;
       
   958                 
       
   959             }
       
   960             
       
   961             ERROR;
       
   962         }
       
   963         
       
   964     }/*function_sint_to_lreal*/
       
   965     break;
       
   966 
       
   967 /****
       
   968  *SINT_TO_TIME
       
   969  */
       
   970     case function_sint_to_time :
       
   971     {
       
   972         symbol_c *last_type_symbol = NULL;
       
   973 
       
   974         {
       
   975             identifier_c param_name("IN");
       
   976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   978             
       
   979             /* Get the value from a foo(<param_value>) style call */
       
   980             if (IN_param_value == NULL)
       
   981               IN_param_value = function_call_param_iterator.next();
       
   982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   984             
       
   985             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   986             {
       
   987         
       
   988                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   989                 return return_type_symbol;
       
   990                 
       
   991             }
       
   992             
       
   993             ERROR;
       
   994         }
       
   995         
       
   996     }/*function_sint_to_time*/
       
   997     break;
       
   998 
       
   999 /****
       
  1000  *SINT_TO_DATE
       
  1001  */
       
  1002     case function_sint_to_date :
       
  1003     {
       
  1004         symbol_c *last_type_symbol = NULL;
       
  1005 
       
  1006         {
       
  1007             identifier_c param_name("IN");
       
  1008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1010             
       
  1011             /* Get the value from a foo(<param_value>) style call */
       
  1012             if (IN_param_value == NULL)
       
  1013               IN_param_value = function_call_param_iterator.next();
       
  1014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1016             
       
  1017             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1018             {
       
  1019         
       
  1020                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1021                 return return_type_symbol;
       
  1022                 
       
  1023             }
       
  1024             
       
  1025             ERROR;
       
  1026         }
       
  1027         
       
  1028     }/*function_sint_to_date*/
       
  1029     break;
       
  1030 
       
  1031 /****
       
  1032  *SINT_TO_TOD
       
  1033  */
       
  1034     case function_sint_to_tod :
       
  1035     {
       
  1036         symbol_c *last_type_symbol = NULL;
       
  1037 
       
  1038         {
       
  1039             identifier_c param_name("IN");
       
  1040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1042             
       
  1043             /* Get the value from a foo(<param_value>) style call */
       
  1044             if (IN_param_value == NULL)
       
  1045               IN_param_value = function_call_param_iterator.next();
       
  1046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1048             
       
  1049             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1050             {
       
  1051         
       
  1052                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1053                 return return_type_symbol;
       
  1054                 
       
  1055             }
       
  1056             
       
  1057             ERROR;
       
  1058         }
       
  1059         
       
  1060     }/*function_sint_to_tod*/
       
  1061     break;
       
  1062 
       
  1063 /****
       
  1064  *SINT_TO_DT
       
  1065  */
       
  1066     case function_sint_to_dt :
       
  1067     {
       
  1068         symbol_c *last_type_symbol = NULL;
       
  1069 
       
  1070         {
       
  1071             identifier_c param_name("IN");
       
  1072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1074             
       
  1075             /* Get the value from a foo(<param_value>) style call */
       
  1076             if (IN_param_value == NULL)
       
  1077               IN_param_value = function_call_param_iterator.next();
       
  1078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1080             
       
  1081             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1082             {
       
  1083         
       
  1084                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1085                 return return_type_symbol;
       
  1086                 
       
  1087             }
       
  1088             
       
  1089             ERROR;
       
  1090         }
       
  1091         
       
  1092     }/*function_sint_to_dt*/
       
  1093     break;
       
  1094 
       
  1095 /****
       
  1096  *SINT_TO_STRING
       
  1097  */
       
  1098     case function_sint_to_string :
       
  1099     {
       
  1100         symbol_c *last_type_symbol = NULL;
       
  1101 
       
  1102         {
       
  1103             identifier_c param_name("IN");
       
  1104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1112             
       
  1113             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1114             {
       
  1115         
       
  1116                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1117                 return return_type_symbol;
       
  1118                 
       
  1119             }
       
  1120             
       
  1121             ERROR;
       
  1122         }
       
  1123         
       
  1124     }/*function_sint_to_string*/
       
  1125     break;
       
  1126 
       
  1127 /****
       
  1128  *SINT_TO_BYTE
       
  1129  */
       
  1130     case function_sint_to_byte :
       
  1131     {
       
  1132         symbol_c *last_type_symbol = NULL;
       
  1133 
       
  1134         {
       
  1135             identifier_c param_name("IN");
       
  1136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1138             
       
  1139             /* Get the value from a foo(<param_value>) style call */
       
  1140             if (IN_param_value == NULL)
       
  1141               IN_param_value = function_call_param_iterator.next();
       
  1142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1144             
       
  1145             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1146             {
       
  1147         
       
  1148                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1149                 return return_type_symbol;
       
  1150                 
       
  1151             }
       
  1152             
       
  1153             ERROR;
       
  1154         }
       
  1155         
       
  1156     }/*function_sint_to_byte*/
       
  1157     break;
       
  1158 
       
  1159 /****
       
  1160  *SINT_TO_WORD
       
  1161  */
       
  1162     case function_sint_to_word :
       
  1163     {
       
  1164         symbol_c *last_type_symbol = NULL;
       
  1165 
       
  1166         {
       
  1167             identifier_c param_name("IN");
       
  1168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1170             
       
  1171             /* Get the value from a foo(<param_value>) style call */
       
  1172             if (IN_param_value == NULL)
       
  1173               IN_param_value = function_call_param_iterator.next();
       
  1174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1176             
       
  1177             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1178             {
       
  1179         
       
  1180                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1181                 return return_type_symbol;
       
  1182                 
       
  1183             }
       
  1184             
       
  1185             ERROR;
       
  1186         }
       
  1187         
       
  1188     }/*function_sint_to_word*/
       
  1189     break;
       
  1190 
       
  1191 /****
       
  1192  *SINT_TO_DWORD
       
  1193  */
       
  1194     case function_sint_to_dword :
       
  1195     {
       
  1196         symbol_c *last_type_symbol = NULL;
       
  1197 
       
  1198         {
       
  1199             identifier_c param_name("IN");
       
  1200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1202             
       
  1203             /* Get the value from a foo(<param_value>) style call */
       
  1204             if (IN_param_value == NULL)
       
  1205               IN_param_value = function_call_param_iterator.next();
       
  1206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1208             
       
  1209             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1210             {
       
  1211         
       
  1212                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1213                 return return_type_symbol;
       
  1214                 
       
  1215             }
       
  1216             
       
  1217             ERROR;
       
  1218         }
       
  1219         
       
  1220     }/*function_sint_to_dword*/
       
  1221     break;
       
  1222 
       
  1223 /****
       
  1224  *SINT_TO_LWORD
       
  1225  */
       
  1226     case function_sint_to_lword :
       
  1227     {
       
  1228         symbol_c *last_type_symbol = NULL;
       
  1229 
       
  1230         {
       
  1231             identifier_c param_name("IN");
       
  1232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1234             
       
  1235             /* Get the value from a foo(<param_value>) style call */
       
  1236             if (IN_param_value == NULL)
       
  1237               IN_param_value = function_call_param_iterator.next();
       
  1238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1240             
       
  1241             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1242             {
       
  1243         
       
  1244                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1245                 return return_type_symbol;
       
  1246                 
       
  1247             }
       
  1248             
       
  1249             ERROR;
       
  1250         }
       
  1251         
       
  1252     }/*function_sint_to_lword*/
       
  1253     break;
       
  1254 
       
  1255 /****
       
  1256  *INT_TO_BOOL
       
  1257  */
       
  1258     case function_int_to_bool :
       
  1259     {
       
  1260         symbol_c *last_type_symbol = NULL;
       
  1261 
       
  1262         {
       
  1263             identifier_c param_name("IN");
       
  1264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1266             
       
  1267             /* Get the value from a foo(<param_value>) style call */
       
  1268             if (IN_param_value == NULL)
       
  1269               IN_param_value = function_call_param_iterator.next();
       
  1270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1272             
       
  1273             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1274             {
       
  1275         
       
  1276                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1277                 return return_type_symbol;
       
  1278                 
       
  1279             }
       
  1280             
       
  1281             ERROR;
       
  1282         }
       
  1283         
       
  1284     }/*function_int_to_bool*/
       
  1285     break;
       
  1286 
       
  1287 /****
       
  1288  *INT_TO_SINT
       
  1289  */
       
  1290     case function_int_to_sint :
       
  1291     {
       
  1292         symbol_c *last_type_symbol = NULL;
       
  1293 
       
  1294         {
       
  1295             identifier_c param_name("IN");
       
  1296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1298             
       
  1299             /* Get the value from a foo(<param_value>) style call */
       
  1300             if (IN_param_value == NULL)
       
  1301               IN_param_value = function_call_param_iterator.next();
       
  1302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1304             
       
  1305             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1306             {
       
  1307         
       
  1308                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  1309                 return return_type_symbol;
       
  1310                 
       
  1311             }
       
  1312             
       
  1313             ERROR;
       
  1314         }
       
  1315         
       
  1316     }/*function_int_to_sint*/
       
  1317     break;
       
  1318 
       
  1319 /****
       
  1320  *INT_TO_DINT
       
  1321  */
       
  1322     case function_int_to_dint :
       
  1323     {
       
  1324         symbol_c *last_type_symbol = NULL;
       
  1325 
       
  1326         {
       
  1327             identifier_c param_name("IN");
       
  1328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1330             
       
  1331             /* Get the value from a foo(<param_value>) style call */
       
  1332             if (IN_param_value == NULL)
       
  1333               IN_param_value = function_call_param_iterator.next();
       
  1334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1336             
       
  1337             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1338             {
       
  1339         
       
  1340                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1341                 return return_type_symbol;
       
  1342                 
       
  1343             }
       
  1344             
       
  1345             ERROR;
       
  1346         }
       
  1347         
       
  1348     }/*function_int_to_dint*/
       
  1349     break;
       
  1350 
       
  1351 /****
       
  1352  *INT_TO_LINT
       
  1353  */
       
  1354     case function_int_to_lint :
       
  1355     {
       
  1356         symbol_c *last_type_symbol = NULL;
       
  1357 
       
  1358         {
       
  1359             identifier_c param_name("IN");
       
  1360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1362             
       
  1363             /* Get the value from a foo(<param_value>) style call */
       
  1364             if (IN_param_value == NULL)
       
  1365               IN_param_value = function_call_param_iterator.next();
       
  1366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1368             
       
  1369             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1370             {
       
  1371         
       
  1372                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  1373                 return return_type_symbol;
       
  1374                 
       
  1375             }
       
  1376             
       
  1377             ERROR;
       
  1378         }
       
  1379         
       
  1380     }/*function_int_to_lint*/
       
  1381     break;
       
  1382 
       
  1383 /****
       
  1384  *INT_TO_USINT
       
  1385  */
       
  1386     case function_int_to_usint :
       
  1387     {
       
  1388         symbol_c *last_type_symbol = NULL;
       
  1389 
       
  1390         {
       
  1391             identifier_c param_name("IN");
       
  1392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1400             
       
  1401             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1402             {
       
  1403         
       
  1404                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1405                 return return_type_symbol;
       
  1406                 
       
  1407             }
       
  1408             
       
  1409             ERROR;
       
  1410         }
       
  1411         
       
  1412     }/*function_int_to_usint*/
       
  1413     break;
       
  1414 
       
  1415 /****
       
  1416  *INT_TO_UINT
       
  1417  */
       
  1418     case function_int_to_uint :
       
  1419     {
       
  1420         symbol_c *last_type_symbol = NULL;
       
  1421 
       
  1422         {
       
  1423             identifier_c param_name("IN");
       
  1424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1426             
       
  1427             /* Get the value from a foo(<param_value>) style call */
       
  1428             if (IN_param_value == NULL)
       
  1429               IN_param_value = function_call_param_iterator.next();
       
  1430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1432             
       
  1433             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1434             {
       
  1435         
       
  1436                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1437                 return return_type_symbol;
       
  1438                 
       
  1439             }
       
  1440             
       
  1441             ERROR;
       
  1442         }
       
  1443         
       
  1444     }/*function_int_to_uint*/
       
  1445     break;
       
  1446 
       
  1447 /****
       
  1448  *INT_TO_UDINT
       
  1449  */
       
  1450     case function_int_to_udint :
       
  1451     {
       
  1452         symbol_c *last_type_symbol = NULL;
       
  1453 
       
  1454         {
       
  1455             identifier_c param_name("IN");
       
  1456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1458             
       
  1459             /* Get the value from a foo(<param_value>) style call */
       
  1460             if (IN_param_value == NULL)
       
  1461               IN_param_value = function_call_param_iterator.next();
       
  1462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1464             
       
  1465             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1466             {
       
  1467         
       
  1468                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1469                 return return_type_symbol;
       
  1470                 
       
  1471             }
       
  1472             
       
  1473             ERROR;
       
  1474         }
       
  1475         
       
  1476     }/*function_int_to_udint*/
       
  1477     break;
       
  1478 
       
  1479 /****
       
  1480  *INT_TO_ULINT
       
  1481  */
       
  1482     case function_int_to_ulint :
       
  1483     {
       
  1484         symbol_c *last_type_symbol = NULL;
       
  1485 
       
  1486         {
       
  1487             identifier_c param_name("IN");
       
  1488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1490             
       
  1491             /* Get the value from a foo(<param_value>) style call */
       
  1492             if (IN_param_value == NULL)
       
  1493               IN_param_value = function_call_param_iterator.next();
       
  1494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1496             
       
  1497             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1498             {
       
  1499         
       
  1500                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1501                 return return_type_symbol;
       
  1502                 
       
  1503             }
       
  1504             
       
  1505             ERROR;
       
  1506         }
       
  1507         
       
  1508     }/*function_int_to_ulint*/
       
  1509     break;
       
  1510 
       
  1511 /****
       
  1512  *INT_TO_REAL
       
  1513  */
       
  1514     case function_int_to_real :
       
  1515     {
       
  1516         symbol_c *last_type_symbol = NULL;
       
  1517 
       
  1518         {
       
  1519             identifier_c param_name("IN");
       
  1520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1522             
       
  1523             /* Get the value from a foo(<param_value>) style call */
       
  1524             if (IN_param_value == NULL)
       
  1525               IN_param_value = function_call_param_iterator.next();
       
  1526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1528             
       
  1529             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1530             {
       
  1531         
       
  1532                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1533                 return return_type_symbol;
       
  1534                 
       
  1535             }
       
  1536             
       
  1537             ERROR;
       
  1538         }
       
  1539         
       
  1540     }/*function_int_to_real*/
       
  1541     break;
       
  1542 
       
  1543 /****
       
  1544  *INT_TO_LREAL
       
  1545  */
       
  1546     case function_int_to_lreal :
       
  1547     {
       
  1548         symbol_c *last_type_symbol = NULL;
       
  1549 
       
  1550         {
       
  1551             identifier_c param_name("IN");
       
  1552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1554             
       
  1555             /* Get the value from a foo(<param_value>) style call */
       
  1556             if (IN_param_value == NULL)
       
  1557               IN_param_value = function_call_param_iterator.next();
       
  1558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1560             
       
  1561             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1562             {
       
  1563         
       
  1564                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1565                 return return_type_symbol;
       
  1566                 
       
  1567             }
       
  1568             
       
  1569             ERROR;
       
  1570         }
       
  1571         
       
  1572     }/*function_int_to_lreal*/
       
  1573     break;
       
  1574 
       
  1575 /****
       
  1576  *INT_TO_TIME
       
  1577  */
       
  1578     case function_int_to_time :
       
  1579     {
       
  1580         symbol_c *last_type_symbol = NULL;
       
  1581 
       
  1582         {
       
  1583             identifier_c param_name("IN");
       
  1584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1586             
       
  1587             /* Get the value from a foo(<param_value>) style call */
       
  1588             if (IN_param_value == NULL)
       
  1589               IN_param_value = function_call_param_iterator.next();
       
  1590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1592             
       
  1593             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1594             {
       
  1595         
       
  1596                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1597                 return return_type_symbol;
       
  1598                 
       
  1599             }
       
  1600             
       
  1601             ERROR;
       
  1602         }
       
  1603         
       
  1604     }/*function_int_to_time*/
       
  1605     break;
       
  1606 
       
  1607 /****
       
  1608  *INT_TO_DATE
       
  1609  */
       
  1610     case function_int_to_date :
       
  1611     {
       
  1612         symbol_c *last_type_symbol = NULL;
       
  1613 
       
  1614         {
       
  1615             identifier_c param_name("IN");
       
  1616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1618             
       
  1619             /* Get the value from a foo(<param_value>) style call */
       
  1620             if (IN_param_value == NULL)
       
  1621               IN_param_value = function_call_param_iterator.next();
       
  1622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1624             
       
  1625             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1626             {
       
  1627         
       
  1628                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1629                 return return_type_symbol;
       
  1630                 
       
  1631             }
       
  1632             
       
  1633             ERROR;
       
  1634         }
       
  1635         
       
  1636     }/*function_int_to_date*/
       
  1637     break;
       
  1638 
       
  1639 /****
       
  1640  *INT_TO_TOD
       
  1641  */
       
  1642     case function_int_to_tod :
       
  1643     {
       
  1644         symbol_c *last_type_symbol = NULL;
       
  1645 
       
  1646         {
       
  1647             identifier_c param_name("IN");
       
  1648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1650             
       
  1651             /* Get the value from a foo(<param_value>) style call */
       
  1652             if (IN_param_value == NULL)
       
  1653               IN_param_value = function_call_param_iterator.next();
       
  1654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1656             
       
  1657             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1658             {
       
  1659         
       
  1660                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1661                 return return_type_symbol;
       
  1662                 
       
  1663             }
       
  1664             
       
  1665             ERROR;
       
  1666         }
       
  1667         
       
  1668     }/*function_int_to_tod*/
       
  1669     break;
       
  1670 
       
  1671 /****
       
  1672  *INT_TO_DT
       
  1673  */
       
  1674     case function_int_to_dt :
       
  1675     {
       
  1676         symbol_c *last_type_symbol = NULL;
       
  1677 
       
  1678         {
       
  1679             identifier_c param_name("IN");
       
  1680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1688             
       
  1689             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1690             {
       
  1691         
       
  1692                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1693                 return return_type_symbol;
       
  1694                 
       
  1695             }
       
  1696             
       
  1697             ERROR;
       
  1698         }
       
  1699         
       
  1700     }/*function_int_to_dt*/
       
  1701     break;
       
  1702 
       
  1703 /****
       
  1704  *INT_TO_STRING
       
  1705  */
       
  1706     case function_int_to_string :
       
  1707     {
       
  1708         symbol_c *last_type_symbol = NULL;
       
  1709 
       
  1710         {
       
  1711             identifier_c param_name("IN");
       
  1712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1714             
       
  1715             /* Get the value from a foo(<param_value>) style call */
       
  1716             if (IN_param_value == NULL)
       
  1717               IN_param_value = function_call_param_iterator.next();
       
  1718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1720             
       
  1721             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1722             {
       
  1723         
       
  1724                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1725                 return return_type_symbol;
       
  1726                 
       
  1727             }
       
  1728             
       
  1729             ERROR;
       
  1730         }
       
  1731         
       
  1732     }/*function_int_to_string*/
       
  1733     break;
       
  1734 
       
  1735 /****
       
  1736  *INT_TO_BYTE
       
  1737  */
       
  1738     case function_int_to_byte :
       
  1739     {
       
  1740         symbol_c *last_type_symbol = NULL;
       
  1741 
       
  1742         {
       
  1743             identifier_c param_name("IN");
       
  1744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1746             
       
  1747             /* Get the value from a foo(<param_value>) style call */
       
  1748             if (IN_param_value == NULL)
       
  1749               IN_param_value = function_call_param_iterator.next();
       
  1750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1752             
       
  1753             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1754             {
       
  1755         
       
  1756                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1757                 return return_type_symbol;
       
  1758                 
       
  1759             }
       
  1760             
       
  1761             ERROR;
       
  1762         }
       
  1763         
       
  1764     }/*function_int_to_byte*/
       
  1765     break;
       
  1766 
       
  1767 /****
       
  1768  *INT_TO_WORD
       
  1769  */
       
  1770     case function_int_to_word :
       
  1771     {
       
  1772         symbol_c *last_type_symbol = NULL;
       
  1773 
       
  1774         {
       
  1775             identifier_c param_name("IN");
       
  1776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1778             
       
  1779             /* Get the value from a foo(<param_value>) style call */
       
  1780             if (IN_param_value == NULL)
       
  1781               IN_param_value = function_call_param_iterator.next();
       
  1782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1784             
       
  1785             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1786             {
       
  1787         
       
  1788                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1789                 return return_type_symbol;
       
  1790                 
       
  1791             }
       
  1792             
       
  1793             ERROR;
       
  1794         }
       
  1795         
       
  1796     }/*function_int_to_word*/
       
  1797     break;
       
  1798 
       
  1799 /****
       
  1800  *INT_TO_DWORD
       
  1801  */
       
  1802     case function_int_to_dword :
       
  1803     {
       
  1804         symbol_c *last_type_symbol = NULL;
       
  1805 
       
  1806         {
       
  1807             identifier_c param_name("IN");
       
  1808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1810             
       
  1811             /* Get the value from a foo(<param_value>) style call */
       
  1812             if (IN_param_value == NULL)
       
  1813               IN_param_value = function_call_param_iterator.next();
       
  1814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1816             
       
  1817             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1818             {
       
  1819         
       
  1820                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1821                 return return_type_symbol;
       
  1822                 
       
  1823             }
       
  1824             
       
  1825             ERROR;
       
  1826         }
       
  1827         
       
  1828     }/*function_int_to_dword*/
       
  1829     break;
       
  1830 
       
  1831 /****
       
  1832  *INT_TO_LWORD
       
  1833  */
       
  1834     case function_int_to_lword :
       
  1835     {
       
  1836         symbol_c *last_type_symbol = NULL;
       
  1837 
       
  1838         {
       
  1839             identifier_c param_name("IN");
       
  1840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1842             
       
  1843             /* Get the value from a foo(<param_value>) style call */
       
  1844             if (IN_param_value == NULL)
       
  1845               IN_param_value = function_call_param_iterator.next();
       
  1846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1848             
       
  1849             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
  1850             {
       
  1851         
       
  1852                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1853                 return return_type_symbol;
       
  1854                 
       
  1855             }
       
  1856             
       
  1857             ERROR;
       
  1858         }
       
  1859         
       
  1860     }/*function_int_to_lword*/
       
  1861     break;
       
  1862 
       
  1863 /****
       
  1864  *DINT_TO_BOOL
       
  1865  */
       
  1866     case function_dint_to_bool :
       
  1867     {
       
  1868         symbol_c *last_type_symbol = NULL;
       
  1869 
       
  1870         {
       
  1871             identifier_c param_name("IN");
       
  1872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1874             
       
  1875             /* Get the value from a foo(<param_value>) style call */
       
  1876             if (IN_param_value == NULL)
       
  1877               IN_param_value = function_call_param_iterator.next();
       
  1878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1880             
       
  1881             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  1882             {
       
  1883         
       
  1884                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1885                 return return_type_symbol;
       
  1886                 
       
  1887             }
       
  1888             
       
  1889             ERROR;
       
  1890         }
       
  1891         
       
  1892     }/*function_dint_to_bool*/
       
  1893     break;
       
  1894 
       
  1895 /****
       
  1896  *DINT_TO_SINT
       
  1897  */
       
  1898     case function_dint_to_sint :
       
  1899     {
       
  1900         symbol_c *last_type_symbol = NULL;
       
  1901 
       
  1902         {
       
  1903             identifier_c param_name("IN");
       
  1904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1906             
       
  1907             /* Get the value from a foo(<param_value>) style call */
       
  1908             if (IN_param_value == NULL)
       
  1909               IN_param_value = function_call_param_iterator.next();
       
  1910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1912             
       
  1913             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  1914             {
       
  1915         
       
  1916                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  1917                 return return_type_symbol;
       
  1918                 
       
  1919             }
       
  1920             
       
  1921             ERROR;
       
  1922         }
       
  1923         
       
  1924     }/*function_dint_to_sint*/
       
  1925     break;
       
  1926 
       
  1927 /****
       
  1928  *DINT_TO_INT
       
  1929  */
       
  1930     case function_dint_to_int :
       
  1931     {
       
  1932         symbol_c *last_type_symbol = NULL;
       
  1933 
       
  1934         {
       
  1935             identifier_c param_name("IN");
       
  1936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1938             
       
  1939             /* Get the value from a foo(<param_value>) style call */
       
  1940             if (IN_param_value == NULL)
       
  1941               IN_param_value = function_call_param_iterator.next();
       
  1942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1944             
       
  1945             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  1946             {
       
  1947         
       
  1948                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1949                 return return_type_symbol;
       
  1950                 
       
  1951             }
       
  1952             
       
  1953             ERROR;
       
  1954         }
       
  1955         
       
  1956     }/*function_dint_to_int*/
       
  1957     break;
       
  1958 
       
  1959 /****
       
  1960  *DINT_TO_LINT
       
  1961  */
       
  1962     case function_dint_to_lint :
       
  1963     {
       
  1964         symbol_c *last_type_symbol = NULL;
       
  1965 
       
  1966         {
       
  1967             identifier_c param_name("IN");
       
  1968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1976             
       
  1977             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  1978             {
       
  1979         
       
  1980                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  1981                 return return_type_symbol;
       
  1982                 
       
  1983             }
       
  1984             
       
  1985             ERROR;
       
  1986         }
       
  1987         
       
  1988     }/*function_dint_to_lint*/
       
  1989     break;
       
  1990 
       
  1991 /****
       
  1992  *DINT_TO_USINT
       
  1993  */
       
  1994     case function_dint_to_usint :
       
  1995     {
       
  1996         symbol_c *last_type_symbol = NULL;
       
  1997 
       
  1998         {
       
  1999             identifier_c param_name("IN");
       
  2000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2002             
       
  2003             /* Get the value from a foo(<param_value>) style call */
       
  2004             if (IN_param_value == NULL)
       
  2005               IN_param_value = function_call_param_iterator.next();
       
  2006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2008             
       
  2009             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2010             {
       
  2011         
       
  2012                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2013                 return return_type_symbol;
       
  2014                 
       
  2015             }
       
  2016             
       
  2017             ERROR;
       
  2018         }
       
  2019         
       
  2020     }/*function_dint_to_usint*/
       
  2021     break;
       
  2022 
       
  2023 /****
       
  2024  *DINT_TO_UINT
       
  2025  */
       
  2026     case function_dint_to_uint :
       
  2027     {
       
  2028         symbol_c *last_type_symbol = NULL;
       
  2029 
       
  2030         {
       
  2031             identifier_c param_name("IN");
       
  2032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2034             
       
  2035             /* Get the value from a foo(<param_value>) style call */
       
  2036             if (IN_param_value == NULL)
       
  2037               IN_param_value = function_call_param_iterator.next();
       
  2038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2040             
       
  2041             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2042             {
       
  2043         
       
  2044                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2045                 return return_type_symbol;
       
  2046                 
       
  2047             }
       
  2048             
       
  2049             ERROR;
       
  2050         }
       
  2051         
       
  2052     }/*function_dint_to_uint*/
       
  2053     break;
       
  2054 
       
  2055 /****
       
  2056  *DINT_TO_UDINT
       
  2057  */
       
  2058     case function_dint_to_udint :
       
  2059     {
       
  2060         symbol_c *last_type_symbol = NULL;
       
  2061 
       
  2062         {
       
  2063             identifier_c param_name("IN");
       
  2064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2066             
       
  2067             /* Get the value from a foo(<param_value>) style call */
       
  2068             if (IN_param_value == NULL)
       
  2069               IN_param_value = function_call_param_iterator.next();
       
  2070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2072             
       
  2073             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2074             {
       
  2075         
       
  2076                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2077                 return return_type_symbol;
       
  2078                 
       
  2079             }
       
  2080             
       
  2081             ERROR;
       
  2082         }
       
  2083         
       
  2084     }/*function_dint_to_udint*/
       
  2085     break;
       
  2086 
       
  2087 /****
       
  2088  *DINT_TO_ULINT
       
  2089  */
       
  2090     case function_dint_to_ulint :
       
  2091     {
       
  2092         symbol_c *last_type_symbol = NULL;
       
  2093 
       
  2094         {
       
  2095             identifier_c param_name("IN");
       
  2096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2098             
       
  2099             /* Get the value from a foo(<param_value>) style call */
       
  2100             if (IN_param_value == NULL)
       
  2101               IN_param_value = function_call_param_iterator.next();
       
  2102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2104             
       
  2105             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2106             {
       
  2107         
       
  2108                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2109                 return return_type_symbol;
       
  2110                 
       
  2111             }
       
  2112             
       
  2113             ERROR;
       
  2114         }
       
  2115         
       
  2116     }/*function_dint_to_ulint*/
       
  2117     break;
       
  2118 
       
  2119 /****
       
  2120  *DINT_TO_REAL
       
  2121  */
       
  2122     case function_dint_to_real :
       
  2123     {
       
  2124         symbol_c *last_type_symbol = NULL;
       
  2125 
       
  2126         {
       
  2127             identifier_c param_name("IN");
       
  2128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2130             
       
  2131             /* Get the value from a foo(<param_value>) style call */
       
  2132             if (IN_param_value == NULL)
       
  2133               IN_param_value = function_call_param_iterator.next();
       
  2134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2136             
       
  2137             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2138             {
       
  2139         
       
  2140                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2141                 return return_type_symbol;
       
  2142                 
       
  2143             }
       
  2144             
       
  2145             ERROR;
       
  2146         }
       
  2147         
       
  2148     }/*function_dint_to_real*/
       
  2149     break;
       
  2150 
       
  2151 /****
       
  2152  *DINT_TO_LREAL
       
  2153  */
       
  2154     case function_dint_to_lreal :
       
  2155     {
       
  2156         symbol_c *last_type_symbol = NULL;
       
  2157 
       
  2158         {
       
  2159             identifier_c param_name("IN");
       
  2160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2162             
       
  2163             /* Get the value from a foo(<param_value>) style call */
       
  2164             if (IN_param_value == NULL)
       
  2165               IN_param_value = function_call_param_iterator.next();
       
  2166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2168             
       
  2169             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2170             {
       
  2171         
       
  2172                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2173                 return return_type_symbol;
       
  2174                 
       
  2175             }
       
  2176             
       
  2177             ERROR;
       
  2178         }
       
  2179         
       
  2180     }/*function_dint_to_lreal*/
       
  2181     break;
       
  2182 
       
  2183 /****
       
  2184  *DINT_TO_TIME
       
  2185  */
       
  2186     case function_dint_to_time :
       
  2187     {
       
  2188         symbol_c *last_type_symbol = NULL;
       
  2189 
       
  2190         {
       
  2191             identifier_c param_name("IN");
       
  2192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2194             
       
  2195             /* Get the value from a foo(<param_value>) style call */
       
  2196             if (IN_param_value == NULL)
       
  2197               IN_param_value = function_call_param_iterator.next();
       
  2198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2200             
       
  2201             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2202             {
       
  2203         
       
  2204                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2205                 return return_type_symbol;
       
  2206                 
       
  2207             }
       
  2208             
       
  2209             ERROR;
       
  2210         }
       
  2211         
       
  2212     }/*function_dint_to_time*/
       
  2213     break;
       
  2214 
       
  2215 /****
       
  2216  *DINT_TO_DATE
       
  2217  */
       
  2218     case function_dint_to_date :
       
  2219     {
       
  2220         symbol_c *last_type_symbol = NULL;
       
  2221 
       
  2222         {
       
  2223             identifier_c param_name("IN");
       
  2224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2226             
       
  2227             /* Get the value from a foo(<param_value>) style call */
       
  2228             if (IN_param_value == NULL)
       
  2229               IN_param_value = function_call_param_iterator.next();
       
  2230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2232             
       
  2233             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2234             {
       
  2235         
       
  2236                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2237                 return return_type_symbol;
       
  2238                 
       
  2239             }
       
  2240             
       
  2241             ERROR;
       
  2242         }
       
  2243         
       
  2244     }/*function_dint_to_date*/
       
  2245     break;
       
  2246 
       
  2247 /****
       
  2248  *DINT_TO_TOD
       
  2249  */
       
  2250     case function_dint_to_tod :
       
  2251     {
       
  2252         symbol_c *last_type_symbol = NULL;
       
  2253 
       
  2254         {
       
  2255             identifier_c param_name("IN");
       
  2256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2264             
       
  2265             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2266             {
       
  2267         
       
  2268                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2269                 return return_type_symbol;
       
  2270                 
       
  2271             }
       
  2272             
       
  2273             ERROR;
       
  2274         }
       
  2275         
       
  2276     }/*function_dint_to_tod*/
       
  2277     break;
       
  2278 
       
  2279 /****
       
  2280  *DINT_TO_DT
       
  2281  */
       
  2282     case function_dint_to_dt :
       
  2283     {
       
  2284         symbol_c *last_type_symbol = NULL;
       
  2285 
       
  2286         {
       
  2287             identifier_c param_name("IN");
       
  2288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2290             
       
  2291             /* Get the value from a foo(<param_value>) style call */
       
  2292             if (IN_param_value == NULL)
       
  2293               IN_param_value = function_call_param_iterator.next();
       
  2294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2296             
       
  2297             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2298             {
       
  2299         
       
  2300                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2301                 return return_type_symbol;
       
  2302                 
       
  2303             }
       
  2304             
       
  2305             ERROR;
       
  2306         }
       
  2307         
       
  2308     }/*function_dint_to_dt*/
       
  2309     break;
       
  2310 
       
  2311 /****
       
  2312  *DINT_TO_STRING
       
  2313  */
       
  2314     case function_dint_to_string :
       
  2315     {
       
  2316         symbol_c *last_type_symbol = NULL;
       
  2317 
       
  2318         {
       
  2319             identifier_c param_name("IN");
       
  2320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2322             
       
  2323             /* Get the value from a foo(<param_value>) style call */
       
  2324             if (IN_param_value == NULL)
       
  2325               IN_param_value = function_call_param_iterator.next();
       
  2326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2328             
       
  2329             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2330             {
       
  2331         
       
  2332                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2333                 return return_type_symbol;
       
  2334                 
       
  2335             }
       
  2336             
       
  2337             ERROR;
       
  2338         }
       
  2339         
       
  2340     }/*function_dint_to_string*/
       
  2341     break;
       
  2342 
       
  2343 /****
       
  2344  *DINT_TO_BYTE
       
  2345  */
       
  2346     case function_dint_to_byte :
       
  2347     {
       
  2348         symbol_c *last_type_symbol = NULL;
       
  2349 
       
  2350         {
       
  2351             identifier_c param_name("IN");
       
  2352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2354             
       
  2355             /* Get the value from a foo(<param_value>) style call */
       
  2356             if (IN_param_value == NULL)
       
  2357               IN_param_value = function_call_param_iterator.next();
       
  2358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2360             
       
  2361             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2362             {
       
  2363         
       
  2364                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2365                 return return_type_symbol;
       
  2366                 
       
  2367             }
       
  2368             
       
  2369             ERROR;
       
  2370         }
       
  2371         
       
  2372     }/*function_dint_to_byte*/
       
  2373     break;
       
  2374 
       
  2375 /****
       
  2376  *DINT_TO_WORD
       
  2377  */
       
  2378     case function_dint_to_word :
       
  2379     {
       
  2380         symbol_c *last_type_symbol = NULL;
       
  2381 
       
  2382         {
       
  2383             identifier_c param_name("IN");
       
  2384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2386             
       
  2387             /* Get the value from a foo(<param_value>) style call */
       
  2388             if (IN_param_value == NULL)
       
  2389               IN_param_value = function_call_param_iterator.next();
       
  2390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2392             
       
  2393             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2394             {
       
  2395         
       
  2396                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2397                 return return_type_symbol;
       
  2398                 
       
  2399             }
       
  2400             
       
  2401             ERROR;
       
  2402         }
       
  2403         
       
  2404     }/*function_dint_to_word*/
       
  2405     break;
       
  2406 
       
  2407 /****
       
  2408  *DINT_TO_DWORD
       
  2409  */
       
  2410     case function_dint_to_dword :
       
  2411     {
       
  2412         symbol_c *last_type_symbol = NULL;
       
  2413 
       
  2414         {
       
  2415             identifier_c param_name("IN");
       
  2416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2418             
       
  2419             /* Get the value from a foo(<param_value>) style call */
       
  2420             if (IN_param_value == NULL)
       
  2421               IN_param_value = function_call_param_iterator.next();
       
  2422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2424             
       
  2425             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2426             {
       
  2427         
       
  2428                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2429                 return return_type_symbol;
       
  2430                 
       
  2431             }
       
  2432             
       
  2433             ERROR;
       
  2434         }
       
  2435         
       
  2436     }/*function_dint_to_dword*/
       
  2437     break;
       
  2438 
       
  2439 /****
       
  2440  *DINT_TO_LWORD
       
  2441  */
       
  2442     case function_dint_to_lword :
       
  2443     {
       
  2444         symbol_c *last_type_symbol = NULL;
       
  2445 
       
  2446         {
       
  2447             identifier_c param_name("IN");
       
  2448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2450             
       
  2451             /* Get the value from a foo(<param_value>) style call */
       
  2452             if (IN_param_value == NULL)
       
  2453               IN_param_value = function_call_param_iterator.next();
       
  2454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2456             
       
  2457             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2458             {
       
  2459         
       
  2460                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2461                 return return_type_symbol;
       
  2462                 
       
  2463             }
       
  2464             
       
  2465             ERROR;
       
  2466         }
       
  2467         
       
  2468     }/*function_dint_to_lword*/
       
  2469     break;
       
  2470 
       
  2471 /****
       
  2472  *LINT_TO_BOOL
       
  2473  */
       
  2474     case function_lint_to_bool :
       
  2475     {
       
  2476         symbol_c *last_type_symbol = NULL;
       
  2477 
       
  2478         {
       
  2479             identifier_c param_name("IN");
       
  2480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2482             
       
  2483             /* Get the value from a foo(<param_value>) style call */
       
  2484             if (IN_param_value == NULL)
       
  2485               IN_param_value = function_call_param_iterator.next();
       
  2486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2488             
       
  2489             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2490             {
       
  2491         
       
  2492                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2493                 return return_type_symbol;
       
  2494                 
       
  2495             }
       
  2496             
       
  2497             ERROR;
       
  2498         }
       
  2499         
       
  2500     }/*function_lint_to_bool*/
       
  2501     break;
       
  2502 
       
  2503 /****
       
  2504  *LINT_TO_SINT
       
  2505  */
       
  2506     case function_lint_to_sint :
       
  2507     {
       
  2508         symbol_c *last_type_symbol = NULL;
       
  2509 
       
  2510         {
       
  2511             identifier_c param_name("IN");
       
  2512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2514             
       
  2515             /* Get the value from a foo(<param_value>) style call */
       
  2516             if (IN_param_value == NULL)
       
  2517               IN_param_value = function_call_param_iterator.next();
       
  2518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2520             
       
  2521             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2522             {
       
  2523         
       
  2524                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2525                 return return_type_symbol;
       
  2526                 
       
  2527             }
       
  2528             
       
  2529             ERROR;
       
  2530         }
       
  2531         
       
  2532     }/*function_lint_to_sint*/
       
  2533     break;
       
  2534 
       
  2535 /****
       
  2536  *LINT_TO_INT
       
  2537  */
       
  2538     case function_lint_to_int :
       
  2539     {
       
  2540         symbol_c *last_type_symbol = NULL;
       
  2541 
       
  2542         {
       
  2543             identifier_c param_name("IN");
       
  2544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2552             
       
  2553             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2554             {
       
  2555         
       
  2556                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2557                 return return_type_symbol;
       
  2558                 
       
  2559             }
       
  2560             
       
  2561             ERROR;
       
  2562         }
       
  2563         
       
  2564     }/*function_lint_to_int*/
       
  2565     break;
       
  2566 
       
  2567 /****
       
  2568  *LINT_TO_DINT
       
  2569  */
       
  2570     case function_lint_to_dint :
       
  2571     {
       
  2572         symbol_c *last_type_symbol = NULL;
       
  2573 
       
  2574         {
       
  2575             identifier_c param_name("IN");
       
  2576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2578             
       
  2579             /* Get the value from a foo(<param_value>) style call */
       
  2580             if (IN_param_value == NULL)
       
  2581               IN_param_value = function_call_param_iterator.next();
       
  2582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2584             
       
  2585             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2586             {
       
  2587         
       
  2588                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  2589                 return return_type_symbol;
       
  2590                 
       
  2591             }
       
  2592             
       
  2593             ERROR;
       
  2594         }
       
  2595         
       
  2596     }/*function_lint_to_dint*/
       
  2597     break;
       
  2598 
       
  2599 /****
       
  2600  *LINT_TO_USINT
       
  2601  */
       
  2602     case function_lint_to_usint :
       
  2603     {
       
  2604         symbol_c *last_type_symbol = NULL;
       
  2605 
       
  2606         {
       
  2607             identifier_c param_name("IN");
       
  2608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2610             
       
  2611             /* Get the value from a foo(<param_value>) style call */
       
  2612             if (IN_param_value == NULL)
       
  2613               IN_param_value = function_call_param_iterator.next();
       
  2614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2616             
       
  2617             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2618             {
       
  2619         
       
  2620                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2621                 return return_type_symbol;
       
  2622                 
       
  2623             }
       
  2624             
       
  2625             ERROR;
       
  2626         }
       
  2627         
       
  2628     }/*function_lint_to_usint*/
       
  2629     break;
       
  2630 
       
  2631 /****
       
  2632  *LINT_TO_UINT
       
  2633  */
       
  2634     case function_lint_to_uint :
       
  2635     {
       
  2636         symbol_c *last_type_symbol = NULL;
       
  2637 
       
  2638         {
       
  2639             identifier_c param_name("IN");
       
  2640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2642             
       
  2643             /* Get the value from a foo(<param_value>) style call */
       
  2644             if (IN_param_value == NULL)
       
  2645               IN_param_value = function_call_param_iterator.next();
       
  2646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2648             
       
  2649             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2650             {
       
  2651         
       
  2652                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2653                 return return_type_symbol;
       
  2654                 
       
  2655             }
       
  2656             
       
  2657             ERROR;
       
  2658         }
       
  2659         
       
  2660     }/*function_lint_to_uint*/
       
  2661     break;
       
  2662 
       
  2663 /****
       
  2664  *LINT_TO_UDINT
       
  2665  */
       
  2666     case function_lint_to_udint :
       
  2667     {
       
  2668         symbol_c *last_type_symbol = NULL;
       
  2669 
       
  2670         {
       
  2671             identifier_c param_name("IN");
       
  2672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2674             
       
  2675             /* Get the value from a foo(<param_value>) style call */
       
  2676             if (IN_param_value == NULL)
       
  2677               IN_param_value = function_call_param_iterator.next();
       
  2678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2680             
       
  2681             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2682             {
       
  2683         
       
  2684                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2685                 return return_type_symbol;
       
  2686                 
       
  2687             }
       
  2688             
       
  2689             ERROR;
       
  2690         }
       
  2691         
       
  2692     }/*function_lint_to_udint*/
       
  2693     break;
       
  2694 
       
  2695 /****
       
  2696  *LINT_TO_ULINT
       
  2697  */
       
  2698     case function_lint_to_ulint :
       
  2699     {
       
  2700         symbol_c *last_type_symbol = NULL;
       
  2701 
       
  2702         {
       
  2703             identifier_c param_name("IN");
       
  2704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2706             
       
  2707             /* Get the value from a foo(<param_value>) style call */
       
  2708             if (IN_param_value == NULL)
       
  2709               IN_param_value = function_call_param_iterator.next();
       
  2710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2712             
       
  2713             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2714             {
       
  2715         
       
  2716                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2717                 return return_type_symbol;
       
  2718                 
       
  2719             }
       
  2720             
       
  2721             ERROR;
       
  2722         }
       
  2723         
       
  2724     }/*function_lint_to_ulint*/
       
  2725     break;
       
  2726 
       
  2727 /****
       
  2728  *LINT_TO_REAL
       
  2729  */
       
  2730     case function_lint_to_real :
       
  2731     {
       
  2732         symbol_c *last_type_symbol = NULL;
       
  2733 
       
  2734         {
       
  2735             identifier_c param_name("IN");
       
  2736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2738             
       
  2739             /* Get the value from a foo(<param_value>) style call */
       
  2740             if (IN_param_value == NULL)
       
  2741               IN_param_value = function_call_param_iterator.next();
       
  2742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2744             
       
  2745             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2746             {
       
  2747         
       
  2748                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2749                 return return_type_symbol;
       
  2750                 
       
  2751             }
       
  2752             
       
  2753             ERROR;
       
  2754         }
       
  2755         
       
  2756     }/*function_lint_to_real*/
       
  2757     break;
       
  2758 
       
  2759 /****
       
  2760  *LINT_TO_LREAL
       
  2761  */
       
  2762     case function_lint_to_lreal :
       
  2763     {
       
  2764         symbol_c *last_type_symbol = NULL;
       
  2765 
       
  2766         {
       
  2767             identifier_c param_name("IN");
       
  2768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2770             
       
  2771             /* Get the value from a foo(<param_value>) style call */
       
  2772             if (IN_param_value == NULL)
       
  2773               IN_param_value = function_call_param_iterator.next();
       
  2774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2776             
       
  2777             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2778             {
       
  2779         
       
  2780                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2781                 return return_type_symbol;
       
  2782                 
       
  2783             }
       
  2784             
       
  2785             ERROR;
       
  2786         }
       
  2787         
       
  2788     }/*function_lint_to_lreal*/
       
  2789     break;
       
  2790 
       
  2791 /****
       
  2792  *LINT_TO_TIME
       
  2793  */
       
  2794     case function_lint_to_time :
       
  2795     {
       
  2796         symbol_c *last_type_symbol = NULL;
       
  2797 
       
  2798         {
       
  2799             identifier_c param_name("IN");
       
  2800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2802             
       
  2803             /* Get the value from a foo(<param_value>) style call */
       
  2804             if (IN_param_value == NULL)
       
  2805               IN_param_value = function_call_param_iterator.next();
       
  2806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2808             
       
  2809             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2810             {
       
  2811         
       
  2812                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2813                 return return_type_symbol;
       
  2814                 
       
  2815             }
       
  2816             
       
  2817             ERROR;
       
  2818         }
       
  2819         
       
  2820     }/*function_lint_to_time*/
       
  2821     break;
       
  2822 
       
  2823 /****
       
  2824  *LINT_TO_DATE
       
  2825  */
       
  2826     case function_lint_to_date :
       
  2827     {
       
  2828         symbol_c *last_type_symbol = NULL;
       
  2829 
       
  2830         {
       
  2831             identifier_c param_name("IN");
       
  2832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2840             
       
  2841             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2842             {
       
  2843         
       
  2844                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2845                 return return_type_symbol;
       
  2846                 
       
  2847             }
       
  2848             
       
  2849             ERROR;
       
  2850         }
       
  2851         
       
  2852     }/*function_lint_to_date*/
       
  2853     break;
       
  2854 
       
  2855 /****
       
  2856  *LINT_TO_TOD
       
  2857  */
       
  2858     case function_lint_to_tod :
       
  2859     {
       
  2860         symbol_c *last_type_symbol = NULL;
       
  2861 
       
  2862         {
       
  2863             identifier_c param_name("IN");
       
  2864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2866             
       
  2867             /* Get the value from a foo(<param_value>) style call */
       
  2868             if (IN_param_value == NULL)
       
  2869               IN_param_value = function_call_param_iterator.next();
       
  2870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2872             
       
  2873             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2874             {
       
  2875         
       
  2876                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2877                 return return_type_symbol;
       
  2878                 
       
  2879             }
       
  2880             
       
  2881             ERROR;
       
  2882         }
       
  2883         
       
  2884     }/*function_lint_to_tod*/
       
  2885     break;
       
  2886 
       
  2887 /****
       
  2888  *LINT_TO_DT
       
  2889  */
       
  2890     case function_lint_to_dt :
       
  2891     {
       
  2892         symbol_c *last_type_symbol = NULL;
       
  2893 
       
  2894         {
       
  2895             identifier_c param_name("IN");
       
  2896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2898             
       
  2899             /* Get the value from a foo(<param_value>) style call */
       
  2900             if (IN_param_value == NULL)
       
  2901               IN_param_value = function_call_param_iterator.next();
       
  2902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2904             
       
  2905             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2906             {
       
  2907         
       
  2908                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2909                 return return_type_symbol;
       
  2910                 
       
  2911             }
       
  2912             
       
  2913             ERROR;
       
  2914         }
       
  2915         
       
  2916     }/*function_lint_to_dt*/
       
  2917     break;
       
  2918 
       
  2919 /****
       
  2920  *LINT_TO_STRING
       
  2921  */
       
  2922     case function_lint_to_string :
       
  2923     {
       
  2924         symbol_c *last_type_symbol = NULL;
       
  2925 
       
  2926         {
       
  2927             identifier_c param_name("IN");
       
  2928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2930             
       
  2931             /* Get the value from a foo(<param_value>) style call */
       
  2932             if (IN_param_value == NULL)
       
  2933               IN_param_value = function_call_param_iterator.next();
       
  2934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2936             
       
  2937             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2938             {
       
  2939         
       
  2940                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2941                 return return_type_symbol;
       
  2942                 
       
  2943             }
       
  2944             
       
  2945             ERROR;
       
  2946         }
       
  2947         
       
  2948     }/*function_lint_to_string*/
       
  2949     break;
       
  2950 
       
  2951 /****
       
  2952  *LINT_TO_BYTE
       
  2953  */
       
  2954     case function_lint_to_byte :
       
  2955     {
       
  2956         symbol_c *last_type_symbol = NULL;
       
  2957 
       
  2958         {
       
  2959             identifier_c param_name("IN");
       
  2960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2962             
       
  2963             /* Get the value from a foo(<param_value>) style call */
       
  2964             if (IN_param_value == NULL)
       
  2965               IN_param_value = function_call_param_iterator.next();
       
  2966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2968             
       
  2969             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  2970             {
       
  2971         
       
  2972                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2973                 return return_type_symbol;
       
  2974                 
       
  2975             }
       
  2976             
       
  2977             ERROR;
       
  2978         }
       
  2979         
       
  2980     }/*function_lint_to_byte*/
       
  2981     break;
       
  2982 
       
  2983 /****
       
  2984  *LINT_TO_WORD
       
  2985  */
       
  2986     case function_lint_to_word :
       
  2987     {
       
  2988         symbol_c *last_type_symbol = NULL;
       
  2989 
       
  2990         {
       
  2991             identifier_c param_name("IN");
       
  2992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2994             
       
  2995             /* Get the value from a foo(<param_value>) style call */
       
  2996             if (IN_param_value == NULL)
       
  2997               IN_param_value = function_call_param_iterator.next();
       
  2998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3000             
       
  3001             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  3002             {
       
  3003         
       
  3004                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3005                 return return_type_symbol;
       
  3006                 
       
  3007             }
       
  3008             
       
  3009             ERROR;
       
  3010         }
       
  3011         
       
  3012     }/*function_lint_to_word*/
       
  3013     break;
       
  3014 
       
  3015 /****
       
  3016  *LINT_TO_DWORD
       
  3017  */
       
  3018     case function_lint_to_dword :
       
  3019     {
       
  3020         symbol_c *last_type_symbol = NULL;
       
  3021 
       
  3022         {
       
  3023             identifier_c param_name("IN");
       
  3024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3026             
       
  3027             /* Get the value from a foo(<param_value>) style call */
       
  3028             if (IN_param_value == NULL)
       
  3029               IN_param_value = function_call_param_iterator.next();
       
  3030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3032             
       
  3033             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  3034             {
       
  3035         
       
  3036                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3037                 return return_type_symbol;
       
  3038                 
       
  3039             }
       
  3040             
       
  3041             ERROR;
       
  3042         }
       
  3043         
       
  3044     }/*function_lint_to_dword*/
       
  3045     break;
       
  3046 
       
  3047 /****
       
  3048  *LINT_TO_LWORD
       
  3049  */
       
  3050     case function_lint_to_lword :
       
  3051     {
       
  3052         symbol_c *last_type_symbol = NULL;
       
  3053 
       
  3054         {
       
  3055             identifier_c param_name("IN");
       
  3056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3058             
       
  3059             /* Get the value from a foo(<param_value>) style call */
       
  3060             if (IN_param_value == NULL)
       
  3061               IN_param_value = function_call_param_iterator.next();
       
  3062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3064             
       
  3065             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  3066             {
       
  3067         
       
  3068                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3069                 return return_type_symbol;
       
  3070                 
       
  3071             }
       
  3072             
       
  3073             ERROR;
       
  3074         }
       
  3075         
       
  3076     }/*function_lint_to_lword*/
       
  3077     break;
       
  3078 
       
  3079 /****
       
  3080  *USINT_TO_BOOL
       
  3081  */
       
  3082     case function_usint_to_bool :
       
  3083     {
       
  3084         symbol_c *last_type_symbol = NULL;
       
  3085 
       
  3086         {
       
  3087             identifier_c param_name("IN");
       
  3088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3090             
       
  3091             /* Get the value from a foo(<param_value>) style call */
       
  3092             if (IN_param_value == NULL)
       
  3093               IN_param_value = function_call_param_iterator.next();
       
  3094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3096             
       
  3097             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3098             {
       
  3099         
       
  3100                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3101                 return return_type_symbol;
       
  3102                 
       
  3103             }
       
  3104             
       
  3105             ERROR;
       
  3106         }
       
  3107         
       
  3108     }/*function_usint_to_bool*/
       
  3109     break;
       
  3110 
       
  3111 /****
       
  3112  *USINT_TO_SINT
       
  3113  */
       
  3114     case function_usint_to_sint :
       
  3115     {
       
  3116         symbol_c *last_type_symbol = NULL;
       
  3117 
       
  3118         {
       
  3119             identifier_c param_name("IN");
       
  3120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3128             
       
  3129             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3130             {
       
  3131         
       
  3132                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3133                 return return_type_symbol;
       
  3134                 
       
  3135             }
       
  3136             
       
  3137             ERROR;
       
  3138         }
       
  3139         
       
  3140     }/*function_usint_to_sint*/
       
  3141     break;
       
  3142 
       
  3143 /****
       
  3144  *USINT_TO_INT
       
  3145  */
       
  3146     case function_usint_to_int :
       
  3147     {
       
  3148         symbol_c *last_type_symbol = NULL;
       
  3149 
       
  3150         {
       
  3151             identifier_c param_name("IN");
       
  3152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3154             
       
  3155             /* Get the value from a foo(<param_value>) style call */
       
  3156             if (IN_param_value == NULL)
       
  3157               IN_param_value = function_call_param_iterator.next();
       
  3158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3160             
       
  3161             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3162             {
       
  3163         
       
  3164                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3165                 return return_type_symbol;
       
  3166                 
       
  3167             }
       
  3168             
       
  3169             ERROR;
       
  3170         }
       
  3171         
       
  3172     }/*function_usint_to_int*/
       
  3173     break;
       
  3174 
       
  3175 /****
       
  3176  *USINT_TO_DINT
       
  3177  */
       
  3178     case function_usint_to_dint :
       
  3179     {
       
  3180         symbol_c *last_type_symbol = NULL;
       
  3181 
       
  3182         {
       
  3183             identifier_c param_name("IN");
       
  3184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3186             
       
  3187             /* Get the value from a foo(<param_value>) style call */
       
  3188             if (IN_param_value == NULL)
       
  3189               IN_param_value = function_call_param_iterator.next();
       
  3190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3192             
       
  3193             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3194             {
       
  3195         
       
  3196                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3197                 return return_type_symbol;
       
  3198                 
       
  3199             }
       
  3200             
       
  3201             ERROR;
       
  3202         }
       
  3203         
       
  3204     }/*function_usint_to_dint*/
       
  3205     break;
       
  3206 
       
  3207 /****
       
  3208  *USINT_TO_LINT
       
  3209  */
       
  3210     case function_usint_to_lint :
       
  3211     {
       
  3212         symbol_c *last_type_symbol = NULL;
       
  3213 
       
  3214         {
       
  3215             identifier_c param_name("IN");
       
  3216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3218             
       
  3219             /* Get the value from a foo(<param_value>) style call */
       
  3220             if (IN_param_value == NULL)
       
  3221               IN_param_value = function_call_param_iterator.next();
       
  3222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3224             
       
  3225             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3226             {
       
  3227         
       
  3228                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3229                 return return_type_symbol;
       
  3230                 
       
  3231             }
       
  3232             
       
  3233             ERROR;
       
  3234         }
       
  3235         
       
  3236     }/*function_usint_to_lint*/
       
  3237     break;
       
  3238 
       
  3239 /****
       
  3240  *USINT_TO_UINT
       
  3241  */
       
  3242     case function_usint_to_uint :
       
  3243     {
       
  3244         symbol_c *last_type_symbol = NULL;
       
  3245 
       
  3246         {
       
  3247             identifier_c param_name("IN");
       
  3248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3250             
       
  3251             /* Get the value from a foo(<param_value>) style call */
       
  3252             if (IN_param_value == NULL)
       
  3253               IN_param_value = function_call_param_iterator.next();
       
  3254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3256             
       
  3257             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3258             {
       
  3259         
       
  3260                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3261                 return return_type_symbol;
       
  3262                 
       
  3263             }
       
  3264             
       
  3265             ERROR;
       
  3266         }
       
  3267         
       
  3268     }/*function_usint_to_uint*/
       
  3269     break;
       
  3270 
       
  3271 /****
       
  3272  *USINT_TO_UDINT
       
  3273  */
       
  3274     case function_usint_to_udint :
       
  3275     {
       
  3276         symbol_c *last_type_symbol = NULL;
       
  3277 
       
  3278         {
       
  3279             identifier_c param_name("IN");
       
  3280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3282             
       
  3283             /* Get the value from a foo(<param_value>) style call */
       
  3284             if (IN_param_value == NULL)
       
  3285               IN_param_value = function_call_param_iterator.next();
       
  3286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3288             
       
  3289             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3290             {
       
  3291         
       
  3292                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3293                 return return_type_symbol;
       
  3294                 
       
  3295             }
       
  3296             
       
  3297             ERROR;
       
  3298         }
       
  3299         
       
  3300     }/*function_usint_to_udint*/
       
  3301     break;
       
  3302 
       
  3303 /****
       
  3304  *USINT_TO_ULINT
       
  3305  */
       
  3306     case function_usint_to_ulint :
       
  3307     {
       
  3308         symbol_c *last_type_symbol = NULL;
       
  3309 
       
  3310         {
       
  3311             identifier_c param_name("IN");
       
  3312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3314             
       
  3315             /* Get the value from a foo(<param_value>) style call */
       
  3316             if (IN_param_value == NULL)
       
  3317               IN_param_value = function_call_param_iterator.next();
       
  3318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3320             
       
  3321             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3322             {
       
  3323         
       
  3324                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3325                 return return_type_symbol;
       
  3326                 
       
  3327             }
       
  3328             
       
  3329             ERROR;
       
  3330         }
       
  3331         
       
  3332     }/*function_usint_to_ulint*/
       
  3333     break;
       
  3334 
       
  3335 /****
       
  3336  *USINT_TO_REAL
       
  3337  */
       
  3338     case function_usint_to_real :
       
  3339     {
       
  3340         symbol_c *last_type_symbol = NULL;
       
  3341 
       
  3342         {
       
  3343             identifier_c param_name("IN");
       
  3344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3346             
       
  3347             /* Get the value from a foo(<param_value>) style call */
       
  3348             if (IN_param_value == NULL)
       
  3349               IN_param_value = function_call_param_iterator.next();
       
  3350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3352             
       
  3353             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3354             {
       
  3355         
       
  3356                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3357                 return return_type_symbol;
       
  3358                 
       
  3359             }
       
  3360             
       
  3361             ERROR;
       
  3362         }
       
  3363         
       
  3364     }/*function_usint_to_real*/
       
  3365     break;
       
  3366 
       
  3367 /****
       
  3368  *USINT_TO_LREAL
       
  3369  */
       
  3370     case function_usint_to_lreal :
       
  3371     {
       
  3372         symbol_c *last_type_symbol = NULL;
       
  3373 
       
  3374         {
       
  3375             identifier_c param_name("IN");
       
  3376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3378             
       
  3379             /* Get the value from a foo(<param_value>) style call */
       
  3380             if (IN_param_value == NULL)
       
  3381               IN_param_value = function_call_param_iterator.next();
       
  3382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3384             
       
  3385             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3386             {
       
  3387         
       
  3388                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3389                 return return_type_symbol;
       
  3390                 
       
  3391             }
       
  3392             
       
  3393             ERROR;
       
  3394         }
       
  3395         
       
  3396     }/*function_usint_to_lreal*/
       
  3397     break;
       
  3398 
       
  3399 /****
       
  3400  *USINT_TO_TIME
       
  3401  */
       
  3402     case function_usint_to_time :
       
  3403     {
       
  3404         symbol_c *last_type_symbol = NULL;
       
  3405 
       
  3406         {
       
  3407             identifier_c param_name("IN");
       
  3408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3416             
       
  3417             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3418             {
       
  3419         
       
  3420                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3421                 return return_type_symbol;
       
  3422                 
       
  3423             }
       
  3424             
       
  3425             ERROR;
       
  3426         }
       
  3427         
       
  3428     }/*function_usint_to_time*/
       
  3429     break;
       
  3430 
       
  3431 /****
       
  3432  *USINT_TO_DATE
       
  3433  */
       
  3434     case function_usint_to_date :
       
  3435     {
       
  3436         symbol_c *last_type_symbol = NULL;
       
  3437 
       
  3438         {
       
  3439             identifier_c param_name("IN");
       
  3440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3442             
       
  3443             /* Get the value from a foo(<param_value>) style call */
       
  3444             if (IN_param_value == NULL)
       
  3445               IN_param_value = function_call_param_iterator.next();
       
  3446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3448             
       
  3449             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3450             {
       
  3451         
       
  3452                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3453                 return return_type_symbol;
       
  3454                 
       
  3455             }
       
  3456             
       
  3457             ERROR;
       
  3458         }
       
  3459         
       
  3460     }/*function_usint_to_date*/
       
  3461     break;
       
  3462 
       
  3463 /****
       
  3464  *USINT_TO_TOD
       
  3465  */
       
  3466     case function_usint_to_tod :
       
  3467     {
       
  3468         symbol_c *last_type_symbol = NULL;
       
  3469 
       
  3470         {
       
  3471             identifier_c param_name("IN");
       
  3472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3474             
       
  3475             /* Get the value from a foo(<param_value>) style call */
       
  3476             if (IN_param_value == NULL)
       
  3477               IN_param_value = function_call_param_iterator.next();
       
  3478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3480             
       
  3481             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3482             {
       
  3483         
       
  3484                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3485                 return return_type_symbol;
       
  3486                 
       
  3487             }
       
  3488             
       
  3489             ERROR;
       
  3490         }
       
  3491         
       
  3492     }/*function_usint_to_tod*/
       
  3493     break;
       
  3494 
       
  3495 /****
       
  3496  *USINT_TO_DT
       
  3497  */
       
  3498     case function_usint_to_dt :
       
  3499     {
       
  3500         symbol_c *last_type_symbol = NULL;
       
  3501 
       
  3502         {
       
  3503             identifier_c param_name("IN");
       
  3504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3506             
       
  3507             /* Get the value from a foo(<param_value>) style call */
       
  3508             if (IN_param_value == NULL)
       
  3509               IN_param_value = function_call_param_iterator.next();
       
  3510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3512             
       
  3513             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3514             {
       
  3515         
       
  3516                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3517                 return return_type_symbol;
       
  3518                 
       
  3519             }
       
  3520             
       
  3521             ERROR;
       
  3522         }
       
  3523         
       
  3524     }/*function_usint_to_dt*/
       
  3525     break;
       
  3526 
       
  3527 /****
       
  3528  *USINT_TO_STRING
       
  3529  */
       
  3530     case function_usint_to_string :
       
  3531     {
       
  3532         symbol_c *last_type_symbol = NULL;
       
  3533 
       
  3534         {
       
  3535             identifier_c param_name("IN");
       
  3536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3538             
       
  3539             /* Get the value from a foo(<param_value>) style call */
       
  3540             if (IN_param_value == NULL)
       
  3541               IN_param_value = function_call_param_iterator.next();
       
  3542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3544             
       
  3545             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3546             {
       
  3547         
       
  3548                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3549                 return return_type_symbol;
       
  3550                 
       
  3551             }
       
  3552             
       
  3553             ERROR;
       
  3554         }
       
  3555         
       
  3556     }/*function_usint_to_string*/
       
  3557     break;
       
  3558 
       
  3559 /****
       
  3560  *USINT_TO_BYTE
       
  3561  */
       
  3562     case function_usint_to_byte :
       
  3563     {
       
  3564         symbol_c *last_type_symbol = NULL;
       
  3565 
       
  3566         {
       
  3567             identifier_c param_name("IN");
       
  3568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3570             
       
  3571             /* Get the value from a foo(<param_value>) style call */
       
  3572             if (IN_param_value == NULL)
       
  3573               IN_param_value = function_call_param_iterator.next();
       
  3574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3576             
       
  3577             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3578             {
       
  3579         
       
  3580                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3581                 return return_type_symbol;
       
  3582                 
       
  3583             }
       
  3584             
       
  3585             ERROR;
       
  3586         }
       
  3587         
       
  3588     }/*function_usint_to_byte*/
       
  3589     break;
       
  3590 
       
  3591 /****
       
  3592  *USINT_TO_WORD
       
  3593  */
       
  3594     case function_usint_to_word :
       
  3595     {
       
  3596         symbol_c *last_type_symbol = NULL;
       
  3597 
       
  3598         {
       
  3599             identifier_c param_name("IN");
       
  3600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3602             
       
  3603             /* Get the value from a foo(<param_value>) style call */
       
  3604             if (IN_param_value == NULL)
       
  3605               IN_param_value = function_call_param_iterator.next();
       
  3606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3608             
       
  3609             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3610             {
       
  3611         
       
  3612                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3613                 return return_type_symbol;
       
  3614                 
       
  3615             }
       
  3616             
       
  3617             ERROR;
       
  3618         }
       
  3619         
       
  3620     }/*function_usint_to_word*/
       
  3621     break;
       
  3622 
       
  3623 /****
       
  3624  *USINT_TO_DWORD
       
  3625  */
       
  3626     case function_usint_to_dword :
       
  3627     {
       
  3628         symbol_c *last_type_symbol = NULL;
       
  3629 
       
  3630         {
       
  3631             identifier_c param_name("IN");
       
  3632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3634             
       
  3635             /* Get the value from a foo(<param_value>) style call */
       
  3636             if (IN_param_value == NULL)
       
  3637               IN_param_value = function_call_param_iterator.next();
       
  3638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3640             
       
  3641             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3642             {
       
  3643         
       
  3644                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3645                 return return_type_symbol;
       
  3646                 
       
  3647             }
       
  3648             
       
  3649             ERROR;
       
  3650         }
       
  3651         
       
  3652     }/*function_usint_to_dword*/
       
  3653     break;
       
  3654 
       
  3655 /****
       
  3656  *USINT_TO_LWORD
       
  3657  */
       
  3658     case function_usint_to_lword :
       
  3659     {
       
  3660         symbol_c *last_type_symbol = NULL;
       
  3661 
       
  3662         {
       
  3663             identifier_c param_name("IN");
       
  3664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3666             
       
  3667             /* Get the value from a foo(<param_value>) style call */
       
  3668             if (IN_param_value == NULL)
       
  3669               IN_param_value = function_call_param_iterator.next();
       
  3670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3672             
       
  3673             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  3674             {
       
  3675         
       
  3676                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3677                 return return_type_symbol;
       
  3678                 
       
  3679             }
       
  3680             
       
  3681             ERROR;
       
  3682         }
       
  3683         
       
  3684     }/*function_usint_to_lword*/
       
  3685     break;
       
  3686 
       
  3687 /****
       
  3688  *UINT_TO_BOOL
       
  3689  */
       
  3690     case function_uint_to_bool :
       
  3691     {
       
  3692         symbol_c *last_type_symbol = NULL;
       
  3693 
       
  3694         {
       
  3695             identifier_c param_name("IN");
       
  3696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3704             
       
  3705             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3706             {
       
  3707         
       
  3708                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3709                 return return_type_symbol;
       
  3710                 
       
  3711             }
       
  3712             
       
  3713             ERROR;
       
  3714         }
       
  3715         
       
  3716     }/*function_uint_to_bool*/
       
  3717     break;
       
  3718 
       
  3719 /****
       
  3720  *UINT_TO_SINT
       
  3721  */
       
  3722     case function_uint_to_sint :
       
  3723     {
       
  3724         symbol_c *last_type_symbol = NULL;
       
  3725 
       
  3726         {
       
  3727             identifier_c param_name("IN");
       
  3728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3730             
       
  3731             /* Get the value from a foo(<param_value>) style call */
       
  3732             if (IN_param_value == NULL)
       
  3733               IN_param_value = function_call_param_iterator.next();
       
  3734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3736             
       
  3737             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3738             {
       
  3739         
       
  3740                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3741                 return return_type_symbol;
       
  3742                 
       
  3743             }
       
  3744             
       
  3745             ERROR;
       
  3746         }
       
  3747         
       
  3748     }/*function_uint_to_sint*/
       
  3749     break;
       
  3750 
       
  3751 /****
       
  3752  *UINT_TO_INT
       
  3753  */
       
  3754     case function_uint_to_int :
       
  3755     {
       
  3756         symbol_c *last_type_symbol = NULL;
       
  3757 
       
  3758         {
       
  3759             identifier_c param_name("IN");
       
  3760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3762             
       
  3763             /* Get the value from a foo(<param_value>) style call */
       
  3764             if (IN_param_value == NULL)
       
  3765               IN_param_value = function_call_param_iterator.next();
       
  3766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3768             
       
  3769             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3770             {
       
  3771         
       
  3772                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3773                 return return_type_symbol;
       
  3774                 
       
  3775             }
       
  3776             
       
  3777             ERROR;
       
  3778         }
       
  3779         
       
  3780     }/*function_uint_to_int*/
       
  3781     break;
       
  3782 
       
  3783 /****
       
  3784  *UINT_TO_DINT
       
  3785  */
       
  3786     case function_uint_to_dint :
       
  3787     {
       
  3788         symbol_c *last_type_symbol = NULL;
       
  3789 
       
  3790         {
       
  3791             identifier_c param_name("IN");
       
  3792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3794             
       
  3795             /* Get the value from a foo(<param_value>) style call */
       
  3796             if (IN_param_value == NULL)
       
  3797               IN_param_value = function_call_param_iterator.next();
       
  3798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3800             
       
  3801             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3802             {
       
  3803         
       
  3804                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3805                 return return_type_symbol;
       
  3806                 
       
  3807             }
       
  3808             
       
  3809             ERROR;
       
  3810         }
       
  3811         
       
  3812     }/*function_uint_to_dint*/
       
  3813     break;
       
  3814 
       
  3815 /****
       
  3816  *UINT_TO_LINT
       
  3817  */
       
  3818     case function_uint_to_lint :
       
  3819     {
       
  3820         symbol_c *last_type_symbol = NULL;
       
  3821 
       
  3822         {
       
  3823             identifier_c param_name("IN");
       
  3824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3826             
       
  3827             /* Get the value from a foo(<param_value>) style call */
       
  3828             if (IN_param_value == NULL)
       
  3829               IN_param_value = function_call_param_iterator.next();
       
  3830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3832             
       
  3833             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3834             {
       
  3835         
       
  3836                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3837                 return return_type_symbol;
       
  3838                 
       
  3839             }
       
  3840             
       
  3841             ERROR;
       
  3842         }
       
  3843         
       
  3844     }/*function_uint_to_lint*/
       
  3845     break;
       
  3846 
       
  3847 /****
       
  3848  *UINT_TO_USINT
       
  3849  */
       
  3850     case function_uint_to_usint :
       
  3851     {
       
  3852         symbol_c *last_type_symbol = NULL;
       
  3853 
       
  3854         {
       
  3855             identifier_c param_name("IN");
       
  3856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3858             
       
  3859             /* Get the value from a foo(<param_value>) style call */
       
  3860             if (IN_param_value == NULL)
       
  3861               IN_param_value = function_call_param_iterator.next();
       
  3862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3864             
       
  3865             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3866             {
       
  3867         
       
  3868                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3869                 return return_type_symbol;
       
  3870                 
       
  3871             }
       
  3872             
       
  3873             ERROR;
       
  3874         }
       
  3875         
       
  3876     }/*function_uint_to_usint*/
       
  3877     break;
       
  3878 
       
  3879 /****
       
  3880  *UINT_TO_UDINT
       
  3881  */
       
  3882     case function_uint_to_udint :
       
  3883     {
       
  3884         symbol_c *last_type_symbol = NULL;
       
  3885 
       
  3886         {
       
  3887             identifier_c param_name("IN");
       
  3888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3890             
       
  3891             /* Get the value from a foo(<param_value>) style call */
       
  3892             if (IN_param_value == NULL)
       
  3893               IN_param_value = function_call_param_iterator.next();
       
  3894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3896             
       
  3897             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3898             {
       
  3899         
       
  3900                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3901                 return return_type_symbol;
       
  3902                 
       
  3903             }
       
  3904             
       
  3905             ERROR;
       
  3906         }
       
  3907         
       
  3908     }/*function_uint_to_udint*/
       
  3909     break;
       
  3910 
       
  3911 /****
       
  3912  *UINT_TO_ULINT
       
  3913  */
       
  3914     case function_uint_to_ulint :
       
  3915     {
       
  3916         symbol_c *last_type_symbol = NULL;
       
  3917 
       
  3918         {
       
  3919             identifier_c param_name("IN");
       
  3920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3922             
       
  3923             /* Get the value from a foo(<param_value>) style call */
       
  3924             if (IN_param_value == NULL)
       
  3925               IN_param_value = function_call_param_iterator.next();
       
  3926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3928             
       
  3929             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3930             {
       
  3931         
       
  3932                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3933                 return return_type_symbol;
       
  3934                 
       
  3935             }
       
  3936             
       
  3937             ERROR;
       
  3938         }
       
  3939         
       
  3940     }/*function_uint_to_ulint*/
       
  3941     break;
       
  3942 
       
  3943 /****
       
  3944  *UINT_TO_REAL
       
  3945  */
       
  3946     case function_uint_to_real :
       
  3947     {
       
  3948         symbol_c *last_type_symbol = NULL;
       
  3949 
       
  3950         {
       
  3951             identifier_c param_name("IN");
       
  3952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3954             
       
  3955             /* Get the value from a foo(<param_value>) style call */
       
  3956             if (IN_param_value == NULL)
       
  3957               IN_param_value = function_call_param_iterator.next();
       
  3958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3960             
       
  3961             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3962             {
       
  3963         
       
  3964                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3965                 return return_type_symbol;
       
  3966                 
       
  3967             }
       
  3968             
       
  3969             ERROR;
       
  3970         }
       
  3971         
       
  3972     }/*function_uint_to_real*/
       
  3973     break;
       
  3974 
       
  3975 /****
       
  3976  *UINT_TO_LREAL
       
  3977  */
       
  3978     case function_uint_to_lreal :
       
  3979     {
       
  3980         symbol_c *last_type_symbol = NULL;
       
  3981 
       
  3982         {
       
  3983             identifier_c param_name("IN");
       
  3984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3992             
       
  3993             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  3994             {
       
  3995         
       
  3996                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3997                 return return_type_symbol;
       
  3998                 
       
  3999             }
       
  4000             
       
  4001             ERROR;
       
  4002         }
       
  4003         
       
  4004     }/*function_uint_to_lreal*/
       
  4005     break;
       
  4006 
       
  4007 /****
       
  4008  *UINT_TO_TIME
       
  4009  */
       
  4010     case function_uint_to_time :
       
  4011     {
       
  4012         symbol_c *last_type_symbol = NULL;
       
  4013 
       
  4014         {
       
  4015             identifier_c param_name("IN");
       
  4016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4018             
       
  4019             /* Get the value from a foo(<param_value>) style call */
       
  4020             if (IN_param_value == NULL)
       
  4021               IN_param_value = function_call_param_iterator.next();
       
  4022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4024             
       
  4025             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  4026             {
       
  4027         
       
  4028                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4029                 return return_type_symbol;
       
  4030                 
       
  4031             }
       
  4032             
       
  4033             ERROR;
       
  4034         }
       
  4035         
       
  4036     }/*function_uint_to_time*/
       
  4037     break;
       
  4038 
       
  4039 /****
       
  4040  *UINT_TO_DATE
       
  4041  */
       
  4042     case function_uint_to_date :
       
  4043     {
       
  4044         symbol_c *last_type_symbol = NULL;
       
  4045 
       
  4046         {
       
  4047             identifier_c param_name("IN");
       
  4048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4050             
       
  4051             /* Get the value from a foo(<param_value>) style call */
       
  4052             if (IN_param_value == NULL)
       
  4053               IN_param_value = function_call_param_iterator.next();
       
  4054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4056             
       
  4057             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  4058             {
       
  4059         
       
  4060                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4061                 return return_type_symbol;
       
  4062                 
       
  4063             }
       
  4064             
       
  4065             ERROR;
       
  4066         }
       
  4067         
       
  4068     }/*function_uint_to_date*/
       
  4069     break;
       
  4070 
       
  4071 /****
       
  4072  *UINT_TO_TOD
       
  4073  */
       
  4074     case function_uint_to_tod :
       
  4075     {
       
  4076         symbol_c *last_type_symbol = NULL;
       
  4077 
       
  4078         {
       
  4079             identifier_c param_name("IN");
       
  4080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4082             
       
  4083             /* Get the value from a foo(<param_value>) style call */
       
  4084             if (IN_param_value == NULL)
       
  4085               IN_param_value = function_call_param_iterator.next();
       
  4086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4088             
       
  4089             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  4090             {
       
  4091         
       
  4092                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4093                 return return_type_symbol;
       
  4094                 
       
  4095             }
       
  4096             
       
  4097             ERROR;
       
  4098         }
       
  4099         
       
  4100     }/*function_uint_to_tod*/
       
  4101     break;
       
  4102 
       
  4103 /****
       
  4104  *UINT_TO_DT
       
  4105  */
       
  4106     case function_uint_to_dt :
       
  4107     {
       
  4108         symbol_c *last_type_symbol = NULL;
       
  4109 
       
  4110         {
       
  4111             identifier_c param_name("IN");
       
  4112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4114             
       
  4115             /* Get the value from a foo(<param_value>) style call */
       
  4116             if (IN_param_value == NULL)
       
  4117               IN_param_value = function_call_param_iterator.next();
       
  4118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4120             
       
  4121             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  4122             {
       
  4123         
       
  4124                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4125                 return return_type_symbol;
       
  4126                 
       
  4127             }
       
  4128             
       
  4129             ERROR;
       
  4130         }
       
  4131         
       
  4132     }/*function_uint_to_dt*/
       
  4133     break;
       
  4134 
       
  4135 /****
       
  4136  *UINT_TO_STRING
       
  4137  */
       
  4138     case function_uint_to_string :
       
  4139     {
       
  4140         symbol_c *last_type_symbol = NULL;
       
  4141 
       
  4142         {
       
  4143             identifier_c param_name("IN");
       
  4144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4146             
       
  4147             /* Get the value from a foo(<param_value>) style call */
       
  4148             if (IN_param_value == NULL)
       
  4149               IN_param_value = function_call_param_iterator.next();
       
  4150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4152             
       
  4153             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  4154             {
       
  4155         
       
  4156                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4157                 return return_type_symbol;
       
  4158                 
       
  4159             }
       
  4160             
       
  4161             ERROR;
       
  4162         }
       
  4163         
       
  4164     }/*function_uint_to_string*/
       
  4165     break;
       
  4166 
       
  4167 /****
       
  4168  *UINT_TO_BYTE
       
  4169  */
       
  4170     case function_uint_to_byte :
       
  4171     {
       
  4172         symbol_c *last_type_symbol = NULL;
       
  4173 
       
  4174         {
       
  4175             identifier_c param_name("IN");
       
  4176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4178             
       
  4179             /* Get the value from a foo(<param_value>) style call */
       
  4180             if (IN_param_value == NULL)
       
  4181               IN_param_value = function_call_param_iterator.next();
       
  4182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4184             
       
  4185             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  4186             {
       
  4187         
       
  4188                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4189                 return return_type_symbol;
       
  4190                 
       
  4191             }
       
  4192             
       
  4193             ERROR;
       
  4194         }
       
  4195         
       
  4196     }/*function_uint_to_byte*/
       
  4197     break;
       
  4198 
       
  4199 /****
       
  4200  *UINT_TO_WORD
       
  4201  */
       
  4202     case function_uint_to_word :
       
  4203     {
       
  4204         symbol_c *last_type_symbol = NULL;
       
  4205 
       
  4206         {
       
  4207             identifier_c param_name("IN");
       
  4208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4210             
       
  4211             /* Get the value from a foo(<param_value>) style call */
       
  4212             if (IN_param_value == NULL)
       
  4213               IN_param_value = function_call_param_iterator.next();
       
  4214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4216             
       
  4217             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  4218             {
       
  4219         
       
  4220                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4221                 return return_type_symbol;
       
  4222                 
       
  4223             }
       
  4224             
       
  4225             ERROR;
       
  4226         }
       
  4227         
       
  4228     }/*function_uint_to_word*/
       
  4229     break;
       
  4230 
       
  4231 /****
       
  4232  *UINT_TO_DWORD
       
  4233  */
       
  4234     case function_uint_to_dword :
       
  4235     {
       
  4236         symbol_c *last_type_symbol = NULL;
       
  4237 
       
  4238         {
       
  4239             identifier_c param_name("IN");
       
  4240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4242             
       
  4243             /* Get the value from a foo(<param_value>) style call */
       
  4244             if (IN_param_value == NULL)
       
  4245               IN_param_value = function_call_param_iterator.next();
       
  4246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4248             
       
  4249             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  4250             {
       
  4251         
       
  4252                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4253                 return return_type_symbol;
       
  4254                 
       
  4255             }
       
  4256             
       
  4257             ERROR;
       
  4258         }
       
  4259         
       
  4260     }/*function_uint_to_dword*/
       
  4261     break;
       
  4262 
       
  4263 /****
       
  4264  *UINT_TO_LWORD
       
  4265  */
       
  4266     case function_uint_to_lword :
       
  4267     {
       
  4268         symbol_c *last_type_symbol = NULL;
       
  4269 
       
  4270         {
       
  4271             identifier_c param_name("IN");
       
  4272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4280             
       
  4281             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  4282             {
       
  4283         
       
  4284                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4285                 return return_type_symbol;
       
  4286                 
       
  4287             }
       
  4288             
       
  4289             ERROR;
       
  4290         }
       
  4291         
       
  4292     }/*function_uint_to_lword*/
       
  4293     break;
       
  4294 
       
  4295 /****
       
  4296  *UDINT_TO_BOOL
       
  4297  */
       
  4298     case function_udint_to_bool :
       
  4299     {
       
  4300         symbol_c *last_type_symbol = NULL;
       
  4301 
       
  4302         {
       
  4303             identifier_c param_name("IN");
       
  4304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4306             
       
  4307             /* Get the value from a foo(<param_value>) style call */
       
  4308             if (IN_param_value == NULL)
       
  4309               IN_param_value = function_call_param_iterator.next();
       
  4310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4312             
       
  4313             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4314             {
       
  4315         
       
  4316                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4317                 return return_type_symbol;
       
  4318                 
       
  4319             }
       
  4320             
       
  4321             ERROR;
       
  4322         }
       
  4323         
       
  4324     }/*function_udint_to_bool*/
       
  4325     break;
       
  4326 
       
  4327 /****
       
  4328  *UDINT_TO_SINT
       
  4329  */
       
  4330     case function_udint_to_sint :
       
  4331     {
       
  4332         symbol_c *last_type_symbol = NULL;
       
  4333 
       
  4334         {
       
  4335             identifier_c param_name("IN");
       
  4336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4338             
       
  4339             /* Get the value from a foo(<param_value>) style call */
       
  4340             if (IN_param_value == NULL)
       
  4341               IN_param_value = function_call_param_iterator.next();
       
  4342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4344             
       
  4345             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4346             {
       
  4347         
       
  4348                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4349                 return return_type_symbol;
       
  4350                 
       
  4351             }
       
  4352             
       
  4353             ERROR;
       
  4354         }
       
  4355         
       
  4356     }/*function_udint_to_sint*/
       
  4357     break;
       
  4358 
       
  4359 /****
       
  4360  *UDINT_TO_INT
       
  4361  */
       
  4362     case function_udint_to_int :
       
  4363     {
       
  4364         symbol_c *last_type_symbol = NULL;
       
  4365 
       
  4366         {
       
  4367             identifier_c param_name("IN");
       
  4368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4370             
       
  4371             /* Get the value from a foo(<param_value>) style call */
       
  4372             if (IN_param_value == NULL)
       
  4373               IN_param_value = function_call_param_iterator.next();
       
  4374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4376             
       
  4377             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4378             {
       
  4379         
       
  4380                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4381                 return return_type_symbol;
       
  4382                 
       
  4383             }
       
  4384             
       
  4385             ERROR;
       
  4386         }
       
  4387         
       
  4388     }/*function_udint_to_int*/
       
  4389     break;
       
  4390 
       
  4391 /****
       
  4392  *UDINT_TO_DINT
       
  4393  */
       
  4394     case function_udint_to_dint :
       
  4395     {
       
  4396         symbol_c *last_type_symbol = NULL;
       
  4397 
       
  4398         {
       
  4399             identifier_c param_name("IN");
       
  4400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4402             
       
  4403             /* Get the value from a foo(<param_value>) style call */
       
  4404             if (IN_param_value == NULL)
       
  4405               IN_param_value = function_call_param_iterator.next();
       
  4406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4408             
       
  4409             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4410             {
       
  4411         
       
  4412                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4413                 return return_type_symbol;
       
  4414                 
       
  4415             }
       
  4416             
       
  4417             ERROR;
       
  4418         }
       
  4419         
       
  4420     }/*function_udint_to_dint*/
       
  4421     break;
       
  4422 
       
  4423 /****
       
  4424  *UDINT_TO_LINT
       
  4425  */
       
  4426     case function_udint_to_lint :
       
  4427     {
       
  4428         symbol_c *last_type_symbol = NULL;
       
  4429 
       
  4430         {
       
  4431             identifier_c param_name("IN");
       
  4432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4434             
       
  4435             /* Get the value from a foo(<param_value>) style call */
       
  4436             if (IN_param_value == NULL)
       
  4437               IN_param_value = function_call_param_iterator.next();
       
  4438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4440             
       
  4441             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4442             {
       
  4443         
       
  4444                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4445                 return return_type_symbol;
       
  4446                 
       
  4447             }
       
  4448             
       
  4449             ERROR;
       
  4450         }
       
  4451         
       
  4452     }/*function_udint_to_lint*/
       
  4453     break;
       
  4454 
       
  4455 /****
       
  4456  *UDINT_TO_USINT
       
  4457  */
       
  4458     case function_udint_to_usint :
       
  4459     {
       
  4460         symbol_c *last_type_symbol = NULL;
       
  4461 
       
  4462         {
       
  4463             identifier_c param_name("IN");
       
  4464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4466             
       
  4467             /* Get the value from a foo(<param_value>) style call */
       
  4468             if (IN_param_value == NULL)
       
  4469               IN_param_value = function_call_param_iterator.next();
       
  4470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4472             
       
  4473             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4474             {
       
  4475         
       
  4476                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4477                 return return_type_symbol;
       
  4478                 
       
  4479             }
       
  4480             
       
  4481             ERROR;
       
  4482         }
       
  4483         
       
  4484     }/*function_udint_to_usint*/
       
  4485     break;
       
  4486 
       
  4487 /****
       
  4488  *UDINT_TO_UINT
       
  4489  */
       
  4490     case function_udint_to_uint :
       
  4491     {
       
  4492         symbol_c *last_type_symbol = NULL;
       
  4493 
       
  4494         {
       
  4495             identifier_c param_name("IN");
       
  4496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4498             
       
  4499             /* Get the value from a foo(<param_value>) style call */
       
  4500             if (IN_param_value == NULL)
       
  4501               IN_param_value = function_call_param_iterator.next();
       
  4502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4504             
       
  4505             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4506             {
       
  4507         
       
  4508                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4509                 return return_type_symbol;
       
  4510                 
       
  4511             }
       
  4512             
       
  4513             ERROR;
       
  4514         }
       
  4515         
       
  4516     }/*function_udint_to_uint*/
       
  4517     break;
       
  4518 
       
  4519 /****
       
  4520  *UDINT_TO_ULINT
       
  4521  */
       
  4522     case function_udint_to_ulint :
       
  4523     {
       
  4524         symbol_c *last_type_symbol = NULL;
       
  4525 
       
  4526         {
       
  4527             identifier_c param_name("IN");
       
  4528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4530             
       
  4531             /* Get the value from a foo(<param_value>) style call */
       
  4532             if (IN_param_value == NULL)
       
  4533               IN_param_value = function_call_param_iterator.next();
       
  4534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4536             
       
  4537             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4538             {
       
  4539         
       
  4540                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4541                 return return_type_symbol;
       
  4542                 
       
  4543             }
       
  4544             
       
  4545             ERROR;
       
  4546         }
       
  4547         
       
  4548     }/*function_udint_to_ulint*/
       
  4549     break;
       
  4550 
       
  4551 /****
       
  4552  *UDINT_TO_REAL
       
  4553  */
       
  4554     case function_udint_to_real :
       
  4555     {
       
  4556         symbol_c *last_type_symbol = NULL;
       
  4557 
       
  4558         {
       
  4559             identifier_c param_name("IN");
       
  4560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4568             
       
  4569             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4570             {
       
  4571         
       
  4572                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4573                 return return_type_symbol;
       
  4574                 
       
  4575             }
       
  4576             
       
  4577             ERROR;
       
  4578         }
       
  4579         
       
  4580     }/*function_udint_to_real*/
       
  4581     break;
       
  4582 
       
  4583 /****
       
  4584  *UDINT_TO_LREAL
       
  4585  */
       
  4586     case function_udint_to_lreal :
       
  4587     {
       
  4588         symbol_c *last_type_symbol = NULL;
       
  4589 
       
  4590         {
       
  4591             identifier_c param_name("IN");
       
  4592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4594             
       
  4595             /* Get the value from a foo(<param_value>) style call */
       
  4596             if (IN_param_value == NULL)
       
  4597               IN_param_value = function_call_param_iterator.next();
       
  4598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4600             
       
  4601             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4602             {
       
  4603         
       
  4604                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4605                 return return_type_symbol;
       
  4606                 
       
  4607             }
       
  4608             
       
  4609             ERROR;
       
  4610         }
       
  4611         
       
  4612     }/*function_udint_to_lreal*/
       
  4613     break;
       
  4614 
       
  4615 /****
       
  4616  *UDINT_TO_TIME
       
  4617  */
       
  4618     case function_udint_to_time :
       
  4619     {
       
  4620         symbol_c *last_type_symbol = NULL;
       
  4621 
       
  4622         {
       
  4623             identifier_c param_name("IN");
       
  4624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4626             
       
  4627             /* Get the value from a foo(<param_value>) style call */
       
  4628             if (IN_param_value == NULL)
       
  4629               IN_param_value = function_call_param_iterator.next();
       
  4630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4632             
       
  4633             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4634             {
       
  4635         
       
  4636                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  4637                 return return_type_symbol;
       
  4638                 
       
  4639             }
       
  4640             
       
  4641             ERROR;
       
  4642         }
       
  4643         
       
  4644     }/*function_udint_to_time*/
       
  4645     break;
       
  4646 
       
  4647 /****
       
  4648  *UDINT_TO_DATE
       
  4649  */
       
  4650     case function_udint_to_date :
       
  4651     {
       
  4652         symbol_c *last_type_symbol = NULL;
       
  4653 
       
  4654         {
       
  4655             identifier_c param_name("IN");
       
  4656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4658             
       
  4659             /* Get the value from a foo(<param_value>) style call */
       
  4660             if (IN_param_value == NULL)
       
  4661               IN_param_value = function_call_param_iterator.next();
       
  4662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4664             
       
  4665             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4666             {
       
  4667         
       
  4668                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4669                 return return_type_symbol;
       
  4670                 
       
  4671             }
       
  4672             
       
  4673             ERROR;
       
  4674         }
       
  4675         
       
  4676     }/*function_udint_to_date*/
       
  4677     break;
       
  4678 
       
  4679 /****
       
  4680  *UDINT_TO_TOD
       
  4681  */
       
  4682     case function_udint_to_tod :
       
  4683     {
       
  4684         symbol_c *last_type_symbol = NULL;
       
  4685 
       
  4686         {
       
  4687             identifier_c param_name("IN");
       
  4688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4690             
       
  4691             /* Get the value from a foo(<param_value>) style call */
       
  4692             if (IN_param_value == NULL)
       
  4693               IN_param_value = function_call_param_iterator.next();
       
  4694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4696             
       
  4697             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4698             {
       
  4699         
       
  4700                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4701                 return return_type_symbol;
       
  4702                 
       
  4703             }
       
  4704             
       
  4705             ERROR;
       
  4706         }
       
  4707         
       
  4708     }/*function_udint_to_tod*/
       
  4709     break;
       
  4710 
       
  4711 /****
       
  4712  *UDINT_TO_DT
       
  4713  */
       
  4714     case function_udint_to_dt :
       
  4715     {
       
  4716         symbol_c *last_type_symbol = NULL;
       
  4717 
       
  4718         {
       
  4719             identifier_c param_name("IN");
       
  4720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4722             
       
  4723             /* Get the value from a foo(<param_value>) style call */
       
  4724             if (IN_param_value == NULL)
       
  4725               IN_param_value = function_call_param_iterator.next();
       
  4726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4728             
       
  4729             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4730             {
       
  4731         
       
  4732                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4733                 return return_type_symbol;
       
  4734                 
       
  4735             }
       
  4736             
       
  4737             ERROR;
       
  4738         }
       
  4739         
       
  4740     }/*function_udint_to_dt*/
       
  4741     break;
       
  4742 
       
  4743 /****
       
  4744  *UDINT_TO_STRING
       
  4745  */
       
  4746     case function_udint_to_string :
       
  4747     {
       
  4748         symbol_c *last_type_symbol = NULL;
       
  4749 
       
  4750         {
       
  4751             identifier_c param_name("IN");
       
  4752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4754             
       
  4755             /* Get the value from a foo(<param_value>) style call */
       
  4756             if (IN_param_value == NULL)
       
  4757               IN_param_value = function_call_param_iterator.next();
       
  4758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4760             
       
  4761             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4762             {
       
  4763         
       
  4764                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4765                 return return_type_symbol;
       
  4766                 
       
  4767             }
       
  4768             
       
  4769             ERROR;
       
  4770         }
       
  4771         
       
  4772     }/*function_udint_to_string*/
       
  4773     break;
       
  4774 
       
  4775 /****
       
  4776  *UDINT_TO_BYTE
       
  4777  */
       
  4778     case function_udint_to_byte :
       
  4779     {
       
  4780         symbol_c *last_type_symbol = NULL;
       
  4781 
       
  4782         {
       
  4783             identifier_c param_name("IN");
       
  4784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4786             
       
  4787             /* Get the value from a foo(<param_value>) style call */
       
  4788             if (IN_param_value == NULL)
       
  4789               IN_param_value = function_call_param_iterator.next();
       
  4790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4792             
       
  4793             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4794             {
       
  4795         
       
  4796                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4797                 return return_type_symbol;
       
  4798                 
       
  4799             }
       
  4800             
       
  4801             ERROR;
       
  4802         }
       
  4803         
       
  4804     }/*function_udint_to_byte*/
       
  4805     break;
       
  4806 
       
  4807 /****
       
  4808  *UDINT_TO_WORD
       
  4809  */
       
  4810     case function_udint_to_word :
       
  4811     {
       
  4812         symbol_c *last_type_symbol = NULL;
       
  4813 
       
  4814         {
       
  4815             identifier_c param_name("IN");
       
  4816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4818             
       
  4819             /* Get the value from a foo(<param_value>) style call */
       
  4820             if (IN_param_value == NULL)
       
  4821               IN_param_value = function_call_param_iterator.next();
       
  4822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4824             
       
  4825             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4826             {
       
  4827         
       
  4828                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4829                 return return_type_symbol;
       
  4830                 
       
  4831             }
       
  4832             
       
  4833             ERROR;
       
  4834         }
       
  4835         
       
  4836     }/*function_udint_to_word*/
       
  4837     break;
       
  4838 
       
  4839 /****
       
  4840  *UDINT_TO_DWORD
       
  4841  */
       
  4842     case function_udint_to_dword :
       
  4843     {
       
  4844         symbol_c *last_type_symbol = NULL;
       
  4845 
       
  4846         {
       
  4847             identifier_c param_name("IN");
       
  4848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4856             
       
  4857             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4858             {
       
  4859         
       
  4860                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4861                 return return_type_symbol;
       
  4862                 
       
  4863             }
       
  4864             
       
  4865             ERROR;
       
  4866         }
       
  4867         
       
  4868     }/*function_udint_to_dword*/
       
  4869     break;
       
  4870 
       
  4871 /****
       
  4872  *UDINT_TO_LWORD
       
  4873  */
       
  4874     case function_udint_to_lword :
       
  4875     {
       
  4876         symbol_c *last_type_symbol = NULL;
       
  4877 
       
  4878         {
       
  4879             identifier_c param_name("IN");
       
  4880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4882             
       
  4883             /* Get the value from a foo(<param_value>) style call */
       
  4884             if (IN_param_value == NULL)
       
  4885               IN_param_value = function_call_param_iterator.next();
       
  4886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4888             
       
  4889             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4890             {
       
  4891         
       
  4892                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4893                 return return_type_symbol;
       
  4894                 
       
  4895             }
       
  4896             
       
  4897             ERROR;
       
  4898         }
       
  4899         
       
  4900     }/*function_udint_to_lword*/
       
  4901     break;
       
  4902 
       
  4903 /****
       
  4904  *ULINT_TO_BOOL
       
  4905  */
       
  4906     case function_ulint_to_bool :
       
  4907     {
       
  4908         symbol_c *last_type_symbol = NULL;
       
  4909 
       
  4910         {
       
  4911             identifier_c param_name("IN");
       
  4912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4914             
       
  4915             /* Get the value from a foo(<param_value>) style call */
       
  4916             if (IN_param_value == NULL)
       
  4917               IN_param_value = function_call_param_iterator.next();
       
  4918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4920             
       
  4921             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  4922             {
       
  4923         
       
  4924                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  4925                 return return_type_symbol;
       
  4926                 
       
  4927             }
       
  4928             
       
  4929             ERROR;
       
  4930         }
       
  4931         
       
  4932     }/*function_ulint_to_bool*/
       
  4933     break;
       
  4934 
       
  4935 /****
       
  4936  *ULINT_TO_SINT
       
  4937  */
       
  4938     case function_ulint_to_sint :
       
  4939     {
       
  4940         symbol_c *last_type_symbol = NULL;
       
  4941 
       
  4942         {
       
  4943             identifier_c param_name("IN");
       
  4944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4946             
       
  4947             /* Get the value from a foo(<param_value>) style call */
       
  4948             if (IN_param_value == NULL)
       
  4949               IN_param_value = function_call_param_iterator.next();
       
  4950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4952             
       
  4953             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  4954             {
       
  4955         
       
  4956                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4957                 return return_type_symbol;
       
  4958                 
       
  4959             }
       
  4960             
       
  4961             ERROR;
       
  4962         }
       
  4963         
       
  4964     }/*function_ulint_to_sint*/
       
  4965     break;
       
  4966 
       
  4967 /****
       
  4968  *ULINT_TO_INT
       
  4969  */
       
  4970     case function_ulint_to_int :
       
  4971     {
       
  4972         symbol_c *last_type_symbol = NULL;
       
  4973 
       
  4974         {
       
  4975             identifier_c param_name("IN");
       
  4976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4978             
       
  4979             /* Get the value from a foo(<param_value>) style call */
       
  4980             if (IN_param_value == NULL)
       
  4981               IN_param_value = function_call_param_iterator.next();
       
  4982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4984             
       
  4985             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  4986             {
       
  4987         
       
  4988                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4989                 return return_type_symbol;
       
  4990                 
       
  4991             }
       
  4992             
       
  4993             ERROR;
       
  4994         }
       
  4995         
       
  4996     }/*function_ulint_to_int*/
       
  4997     break;
       
  4998 
       
  4999 /****
       
  5000  *ULINT_TO_DINT
       
  5001  */
       
  5002     case function_ulint_to_dint :
       
  5003     {
       
  5004         symbol_c *last_type_symbol = NULL;
       
  5005 
       
  5006         {
       
  5007             identifier_c param_name("IN");
       
  5008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5010             
       
  5011             /* Get the value from a foo(<param_value>) style call */
       
  5012             if (IN_param_value == NULL)
       
  5013               IN_param_value = function_call_param_iterator.next();
       
  5014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5016             
       
  5017             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5018             {
       
  5019         
       
  5020                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5021                 return return_type_symbol;
       
  5022                 
       
  5023             }
       
  5024             
       
  5025             ERROR;
       
  5026         }
       
  5027         
       
  5028     }/*function_ulint_to_dint*/
       
  5029     break;
       
  5030 
       
  5031 /****
       
  5032  *ULINT_TO_LINT
       
  5033  */
       
  5034     case function_ulint_to_lint :
       
  5035     {
       
  5036         symbol_c *last_type_symbol = NULL;
       
  5037 
       
  5038         {
       
  5039             identifier_c param_name("IN");
       
  5040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5042             
       
  5043             /* Get the value from a foo(<param_value>) style call */
       
  5044             if (IN_param_value == NULL)
       
  5045               IN_param_value = function_call_param_iterator.next();
       
  5046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5048             
       
  5049             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5050             {
       
  5051         
       
  5052                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5053                 return return_type_symbol;
       
  5054                 
       
  5055             }
       
  5056             
       
  5057             ERROR;
       
  5058         }
       
  5059         
       
  5060     }/*function_ulint_to_lint*/
       
  5061     break;
       
  5062 
       
  5063 /****
       
  5064  *ULINT_TO_USINT
       
  5065  */
       
  5066     case function_ulint_to_usint :
       
  5067     {
       
  5068         symbol_c *last_type_symbol = NULL;
       
  5069 
       
  5070         {
       
  5071             identifier_c param_name("IN");
       
  5072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5074             
       
  5075             /* Get the value from a foo(<param_value>) style call */
       
  5076             if (IN_param_value == NULL)
       
  5077               IN_param_value = function_call_param_iterator.next();
       
  5078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5080             
       
  5081             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5082             {
       
  5083         
       
  5084                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5085                 return return_type_symbol;
       
  5086                 
       
  5087             }
       
  5088             
       
  5089             ERROR;
       
  5090         }
       
  5091         
       
  5092     }/*function_ulint_to_usint*/
       
  5093     break;
       
  5094 
       
  5095 /****
       
  5096  *ULINT_TO_UINT
       
  5097  */
       
  5098     case function_ulint_to_uint :
       
  5099     {
       
  5100         symbol_c *last_type_symbol = NULL;
       
  5101 
       
  5102         {
       
  5103             identifier_c param_name("IN");
       
  5104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5106             
       
  5107             /* Get the value from a foo(<param_value>) style call */
       
  5108             if (IN_param_value == NULL)
       
  5109               IN_param_value = function_call_param_iterator.next();
       
  5110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5112             
       
  5113             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5114             {
       
  5115         
       
  5116                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5117                 return return_type_symbol;
       
  5118                 
       
  5119             }
       
  5120             
       
  5121             ERROR;
       
  5122         }
       
  5123         
       
  5124     }/*function_ulint_to_uint*/
       
  5125     break;
       
  5126 
       
  5127 /****
       
  5128  *ULINT_TO_UDINT
       
  5129  */
       
  5130     case function_ulint_to_udint :
       
  5131     {
       
  5132         symbol_c *last_type_symbol = NULL;
       
  5133 
       
  5134         {
       
  5135             identifier_c param_name("IN");
       
  5136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5144             
       
  5145             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5146             {
       
  5147         
       
  5148                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5149                 return return_type_symbol;
       
  5150                 
       
  5151             }
       
  5152             
       
  5153             ERROR;
       
  5154         }
       
  5155         
       
  5156     }/*function_ulint_to_udint*/
       
  5157     break;
       
  5158 
       
  5159 /****
       
  5160  *ULINT_TO_REAL
       
  5161  */
       
  5162     case function_ulint_to_real :
       
  5163     {
       
  5164         symbol_c *last_type_symbol = NULL;
       
  5165 
       
  5166         {
       
  5167             identifier_c param_name("IN");
       
  5168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5170             
       
  5171             /* Get the value from a foo(<param_value>) style call */
       
  5172             if (IN_param_value == NULL)
       
  5173               IN_param_value = function_call_param_iterator.next();
       
  5174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5176             
       
  5177             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5178             {
       
  5179         
       
  5180                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5181                 return return_type_symbol;
       
  5182                 
       
  5183             }
       
  5184             
       
  5185             ERROR;
       
  5186         }
       
  5187         
       
  5188     }/*function_ulint_to_real*/
       
  5189     break;
       
  5190 
       
  5191 /****
       
  5192  *ULINT_TO_LREAL
       
  5193  */
       
  5194     case function_ulint_to_lreal :
       
  5195     {
       
  5196         symbol_c *last_type_symbol = NULL;
       
  5197 
       
  5198         {
       
  5199             identifier_c param_name("IN");
       
  5200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5202             
       
  5203             /* Get the value from a foo(<param_value>) style call */
       
  5204             if (IN_param_value == NULL)
       
  5205               IN_param_value = function_call_param_iterator.next();
       
  5206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5208             
       
  5209             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5210             {
       
  5211         
       
  5212                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5213                 return return_type_symbol;
       
  5214                 
       
  5215             }
       
  5216             
       
  5217             ERROR;
       
  5218         }
       
  5219         
       
  5220     }/*function_ulint_to_lreal*/
       
  5221     break;
       
  5222 
       
  5223 /****
       
  5224  *ULINT_TO_TIME
       
  5225  */
       
  5226     case function_ulint_to_time :
       
  5227     {
       
  5228         symbol_c *last_type_symbol = NULL;
       
  5229 
       
  5230         {
       
  5231             identifier_c param_name("IN");
       
  5232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5234             
       
  5235             /* Get the value from a foo(<param_value>) style call */
       
  5236             if (IN_param_value == NULL)
       
  5237               IN_param_value = function_call_param_iterator.next();
       
  5238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5240             
       
  5241             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5242             {
       
  5243         
       
  5244                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5245                 return return_type_symbol;
       
  5246                 
       
  5247             }
       
  5248             
       
  5249             ERROR;
       
  5250         }
       
  5251         
       
  5252     }/*function_ulint_to_time*/
       
  5253     break;
       
  5254 
       
  5255 /****
       
  5256  *ULINT_TO_DATE
       
  5257  */
       
  5258     case function_ulint_to_date :
       
  5259     {
       
  5260         symbol_c *last_type_symbol = NULL;
       
  5261 
       
  5262         {
       
  5263             identifier_c param_name("IN");
       
  5264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5266             
       
  5267             /* Get the value from a foo(<param_value>) style call */
       
  5268             if (IN_param_value == NULL)
       
  5269               IN_param_value = function_call_param_iterator.next();
       
  5270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5272             
       
  5273             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5274             {
       
  5275         
       
  5276                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5277                 return return_type_symbol;
       
  5278                 
       
  5279             }
       
  5280             
       
  5281             ERROR;
       
  5282         }
       
  5283         
       
  5284     }/*function_ulint_to_date*/
       
  5285     break;
       
  5286 
       
  5287 /****
       
  5288  *ULINT_TO_TOD
       
  5289  */
       
  5290     case function_ulint_to_tod :
       
  5291     {
       
  5292         symbol_c *last_type_symbol = NULL;
       
  5293 
       
  5294         {
       
  5295             identifier_c param_name("IN");
       
  5296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5298             
       
  5299             /* Get the value from a foo(<param_value>) style call */
       
  5300             if (IN_param_value == NULL)
       
  5301               IN_param_value = function_call_param_iterator.next();
       
  5302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5304             
       
  5305             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5306             {
       
  5307         
       
  5308                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5309                 return return_type_symbol;
       
  5310                 
       
  5311             }
       
  5312             
       
  5313             ERROR;
       
  5314         }
       
  5315         
       
  5316     }/*function_ulint_to_tod*/
       
  5317     break;
       
  5318 
       
  5319 /****
       
  5320  *ULINT_TO_DT
       
  5321  */
       
  5322     case function_ulint_to_dt :
       
  5323     {
       
  5324         symbol_c *last_type_symbol = NULL;
       
  5325 
       
  5326         {
       
  5327             identifier_c param_name("IN");
       
  5328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5330             
       
  5331             /* Get the value from a foo(<param_value>) style call */
       
  5332             if (IN_param_value == NULL)
       
  5333               IN_param_value = function_call_param_iterator.next();
       
  5334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5336             
       
  5337             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5338             {
       
  5339         
       
  5340                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5341                 return return_type_symbol;
       
  5342                 
       
  5343             }
       
  5344             
       
  5345             ERROR;
       
  5346         }
       
  5347         
       
  5348     }/*function_ulint_to_dt*/
       
  5349     break;
       
  5350 
       
  5351 /****
       
  5352  *ULINT_TO_STRING
       
  5353  */
       
  5354     case function_ulint_to_string :
       
  5355     {
       
  5356         symbol_c *last_type_symbol = NULL;
       
  5357 
       
  5358         {
       
  5359             identifier_c param_name("IN");
       
  5360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5362             
       
  5363             /* Get the value from a foo(<param_value>) style call */
       
  5364             if (IN_param_value == NULL)
       
  5365               IN_param_value = function_call_param_iterator.next();
       
  5366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5368             
       
  5369             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5370             {
       
  5371         
       
  5372                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5373                 return return_type_symbol;
       
  5374                 
       
  5375             }
       
  5376             
       
  5377             ERROR;
       
  5378         }
       
  5379         
       
  5380     }/*function_ulint_to_string*/
       
  5381     break;
       
  5382 
       
  5383 /****
       
  5384  *ULINT_TO_BYTE
       
  5385  */
       
  5386     case function_ulint_to_byte :
       
  5387     {
       
  5388         symbol_c *last_type_symbol = NULL;
       
  5389 
       
  5390         {
       
  5391             identifier_c param_name("IN");
       
  5392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5394             
       
  5395             /* Get the value from a foo(<param_value>) style call */
       
  5396             if (IN_param_value == NULL)
       
  5397               IN_param_value = function_call_param_iterator.next();
       
  5398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5400             
       
  5401             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5402             {
       
  5403         
       
  5404                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5405                 return return_type_symbol;
       
  5406                 
       
  5407             }
       
  5408             
       
  5409             ERROR;
       
  5410         }
       
  5411         
       
  5412     }/*function_ulint_to_byte*/
       
  5413     break;
       
  5414 
       
  5415 /****
       
  5416  *ULINT_TO_WORD
       
  5417  */
       
  5418     case function_ulint_to_word :
       
  5419     {
       
  5420         symbol_c *last_type_symbol = NULL;
       
  5421 
       
  5422         {
       
  5423             identifier_c param_name("IN");
       
  5424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5432             
       
  5433             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5434             {
       
  5435         
       
  5436                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  5437                 return return_type_symbol;
       
  5438                 
       
  5439             }
       
  5440             
       
  5441             ERROR;
       
  5442         }
       
  5443         
       
  5444     }/*function_ulint_to_word*/
       
  5445     break;
       
  5446 
       
  5447 /****
       
  5448  *ULINT_TO_DWORD
       
  5449  */
       
  5450     case function_ulint_to_dword :
       
  5451     {
       
  5452         symbol_c *last_type_symbol = NULL;
       
  5453 
       
  5454         {
       
  5455             identifier_c param_name("IN");
       
  5456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5458             
       
  5459             /* Get the value from a foo(<param_value>) style call */
       
  5460             if (IN_param_value == NULL)
       
  5461               IN_param_value = function_call_param_iterator.next();
       
  5462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5464             
       
  5465             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5466             {
       
  5467         
       
  5468                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5469                 return return_type_symbol;
       
  5470                 
       
  5471             }
       
  5472             
       
  5473             ERROR;
       
  5474         }
       
  5475         
       
  5476     }/*function_ulint_to_dword*/
       
  5477     break;
       
  5478 
       
  5479 /****
       
  5480  *ULINT_TO_LWORD
       
  5481  */
       
  5482     case function_ulint_to_lword :
       
  5483     {
       
  5484         symbol_c *last_type_symbol = NULL;
       
  5485 
       
  5486         {
       
  5487             identifier_c param_name("IN");
       
  5488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5490             
       
  5491             /* Get the value from a foo(<param_value>) style call */
       
  5492             if (IN_param_value == NULL)
       
  5493               IN_param_value = function_call_param_iterator.next();
       
  5494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5496             
       
  5497             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  5498             {
       
  5499         
       
  5500                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5501                 return return_type_symbol;
       
  5502                 
       
  5503             }
       
  5504             
       
  5505             ERROR;
       
  5506         }
       
  5507         
       
  5508     }/*function_ulint_to_lword*/
       
  5509     break;
       
  5510 
       
  5511 /****
       
  5512  *REAL_TO_BOOL
       
  5513  */
       
  5514     case function_real_to_bool :
       
  5515     {
       
  5516         symbol_c *last_type_symbol = NULL;
       
  5517 
       
  5518         {
       
  5519             identifier_c param_name("IN");
       
  5520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5522             
       
  5523             /* Get the value from a foo(<param_value>) style call */
       
  5524             if (IN_param_value == NULL)
       
  5525               IN_param_value = function_call_param_iterator.next();
       
  5526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5528             
       
  5529             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5530             {
       
  5531         
       
  5532                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5533                 return return_type_symbol;
       
  5534                 
       
  5535             }
       
  5536             
       
  5537             ERROR;
       
  5538         }
       
  5539         
       
  5540     }/*function_real_to_bool*/
       
  5541     break;
       
  5542 
       
  5543 /****
       
  5544  *REAL_TO_SINT
       
  5545  */
       
  5546     case function_real_to_sint :
       
  5547     {
       
  5548         symbol_c *last_type_symbol = NULL;
       
  5549 
       
  5550         {
       
  5551             identifier_c param_name("IN");
       
  5552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5554             
       
  5555             /* Get the value from a foo(<param_value>) style call */
       
  5556             if (IN_param_value == NULL)
       
  5557               IN_param_value = function_call_param_iterator.next();
       
  5558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5560             
       
  5561             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5562             {
       
  5563         
       
  5564                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5565                 return return_type_symbol;
       
  5566                 
       
  5567             }
       
  5568             
       
  5569             ERROR;
       
  5570         }
       
  5571         
       
  5572     }/*function_real_to_sint*/
       
  5573     break;
       
  5574 
       
  5575 /****
       
  5576  *REAL_TO_INT
       
  5577  */
       
  5578     case function_real_to_int :
       
  5579     {
       
  5580         symbol_c *last_type_symbol = NULL;
       
  5581 
       
  5582         {
       
  5583             identifier_c param_name("IN");
       
  5584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5586             
       
  5587             /* Get the value from a foo(<param_value>) style call */
       
  5588             if (IN_param_value == NULL)
       
  5589               IN_param_value = function_call_param_iterator.next();
       
  5590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5592             
       
  5593             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5594             {
       
  5595         
       
  5596                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5597                 return return_type_symbol;
       
  5598                 
       
  5599             }
       
  5600             
       
  5601             ERROR;
       
  5602         }
       
  5603         
       
  5604     }/*function_real_to_int*/
       
  5605     break;
       
  5606 
       
  5607 /****
       
  5608  *REAL_TO_DINT
       
  5609  */
       
  5610     case function_real_to_dint :
       
  5611     {
       
  5612         symbol_c *last_type_symbol = NULL;
       
  5613 
       
  5614         {
       
  5615             identifier_c param_name("IN");
       
  5616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5618             
       
  5619             /* Get the value from a foo(<param_value>) style call */
       
  5620             if (IN_param_value == NULL)
       
  5621               IN_param_value = function_call_param_iterator.next();
       
  5622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5624             
       
  5625             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5626             {
       
  5627         
       
  5628                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5629                 return return_type_symbol;
       
  5630                 
       
  5631             }
       
  5632             
       
  5633             ERROR;
       
  5634         }
       
  5635         
       
  5636     }/*function_real_to_dint*/
       
  5637     break;
       
  5638 
       
  5639 /****
       
  5640  *REAL_TO_LINT
       
  5641  */
       
  5642     case function_real_to_lint :
       
  5643     {
       
  5644         symbol_c *last_type_symbol = NULL;
       
  5645 
       
  5646         {
       
  5647             identifier_c param_name("IN");
       
  5648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5650             
       
  5651             /* Get the value from a foo(<param_value>) style call */
       
  5652             if (IN_param_value == NULL)
       
  5653               IN_param_value = function_call_param_iterator.next();
       
  5654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5656             
       
  5657             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5658             {
       
  5659         
       
  5660                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5661                 return return_type_symbol;
       
  5662                 
       
  5663             }
       
  5664             
       
  5665             ERROR;
       
  5666         }
       
  5667         
       
  5668     }/*function_real_to_lint*/
       
  5669     break;
       
  5670 
       
  5671 /****
       
  5672  *REAL_TO_USINT
       
  5673  */
       
  5674     case function_real_to_usint :
       
  5675     {
       
  5676         symbol_c *last_type_symbol = NULL;
       
  5677 
       
  5678         {
       
  5679             identifier_c param_name("IN");
       
  5680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5682             
       
  5683             /* Get the value from a foo(<param_value>) style call */
       
  5684             if (IN_param_value == NULL)
       
  5685               IN_param_value = function_call_param_iterator.next();
       
  5686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5688             
       
  5689             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5690             {
       
  5691         
       
  5692                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5693                 return return_type_symbol;
       
  5694                 
       
  5695             }
       
  5696             
       
  5697             ERROR;
       
  5698         }
       
  5699         
       
  5700     }/*function_real_to_usint*/
       
  5701     break;
       
  5702 
       
  5703 /****
       
  5704  *REAL_TO_UINT
       
  5705  */
       
  5706     case function_real_to_uint :
       
  5707     {
       
  5708         symbol_c *last_type_symbol = NULL;
       
  5709 
       
  5710         {
       
  5711             identifier_c param_name("IN");
       
  5712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5720             
       
  5721             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5722             {
       
  5723         
       
  5724                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5725                 return return_type_symbol;
       
  5726                 
       
  5727             }
       
  5728             
       
  5729             ERROR;
       
  5730         }
       
  5731         
       
  5732     }/*function_real_to_uint*/
       
  5733     break;
       
  5734 
       
  5735 /****
       
  5736  *REAL_TO_UDINT
       
  5737  */
       
  5738     case function_real_to_udint :
       
  5739     {
       
  5740         symbol_c *last_type_symbol = NULL;
       
  5741 
       
  5742         {
       
  5743             identifier_c param_name("IN");
       
  5744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5746             
       
  5747             /* Get the value from a foo(<param_value>) style call */
       
  5748             if (IN_param_value == NULL)
       
  5749               IN_param_value = function_call_param_iterator.next();
       
  5750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5752             
       
  5753             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5754             {
       
  5755         
       
  5756                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5757                 return return_type_symbol;
       
  5758                 
       
  5759             }
       
  5760             
       
  5761             ERROR;
       
  5762         }
       
  5763         
       
  5764     }/*function_real_to_udint*/
       
  5765     break;
       
  5766 
       
  5767 /****
       
  5768  *REAL_TO_ULINT
       
  5769  */
       
  5770     case function_real_to_ulint :
       
  5771     {
       
  5772         symbol_c *last_type_symbol = NULL;
       
  5773 
       
  5774         {
       
  5775             identifier_c param_name("IN");
       
  5776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5778             
       
  5779             /* Get the value from a foo(<param_value>) style call */
       
  5780             if (IN_param_value == NULL)
       
  5781               IN_param_value = function_call_param_iterator.next();
       
  5782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5784             
       
  5785             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5786             {
       
  5787         
       
  5788                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5789                 return return_type_symbol;
       
  5790                 
       
  5791             }
       
  5792             
       
  5793             ERROR;
       
  5794         }
       
  5795         
       
  5796     }/*function_real_to_ulint*/
       
  5797     break;
       
  5798 
       
  5799 /****
       
  5800  *REAL_TO_LREAL
       
  5801  */
       
  5802     case function_real_to_lreal :
       
  5803     {
       
  5804         symbol_c *last_type_symbol = NULL;
       
  5805 
       
  5806         {
       
  5807             identifier_c param_name("IN");
       
  5808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5810             
       
  5811             /* Get the value from a foo(<param_value>) style call */
       
  5812             if (IN_param_value == NULL)
       
  5813               IN_param_value = function_call_param_iterator.next();
       
  5814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5816             
       
  5817             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5818             {
       
  5819         
       
  5820                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5821                 return return_type_symbol;
       
  5822                 
       
  5823             }
       
  5824             
       
  5825             ERROR;
       
  5826         }
       
  5827         
       
  5828     }/*function_real_to_lreal*/
       
  5829     break;
       
  5830 
       
  5831 /****
       
  5832  *REAL_TO_TIME
       
  5833  */
       
  5834     case function_real_to_time :
       
  5835     {
       
  5836         symbol_c *last_type_symbol = NULL;
       
  5837 
       
  5838         {
       
  5839             identifier_c param_name("IN");
       
  5840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5842             
       
  5843             /* Get the value from a foo(<param_value>) style call */
       
  5844             if (IN_param_value == NULL)
       
  5845               IN_param_value = function_call_param_iterator.next();
       
  5846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5848             
       
  5849             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5850             {
       
  5851         
       
  5852                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5853                 return return_type_symbol;
       
  5854                 
       
  5855             }
       
  5856             
       
  5857             ERROR;
       
  5858         }
       
  5859         
       
  5860     }/*function_real_to_time*/
       
  5861     break;
       
  5862 
       
  5863 /****
       
  5864  *REAL_TO_DATE
       
  5865  */
       
  5866     case function_real_to_date :
       
  5867     {
       
  5868         symbol_c *last_type_symbol = NULL;
       
  5869 
       
  5870         {
       
  5871             identifier_c param_name("IN");
       
  5872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5874             
       
  5875             /* Get the value from a foo(<param_value>) style call */
       
  5876             if (IN_param_value == NULL)
       
  5877               IN_param_value = function_call_param_iterator.next();
       
  5878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5880             
       
  5881             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5882             {
       
  5883         
       
  5884                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5885                 return return_type_symbol;
       
  5886                 
       
  5887             }
       
  5888             
       
  5889             ERROR;
       
  5890         }
       
  5891         
       
  5892     }/*function_real_to_date*/
       
  5893     break;
       
  5894 
       
  5895 /****
       
  5896  *REAL_TO_TOD
       
  5897  */
       
  5898     case function_real_to_tod :
       
  5899     {
       
  5900         symbol_c *last_type_symbol = NULL;
       
  5901 
       
  5902         {
       
  5903             identifier_c param_name("IN");
       
  5904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5906             
       
  5907             /* Get the value from a foo(<param_value>) style call */
       
  5908             if (IN_param_value == NULL)
       
  5909               IN_param_value = function_call_param_iterator.next();
       
  5910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5912             
       
  5913             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5914             {
       
  5915         
       
  5916                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5917                 return return_type_symbol;
       
  5918                 
       
  5919             }
       
  5920             
       
  5921             ERROR;
       
  5922         }
       
  5923         
       
  5924     }/*function_real_to_tod*/
       
  5925     break;
       
  5926 
       
  5927 /****
       
  5928  *REAL_TO_DT
       
  5929  */
       
  5930     case function_real_to_dt :
       
  5931     {
       
  5932         symbol_c *last_type_symbol = NULL;
       
  5933 
       
  5934         {
       
  5935             identifier_c param_name("IN");
       
  5936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5938             
       
  5939             /* Get the value from a foo(<param_value>) style call */
       
  5940             if (IN_param_value == NULL)
       
  5941               IN_param_value = function_call_param_iterator.next();
       
  5942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5944             
       
  5945             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5946             {
       
  5947         
       
  5948                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5949                 return return_type_symbol;
       
  5950                 
       
  5951             }
       
  5952             
       
  5953             ERROR;
       
  5954         }
       
  5955         
       
  5956     }/*function_real_to_dt*/
       
  5957     break;
       
  5958 
       
  5959 /****
       
  5960  *REAL_TO_STRING
       
  5961  */
       
  5962     case function_real_to_string :
       
  5963     {
       
  5964         symbol_c *last_type_symbol = NULL;
       
  5965 
       
  5966         {
       
  5967             identifier_c param_name("IN");
       
  5968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5970             
       
  5971             /* Get the value from a foo(<param_value>) style call */
       
  5972             if (IN_param_value == NULL)
       
  5973               IN_param_value = function_call_param_iterator.next();
       
  5974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5976             
       
  5977             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  5978             {
       
  5979         
       
  5980                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5981                 return return_type_symbol;
       
  5982                 
       
  5983             }
       
  5984             
       
  5985             ERROR;
       
  5986         }
       
  5987         
       
  5988     }/*function_real_to_string*/
       
  5989     break;
       
  5990 
       
  5991 /****
       
  5992  *REAL_TO_BYTE
       
  5993  */
       
  5994     case function_real_to_byte :
       
  5995     {
       
  5996         symbol_c *last_type_symbol = NULL;
       
  5997 
       
  5998         {
       
  5999             identifier_c param_name("IN");
       
  6000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6008             
       
  6009             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  6010             {
       
  6011         
       
  6012                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6013                 return return_type_symbol;
       
  6014                 
       
  6015             }
       
  6016             
       
  6017             ERROR;
       
  6018         }
       
  6019         
       
  6020     }/*function_real_to_byte*/
       
  6021     break;
       
  6022 
       
  6023 /****
       
  6024  *REAL_TO_WORD
       
  6025  */
       
  6026     case function_real_to_word :
       
  6027     {
       
  6028         symbol_c *last_type_symbol = NULL;
       
  6029 
       
  6030         {
       
  6031             identifier_c param_name("IN");
       
  6032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6034             
       
  6035             /* Get the value from a foo(<param_value>) style call */
       
  6036             if (IN_param_value == NULL)
       
  6037               IN_param_value = function_call_param_iterator.next();
       
  6038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6040             
       
  6041             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  6042             {
       
  6043         
       
  6044                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6045                 return return_type_symbol;
       
  6046                 
       
  6047             }
       
  6048             
       
  6049             ERROR;
       
  6050         }
       
  6051         
       
  6052     }/*function_real_to_word*/
       
  6053     break;
       
  6054 
       
  6055 /****
       
  6056  *REAL_TO_DWORD
       
  6057  */
       
  6058     case function_real_to_dword :
       
  6059     {
       
  6060         symbol_c *last_type_symbol = NULL;
       
  6061 
       
  6062         {
       
  6063             identifier_c param_name("IN");
       
  6064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6066             
       
  6067             /* Get the value from a foo(<param_value>) style call */
       
  6068             if (IN_param_value == NULL)
       
  6069               IN_param_value = function_call_param_iterator.next();
       
  6070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6072             
       
  6073             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  6074             {
       
  6075         
       
  6076                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6077                 return return_type_symbol;
       
  6078                 
       
  6079             }
       
  6080             
       
  6081             ERROR;
       
  6082         }
       
  6083         
       
  6084     }/*function_real_to_dword*/
       
  6085     break;
       
  6086 
       
  6087 /****
       
  6088  *REAL_TO_LWORD
       
  6089  */
       
  6090     case function_real_to_lword :
       
  6091     {
       
  6092         symbol_c *last_type_symbol = NULL;
       
  6093 
       
  6094         {
       
  6095             identifier_c param_name("IN");
       
  6096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6098             
       
  6099             /* Get the value from a foo(<param_value>) style call */
       
  6100             if (IN_param_value == NULL)
       
  6101               IN_param_value = function_call_param_iterator.next();
       
  6102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6104             
       
  6105             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
  6106             {
       
  6107         
       
  6108                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6109                 return return_type_symbol;
       
  6110                 
       
  6111             }
       
  6112             
       
  6113             ERROR;
       
  6114         }
       
  6115         
       
  6116     }/*function_real_to_lword*/
       
  6117     break;
       
  6118 
       
  6119 /****
       
  6120  *LREAL_TO_BOOL
       
  6121  */
       
  6122     case function_lreal_to_bool :
       
  6123     {
       
  6124         symbol_c *last_type_symbol = NULL;
       
  6125 
       
  6126         {
       
  6127             identifier_c param_name("IN");
       
  6128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6130             
       
  6131             /* Get the value from a foo(<param_value>) style call */
       
  6132             if (IN_param_value == NULL)
       
  6133               IN_param_value = function_call_param_iterator.next();
       
  6134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6136             
       
  6137             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6138             {
       
  6139         
       
  6140                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6141                 return return_type_symbol;
       
  6142                 
       
  6143             }
       
  6144             
       
  6145             ERROR;
       
  6146         }
       
  6147         
       
  6148     }/*function_lreal_to_bool*/
       
  6149     break;
       
  6150 
       
  6151 /****
       
  6152  *LREAL_TO_SINT
       
  6153  */
       
  6154     case function_lreal_to_sint :
       
  6155     {
       
  6156         symbol_c *last_type_symbol = NULL;
       
  6157 
       
  6158         {
       
  6159             identifier_c param_name("IN");
       
  6160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6162             
       
  6163             /* Get the value from a foo(<param_value>) style call */
       
  6164             if (IN_param_value == NULL)
       
  6165               IN_param_value = function_call_param_iterator.next();
       
  6166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6168             
       
  6169             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6170             {
       
  6171         
       
  6172                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6173                 return return_type_symbol;
       
  6174                 
       
  6175             }
       
  6176             
       
  6177             ERROR;
       
  6178         }
       
  6179         
       
  6180     }/*function_lreal_to_sint*/
       
  6181     break;
       
  6182 
       
  6183 /****
       
  6184  *LREAL_TO_INT
       
  6185  */
       
  6186     case function_lreal_to_int :
       
  6187     {
       
  6188         symbol_c *last_type_symbol = NULL;
       
  6189 
       
  6190         {
       
  6191             identifier_c param_name("IN");
       
  6192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6194             
       
  6195             /* Get the value from a foo(<param_value>) style call */
       
  6196             if (IN_param_value == NULL)
       
  6197               IN_param_value = function_call_param_iterator.next();
       
  6198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6200             
       
  6201             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6202             {
       
  6203         
       
  6204                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6205                 return return_type_symbol;
       
  6206                 
       
  6207             }
       
  6208             
       
  6209             ERROR;
       
  6210         }
       
  6211         
       
  6212     }/*function_lreal_to_int*/
       
  6213     break;
       
  6214 
       
  6215 /****
       
  6216  *LREAL_TO_DINT
       
  6217  */
       
  6218     case function_lreal_to_dint :
       
  6219     {
       
  6220         symbol_c *last_type_symbol = NULL;
       
  6221 
       
  6222         {
       
  6223             identifier_c param_name("IN");
       
  6224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6226             
       
  6227             /* Get the value from a foo(<param_value>) style call */
       
  6228             if (IN_param_value == NULL)
       
  6229               IN_param_value = function_call_param_iterator.next();
       
  6230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6232             
       
  6233             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6234             {
       
  6235         
       
  6236                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6237                 return return_type_symbol;
       
  6238                 
       
  6239             }
       
  6240             
       
  6241             ERROR;
       
  6242         }
       
  6243         
       
  6244     }/*function_lreal_to_dint*/
       
  6245     break;
       
  6246 
       
  6247 /****
       
  6248  *LREAL_TO_LINT
       
  6249  */
       
  6250     case function_lreal_to_lint :
       
  6251     {
       
  6252         symbol_c *last_type_symbol = NULL;
       
  6253 
       
  6254         {
       
  6255             identifier_c param_name("IN");
       
  6256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6258             
       
  6259             /* Get the value from a foo(<param_value>) style call */
       
  6260             if (IN_param_value == NULL)
       
  6261               IN_param_value = function_call_param_iterator.next();
       
  6262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6264             
       
  6265             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6266             {
       
  6267         
       
  6268                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6269                 return return_type_symbol;
       
  6270                 
       
  6271             }
       
  6272             
       
  6273             ERROR;
       
  6274         }
       
  6275         
       
  6276     }/*function_lreal_to_lint*/
       
  6277     break;
       
  6278 
       
  6279 /****
       
  6280  *LREAL_TO_USINT
       
  6281  */
       
  6282     case function_lreal_to_usint :
       
  6283     {
       
  6284         symbol_c *last_type_symbol = NULL;
       
  6285 
       
  6286         {
       
  6287             identifier_c param_name("IN");
       
  6288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6296             
       
  6297             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6298             {
       
  6299         
       
  6300                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6301                 return return_type_symbol;
       
  6302                 
       
  6303             }
       
  6304             
       
  6305             ERROR;
       
  6306         }
       
  6307         
       
  6308     }/*function_lreal_to_usint*/
       
  6309     break;
       
  6310 
       
  6311 /****
       
  6312  *LREAL_TO_UINT
       
  6313  */
       
  6314     case function_lreal_to_uint :
       
  6315     {
       
  6316         symbol_c *last_type_symbol = NULL;
       
  6317 
       
  6318         {
       
  6319             identifier_c param_name("IN");
       
  6320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6322             
       
  6323             /* Get the value from a foo(<param_value>) style call */
       
  6324             if (IN_param_value == NULL)
       
  6325               IN_param_value = function_call_param_iterator.next();
       
  6326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6328             
       
  6329             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6330             {
       
  6331         
       
  6332                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6333                 return return_type_symbol;
       
  6334                 
       
  6335             }
       
  6336             
       
  6337             ERROR;
       
  6338         }
       
  6339         
       
  6340     }/*function_lreal_to_uint*/
       
  6341     break;
       
  6342 
       
  6343 /****
       
  6344  *LREAL_TO_UDINT
       
  6345  */
       
  6346     case function_lreal_to_udint :
       
  6347     {
       
  6348         symbol_c *last_type_symbol = NULL;
       
  6349 
       
  6350         {
       
  6351             identifier_c param_name("IN");
       
  6352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6354             
       
  6355             /* Get the value from a foo(<param_value>) style call */
       
  6356             if (IN_param_value == NULL)
       
  6357               IN_param_value = function_call_param_iterator.next();
       
  6358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6360             
       
  6361             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6362             {
       
  6363         
       
  6364                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6365                 return return_type_symbol;
       
  6366                 
       
  6367             }
       
  6368             
       
  6369             ERROR;
       
  6370         }
       
  6371         
       
  6372     }/*function_lreal_to_udint*/
       
  6373     break;
       
  6374 
       
  6375 /****
       
  6376  *LREAL_TO_ULINT
       
  6377  */
       
  6378     case function_lreal_to_ulint :
       
  6379     {
       
  6380         symbol_c *last_type_symbol = NULL;
       
  6381 
       
  6382         {
       
  6383             identifier_c param_name("IN");
       
  6384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6386             
       
  6387             /* Get the value from a foo(<param_value>) style call */
       
  6388             if (IN_param_value == NULL)
       
  6389               IN_param_value = function_call_param_iterator.next();
       
  6390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6392             
       
  6393             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6394             {
       
  6395         
       
  6396                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6397                 return return_type_symbol;
       
  6398                 
       
  6399             }
       
  6400             
       
  6401             ERROR;
       
  6402         }
       
  6403         
       
  6404     }/*function_lreal_to_ulint*/
       
  6405     break;
       
  6406 
       
  6407 /****
       
  6408  *LREAL_TO_REAL
       
  6409  */
       
  6410     case function_lreal_to_real :
       
  6411     {
       
  6412         symbol_c *last_type_symbol = NULL;
       
  6413 
       
  6414         {
       
  6415             identifier_c param_name("IN");
       
  6416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6418             
       
  6419             /* Get the value from a foo(<param_value>) style call */
       
  6420             if (IN_param_value == NULL)
       
  6421               IN_param_value = function_call_param_iterator.next();
       
  6422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6424             
       
  6425             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6426             {
       
  6427         
       
  6428                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6429                 return return_type_symbol;
       
  6430                 
       
  6431             }
       
  6432             
       
  6433             ERROR;
       
  6434         }
       
  6435         
       
  6436     }/*function_lreal_to_real*/
       
  6437     break;
       
  6438 
       
  6439 /****
       
  6440  *LREAL_TO_TIME
       
  6441  */
       
  6442     case function_lreal_to_time :
       
  6443     {
       
  6444         symbol_c *last_type_symbol = NULL;
       
  6445 
       
  6446         {
       
  6447             identifier_c param_name("IN");
       
  6448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6450             
       
  6451             /* Get the value from a foo(<param_value>) style call */
       
  6452             if (IN_param_value == NULL)
       
  6453               IN_param_value = function_call_param_iterator.next();
       
  6454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6456             
       
  6457             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6458             {
       
  6459         
       
  6460                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6461                 return return_type_symbol;
       
  6462                 
       
  6463             }
       
  6464             
       
  6465             ERROR;
       
  6466         }
       
  6467         
       
  6468     }/*function_lreal_to_time*/
       
  6469     break;
       
  6470 
       
  6471 /****
       
  6472  *LREAL_TO_DATE
       
  6473  */
       
  6474     case function_lreal_to_date :
       
  6475     {
       
  6476         symbol_c *last_type_symbol = NULL;
       
  6477 
       
  6478         {
       
  6479             identifier_c param_name("IN");
       
  6480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6482             
       
  6483             /* Get the value from a foo(<param_value>) style call */
       
  6484             if (IN_param_value == NULL)
       
  6485               IN_param_value = function_call_param_iterator.next();
       
  6486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6488             
       
  6489             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6490             {
       
  6491         
       
  6492                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6493                 return return_type_symbol;
       
  6494                 
       
  6495             }
       
  6496             
       
  6497             ERROR;
       
  6498         }
       
  6499         
       
  6500     }/*function_lreal_to_date*/
       
  6501     break;
       
  6502 
       
  6503 /****
       
  6504  *LREAL_TO_TOD
       
  6505  */
       
  6506     case function_lreal_to_tod :
       
  6507     {
       
  6508         symbol_c *last_type_symbol = NULL;
       
  6509 
       
  6510         {
       
  6511             identifier_c param_name("IN");
       
  6512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6514             
       
  6515             /* Get the value from a foo(<param_value>) style call */
       
  6516             if (IN_param_value == NULL)
       
  6517               IN_param_value = function_call_param_iterator.next();
       
  6518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6520             
       
  6521             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6522             {
       
  6523         
       
  6524                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6525                 return return_type_symbol;
       
  6526                 
       
  6527             }
       
  6528             
       
  6529             ERROR;
       
  6530         }
       
  6531         
       
  6532     }/*function_lreal_to_tod*/
       
  6533     break;
       
  6534 
       
  6535 /****
       
  6536  *LREAL_TO_DT
       
  6537  */
       
  6538     case function_lreal_to_dt :
       
  6539     {
       
  6540         symbol_c *last_type_symbol = NULL;
       
  6541 
       
  6542         {
       
  6543             identifier_c param_name("IN");
       
  6544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6546             
       
  6547             /* Get the value from a foo(<param_value>) style call */
       
  6548             if (IN_param_value == NULL)
       
  6549               IN_param_value = function_call_param_iterator.next();
       
  6550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6552             
       
  6553             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6554             {
       
  6555         
       
  6556                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6557                 return return_type_symbol;
       
  6558                 
       
  6559             }
       
  6560             
       
  6561             ERROR;
       
  6562         }
       
  6563         
       
  6564     }/*function_lreal_to_dt*/
       
  6565     break;
       
  6566 
       
  6567 /****
       
  6568  *LREAL_TO_STRING
       
  6569  */
       
  6570     case function_lreal_to_string :
       
  6571     {
       
  6572         symbol_c *last_type_symbol = NULL;
       
  6573 
       
  6574         {
       
  6575             identifier_c param_name("IN");
       
  6576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6584             
       
  6585             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6586             {
       
  6587         
       
  6588                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6589                 return return_type_symbol;
       
  6590                 
       
  6591             }
       
  6592             
       
  6593             ERROR;
       
  6594         }
       
  6595         
       
  6596     }/*function_lreal_to_string*/
       
  6597     break;
       
  6598 
       
  6599 /****
       
  6600  *LREAL_TO_BYTE
       
  6601  */
       
  6602     case function_lreal_to_byte :
       
  6603     {
       
  6604         symbol_c *last_type_symbol = NULL;
       
  6605 
       
  6606         {
       
  6607             identifier_c param_name("IN");
       
  6608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6610             
       
  6611             /* Get the value from a foo(<param_value>) style call */
       
  6612             if (IN_param_value == NULL)
       
  6613               IN_param_value = function_call_param_iterator.next();
       
  6614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6616             
       
  6617             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6618             {
       
  6619         
       
  6620                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6621                 return return_type_symbol;
       
  6622                 
       
  6623             }
       
  6624             
       
  6625             ERROR;
       
  6626         }
       
  6627         
       
  6628     }/*function_lreal_to_byte*/
       
  6629     break;
       
  6630 
       
  6631 /****
       
  6632  *LREAL_TO_WORD
       
  6633  */
       
  6634     case function_lreal_to_word :
       
  6635     {
       
  6636         symbol_c *last_type_symbol = NULL;
       
  6637 
       
  6638         {
       
  6639             identifier_c param_name("IN");
       
  6640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6642             
       
  6643             /* Get the value from a foo(<param_value>) style call */
       
  6644             if (IN_param_value == NULL)
       
  6645               IN_param_value = function_call_param_iterator.next();
       
  6646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6648             
       
  6649             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6650             {
       
  6651         
       
  6652                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6653                 return return_type_symbol;
       
  6654                 
       
  6655             }
       
  6656             
       
  6657             ERROR;
       
  6658         }
       
  6659         
       
  6660     }/*function_lreal_to_word*/
       
  6661     break;
       
  6662 
       
  6663 /****
       
  6664  *LREAL_TO_DWORD
       
  6665  */
       
  6666     case function_lreal_to_dword :
       
  6667     {
       
  6668         symbol_c *last_type_symbol = NULL;
       
  6669 
       
  6670         {
       
  6671             identifier_c param_name("IN");
       
  6672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6674             
       
  6675             /* Get the value from a foo(<param_value>) style call */
       
  6676             if (IN_param_value == NULL)
       
  6677               IN_param_value = function_call_param_iterator.next();
       
  6678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6680             
       
  6681             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6682             {
       
  6683         
       
  6684                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6685                 return return_type_symbol;
       
  6686                 
       
  6687             }
       
  6688             
       
  6689             ERROR;
       
  6690         }
       
  6691         
       
  6692     }/*function_lreal_to_dword*/
       
  6693     break;
       
  6694 
       
  6695 /****
       
  6696  *LREAL_TO_LWORD
       
  6697  */
       
  6698     case function_lreal_to_lword :
       
  6699     {
       
  6700         symbol_c *last_type_symbol = NULL;
       
  6701 
       
  6702         {
       
  6703             identifier_c param_name("IN");
       
  6704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6706             
       
  6707             /* Get the value from a foo(<param_value>) style call */
       
  6708             if (IN_param_value == NULL)
       
  6709               IN_param_value = function_call_param_iterator.next();
       
  6710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6712             
       
  6713             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  6714             {
       
  6715         
       
  6716                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6717                 return return_type_symbol;
       
  6718                 
       
  6719             }
       
  6720             
       
  6721             ERROR;
       
  6722         }
       
  6723         
       
  6724     }/*function_lreal_to_lword*/
       
  6725     break;
       
  6726 
       
  6727 /****
       
  6728  *TIME_TO_SINT
       
  6729  */
       
  6730     case function_time_to_sint :
       
  6731     {
       
  6732         symbol_c *last_type_symbol = NULL;
       
  6733 
       
  6734         {
       
  6735             identifier_c param_name("IN");
       
  6736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6738             
       
  6739             /* Get the value from a foo(<param_value>) style call */
       
  6740             if (IN_param_value == NULL)
       
  6741               IN_param_value = function_call_param_iterator.next();
       
  6742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6744             
       
  6745             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6746             {
       
  6747         
       
  6748                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6749                 return return_type_symbol;
       
  6750                 
       
  6751             }
       
  6752             
       
  6753             ERROR;
       
  6754         }
       
  6755         
       
  6756     }/*function_time_to_sint*/
       
  6757     break;
       
  6758 
       
  6759 /****
       
  6760  *TIME_TO_INT
       
  6761  */
       
  6762     case function_time_to_int :
       
  6763     {
       
  6764         symbol_c *last_type_symbol = NULL;
       
  6765 
       
  6766         {
       
  6767             identifier_c param_name("IN");
       
  6768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6770             
       
  6771             /* Get the value from a foo(<param_value>) style call */
       
  6772             if (IN_param_value == NULL)
       
  6773               IN_param_value = function_call_param_iterator.next();
       
  6774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6776             
       
  6777             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6778             {
       
  6779         
       
  6780                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6781                 return return_type_symbol;
       
  6782                 
       
  6783             }
       
  6784             
       
  6785             ERROR;
       
  6786         }
       
  6787         
       
  6788     }/*function_time_to_int*/
       
  6789     break;
       
  6790 
       
  6791 /****
       
  6792  *TIME_TO_DINT
       
  6793  */
       
  6794     case function_time_to_dint :
       
  6795     {
       
  6796         symbol_c *last_type_symbol = NULL;
       
  6797 
       
  6798         {
       
  6799             identifier_c param_name("IN");
       
  6800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6802             
       
  6803             /* Get the value from a foo(<param_value>) style call */
       
  6804             if (IN_param_value == NULL)
       
  6805               IN_param_value = function_call_param_iterator.next();
       
  6806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6808             
       
  6809             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6810             {
       
  6811         
       
  6812                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6813                 return return_type_symbol;
       
  6814                 
       
  6815             }
       
  6816             
       
  6817             ERROR;
       
  6818         }
       
  6819         
       
  6820     }/*function_time_to_dint*/
       
  6821     break;
       
  6822 
       
  6823 /****
       
  6824  *TIME_TO_LINT
       
  6825  */
       
  6826     case function_time_to_lint :
       
  6827     {
       
  6828         symbol_c *last_type_symbol = NULL;
       
  6829 
       
  6830         {
       
  6831             identifier_c param_name("IN");
       
  6832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6834             
       
  6835             /* Get the value from a foo(<param_value>) style call */
       
  6836             if (IN_param_value == NULL)
       
  6837               IN_param_value = function_call_param_iterator.next();
       
  6838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6840             
       
  6841             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6842             {
       
  6843         
       
  6844                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6845                 return return_type_symbol;
       
  6846                 
       
  6847             }
       
  6848             
       
  6849             ERROR;
       
  6850         }
       
  6851         
       
  6852     }/*function_time_to_lint*/
       
  6853     break;
       
  6854 
       
  6855 /****
       
  6856  *TIME_TO_USINT
       
  6857  */
       
  6858     case function_time_to_usint :
       
  6859     {
       
  6860         symbol_c *last_type_symbol = NULL;
       
  6861 
       
  6862         {
       
  6863             identifier_c param_name("IN");
       
  6864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6872             
       
  6873             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6874             {
       
  6875         
       
  6876                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6877                 return return_type_symbol;
       
  6878                 
       
  6879             }
       
  6880             
       
  6881             ERROR;
       
  6882         }
       
  6883         
       
  6884     }/*function_time_to_usint*/
       
  6885     break;
       
  6886 
       
  6887 /****
       
  6888  *TIME_TO_UINT
       
  6889  */
       
  6890     case function_time_to_uint :
       
  6891     {
       
  6892         symbol_c *last_type_symbol = NULL;
       
  6893 
       
  6894         {
       
  6895             identifier_c param_name("IN");
       
  6896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6898             
       
  6899             /* Get the value from a foo(<param_value>) style call */
       
  6900             if (IN_param_value == NULL)
       
  6901               IN_param_value = function_call_param_iterator.next();
       
  6902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6904             
       
  6905             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6906             {
       
  6907         
       
  6908                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6909                 return return_type_symbol;
       
  6910                 
       
  6911             }
       
  6912             
       
  6913             ERROR;
       
  6914         }
       
  6915         
       
  6916     }/*function_time_to_uint*/
       
  6917     break;
       
  6918 
       
  6919 /****
       
  6920  *TIME_TO_UDINT
       
  6921  */
       
  6922     case function_time_to_udint :
       
  6923     {
       
  6924         symbol_c *last_type_symbol = NULL;
       
  6925 
       
  6926         {
       
  6927             identifier_c param_name("IN");
       
  6928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6930             
       
  6931             /* Get the value from a foo(<param_value>) style call */
       
  6932             if (IN_param_value == NULL)
       
  6933               IN_param_value = function_call_param_iterator.next();
       
  6934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6936             
       
  6937             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6938             {
       
  6939         
       
  6940                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6941                 return return_type_symbol;
       
  6942                 
       
  6943             }
       
  6944             
       
  6945             ERROR;
       
  6946         }
       
  6947         
       
  6948     }/*function_time_to_udint*/
       
  6949     break;
       
  6950 
       
  6951 /****
       
  6952  *TIME_TO_ULINT
       
  6953  */
       
  6954     case function_time_to_ulint :
       
  6955     {
       
  6956         symbol_c *last_type_symbol = NULL;
       
  6957 
       
  6958         {
       
  6959             identifier_c param_name("IN");
       
  6960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6962             
       
  6963             /* Get the value from a foo(<param_value>) style call */
       
  6964             if (IN_param_value == NULL)
       
  6965               IN_param_value = function_call_param_iterator.next();
       
  6966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6968             
       
  6969             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6970             {
       
  6971         
       
  6972                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6973                 return return_type_symbol;
       
  6974                 
       
  6975             }
       
  6976             
       
  6977             ERROR;
       
  6978         }
       
  6979         
       
  6980     }/*function_time_to_ulint*/
       
  6981     break;
       
  6982 
       
  6983 /****
       
  6984  *TIME_TO_REAL
       
  6985  */
       
  6986     case function_time_to_real :
       
  6987     {
       
  6988         symbol_c *last_type_symbol = NULL;
       
  6989 
       
  6990         {
       
  6991             identifier_c param_name("IN");
       
  6992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6994             
       
  6995             /* Get the value from a foo(<param_value>) style call */
       
  6996             if (IN_param_value == NULL)
       
  6997               IN_param_value = function_call_param_iterator.next();
       
  6998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7000             
       
  7001             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7002             {
       
  7003         
       
  7004                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7005                 return return_type_symbol;
       
  7006                 
       
  7007             }
       
  7008             
       
  7009             ERROR;
       
  7010         }
       
  7011         
       
  7012     }/*function_time_to_real*/
       
  7013     break;
       
  7014 
       
  7015 /****
       
  7016  *TIME_TO_LREAL
       
  7017  */
       
  7018     case function_time_to_lreal :
       
  7019     {
       
  7020         symbol_c *last_type_symbol = NULL;
       
  7021 
       
  7022         {
       
  7023             identifier_c param_name("IN");
       
  7024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7026             
       
  7027             /* Get the value from a foo(<param_value>) style call */
       
  7028             if (IN_param_value == NULL)
       
  7029               IN_param_value = function_call_param_iterator.next();
       
  7030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7032             
       
  7033             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7034             {
       
  7035         
       
  7036                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7037                 return return_type_symbol;
       
  7038                 
       
  7039             }
       
  7040             
       
  7041             ERROR;
       
  7042         }
       
  7043         
       
  7044     }/*function_time_to_lreal*/
       
  7045     break;
       
  7046 
       
  7047 /****
       
  7048  *TIME_TO_STRING
       
  7049  */
       
  7050     case function_time_to_string :
       
  7051     {
       
  7052         symbol_c *last_type_symbol = NULL;
       
  7053 
       
  7054         {
       
  7055             identifier_c param_name("IN");
       
  7056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7058             
       
  7059             /* Get the value from a foo(<param_value>) style call */
       
  7060             if (IN_param_value == NULL)
       
  7061               IN_param_value = function_call_param_iterator.next();
       
  7062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7064             
       
  7065             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7066             {
       
  7067         
       
  7068                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7069                 return return_type_symbol;
       
  7070                 
       
  7071             }
       
  7072             
       
  7073             ERROR;
       
  7074         }
       
  7075         
       
  7076     }/*function_time_to_string*/
       
  7077     break;
       
  7078 
       
  7079 /****
       
  7080  *TIME_TO_BYTE
       
  7081  */
       
  7082     case function_time_to_byte :
       
  7083     {
       
  7084         symbol_c *last_type_symbol = NULL;
       
  7085 
       
  7086         {
       
  7087             identifier_c param_name("IN");
       
  7088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7090             
       
  7091             /* Get the value from a foo(<param_value>) style call */
       
  7092             if (IN_param_value == NULL)
       
  7093               IN_param_value = function_call_param_iterator.next();
       
  7094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7096             
       
  7097             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7098             {
       
  7099         
       
  7100                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7101                 return return_type_symbol;
       
  7102                 
       
  7103             }
       
  7104             
       
  7105             ERROR;
       
  7106         }
       
  7107         
       
  7108     }/*function_time_to_byte*/
       
  7109     break;
       
  7110 
       
  7111 /****
       
  7112  *TIME_TO_WORD
       
  7113  */
       
  7114     case function_time_to_word :
       
  7115     {
       
  7116         symbol_c *last_type_symbol = NULL;
       
  7117 
       
  7118         {
       
  7119             identifier_c param_name("IN");
       
  7120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7122             
       
  7123             /* Get the value from a foo(<param_value>) style call */
       
  7124             if (IN_param_value == NULL)
       
  7125               IN_param_value = function_call_param_iterator.next();
       
  7126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7128             
       
  7129             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7130             {
       
  7131         
       
  7132                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7133                 return return_type_symbol;
       
  7134                 
       
  7135             }
       
  7136             
       
  7137             ERROR;
       
  7138         }
       
  7139         
       
  7140     }/*function_time_to_word*/
       
  7141     break;
       
  7142 
       
  7143 /****
       
  7144  *TIME_TO_DWORD
       
  7145  */
       
  7146     case function_time_to_dword :
       
  7147     {
       
  7148         symbol_c *last_type_symbol = NULL;
       
  7149 
       
  7150         {
       
  7151             identifier_c param_name("IN");
       
  7152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7160             
       
  7161             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7162             {
       
  7163         
       
  7164                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7165                 return return_type_symbol;
       
  7166                 
       
  7167             }
       
  7168             
       
  7169             ERROR;
       
  7170         }
       
  7171         
       
  7172     }/*function_time_to_dword*/
       
  7173     break;
       
  7174 
       
  7175 /****
       
  7176  *TIME_TO_LWORD
       
  7177  */
       
  7178     case function_time_to_lword :
       
  7179     {
       
  7180         symbol_c *last_type_symbol = NULL;
       
  7181 
       
  7182         {
       
  7183             identifier_c param_name("IN");
       
  7184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7186             
       
  7187             /* Get the value from a foo(<param_value>) style call */
       
  7188             if (IN_param_value == NULL)
       
  7189               IN_param_value = function_call_param_iterator.next();
       
  7190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7192             
       
  7193             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7194             {
       
  7195         
       
  7196                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7197                 return return_type_symbol;
       
  7198                 
       
  7199             }
       
  7200             
       
  7201             ERROR;
       
  7202         }
       
  7203         
       
  7204     }/*function_time_to_lword*/
       
  7205     break;
       
  7206 
       
  7207 /****
       
  7208  *DATE_TO_SINT
       
  7209  */
       
  7210     case function_date_to_sint :
       
  7211     {
       
  7212         symbol_c *last_type_symbol = NULL;
       
  7213 
       
  7214         {
       
  7215             identifier_c param_name("IN");
       
  7216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7218             
       
  7219             /* Get the value from a foo(<param_value>) style call */
       
  7220             if (IN_param_value == NULL)
       
  7221               IN_param_value = function_call_param_iterator.next();
       
  7222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7224             
       
  7225             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7226             {
       
  7227         
       
  7228                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7229                 return return_type_symbol;
       
  7230                 
       
  7231             }
       
  7232             
       
  7233             ERROR;
       
  7234         }
       
  7235         
       
  7236     }/*function_date_to_sint*/
       
  7237     break;
       
  7238 
       
  7239 /****
       
  7240  *DATE_TO_INT
       
  7241  */
       
  7242     case function_date_to_int :
       
  7243     {
       
  7244         symbol_c *last_type_symbol = NULL;
       
  7245 
       
  7246         {
       
  7247             identifier_c param_name("IN");
       
  7248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7250             
       
  7251             /* Get the value from a foo(<param_value>) style call */
       
  7252             if (IN_param_value == NULL)
       
  7253               IN_param_value = function_call_param_iterator.next();
       
  7254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7256             
       
  7257             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7258             {
       
  7259         
       
  7260                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7261                 return return_type_symbol;
       
  7262                 
       
  7263             }
       
  7264             
       
  7265             ERROR;
       
  7266         }
       
  7267         
       
  7268     }/*function_date_to_int*/
       
  7269     break;
       
  7270 
       
  7271 /****
       
  7272  *DATE_TO_DINT
       
  7273  */
       
  7274     case function_date_to_dint :
       
  7275     {
       
  7276         symbol_c *last_type_symbol = NULL;
       
  7277 
       
  7278         {
       
  7279             identifier_c param_name("IN");
       
  7280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7282             
       
  7283             /* Get the value from a foo(<param_value>) style call */
       
  7284             if (IN_param_value == NULL)
       
  7285               IN_param_value = function_call_param_iterator.next();
       
  7286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7288             
       
  7289             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7290             {
       
  7291         
       
  7292                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7293                 return return_type_symbol;
       
  7294                 
       
  7295             }
       
  7296             
       
  7297             ERROR;
       
  7298         }
       
  7299         
       
  7300     }/*function_date_to_dint*/
       
  7301     break;
       
  7302 
       
  7303 /****
       
  7304  *DATE_TO_LINT
       
  7305  */
       
  7306     case function_date_to_lint :
       
  7307     {
       
  7308         symbol_c *last_type_symbol = NULL;
       
  7309 
       
  7310         {
       
  7311             identifier_c param_name("IN");
       
  7312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7314             
       
  7315             /* Get the value from a foo(<param_value>) style call */
       
  7316             if (IN_param_value == NULL)
       
  7317               IN_param_value = function_call_param_iterator.next();
       
  7318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7320             
       
  7321             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7322             {
       
  7323         
       
  7324                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7325                 return return_type_symbol;
       
  7326                 
       
  7327             }
       
  7328             
       
  7329             ERROR;
       
  7330         }
       
  7331         
       
  7332     }/*function_date_to_lint*/
       
  7333     break;
       
  7334 
       
  7335 /****
       
  7336  *DATE_TO_USINT
       
  7337  */
       
  7338     case function_date_to_usint :
       
  7339     {
       
  7340         symbol_c *last_type_symbol = NULL;
       
  7341 
       
  7342         {
       
  7343             identifier_c param_name("IN");
       
  7344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7346             
       
  7347             /* Get the value from a foo(<param_value>) style call */
       
  7348             if (IN_param_value == NULL)
       
  7349               IN_param_value = function_call_param_iterator.next();
       
  7350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7352             
       
  7353             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7354             {
       
  7355         
       
  7356                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7357                 return return_type_symbol;
       
  7358                 
       
  7359             }
       
  7360             
       
  7361             ERROR;
       
  7362         }
       
  7363         
       
  7364     }/*function_date_to_usint*/
       
  7365     break;
       
  7366 
       
  7367 /****
       
  7368  *DATE_TO_UINT
       
  7369  */
       
  7370     case function_date_to_uint :
       
  7371     {
       
  7372         symbol_c *last_type_symbol = NULL;
       
  7373 
       
  7374         {
       
  7375             identifier_c param_name("IN");
       
  7376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7378             
       
  7379             /* Get the value from a foo(<param_value>) style call */
       
  7380             if (IN_param_value == NULL)
       
  7381               IN_param_value = function_call_param_iterator.next();
       
  7382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7384             
       
  7385             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7386             {
       
  7387         
       
  7388                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7389                 return return_type_symbol;
       
  7390                 
       
  7391             }
       
  7392             
       
  7393             ERROR;
       
  7394         }
       
  7395         
       
  7396     }/*function_date_to_uint*/
       
  7397     break;
       
  7398 
       
  7399 /****
       
  7400  *DATE_TO_UDINT
       
  7401  */
       
  7402     case function_date_to_udint :
       
  7403     {
       
  7404         symbol_c *last_type_symbol = NULL;
       
  7405 
       
  7406         {
       
  7407             identifier_c param_name("IN");
       
  7408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7410             
       
  7411             /* Get the value from a foo(<param_value>) style call */
       
  7412             if (IN_param_value == NULL)
       
  7413               IN_param_value = function_call_param_iterator.next();
       
  7414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7416             
       
  7417             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7418             {
       
  7419         
       
  7420                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7421                 return return_type_symbol;
       
  7422                 
       
  7423             }
       
  7424             
       
  7425             ERROR;
       
  7426         }
       
  7427         
       
  7428     }/*function_date_to_udint*/
       
  7429     break;
       
  7430 
       
  7431 /****
       
  7432  *DATE_TO_ULINT
       
  7433  */
       
  7434     case function_date_to_ulint :
       
  7435     {
       
  7436         symbol_c *last_type_symbol = NULL;
       
  7437 
       
  7438         {
       
  7439             identifier_c param_name("IN");
       
  7440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7448             
       
  7449             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7450             {
       
  7451         
       
  7452                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7453                 return return_type_symbol;
       
  7454                 
       
  7455             }
       
  7456             
       
  7457             ERROR;
       
  7458         }
       
  7459         
       
  7460     }/*function_date_to_ulint*/
       
  7461     break;
       
  7462 
       
  7463 /****
       
  7464  *DATE_TO_REAL
       
  7465  */
       
  7466     case function_date_to_real :
       
  7467     {
       
  7468         symbol_c *last_type_symbol = NULL;
       
  7469 
       
  7470         {
       
  7471             identifier_c param_name("IN");
       
  7472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7474             
       
  7475             /* Get the value from a foo(<param_value>) style call */
       
  7476             if (IN_param_value == NULL)
       
  7477               IN_param_value = function_call_param_iterator.next();
       
  7478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7480             
       
  7481             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7482             {
       
  7483         
       
  7484                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7485                 return return_type_symbol;
       
  7486                 
       
  7487             }
       
  7488             
       
  7489             ERROR;
       
  7490         }
       
  7491         
       
  7492     }/*function_date_to_real*/
       
  7493     break;
       
  7494 
       
  7495 /****
       
  7496  *DATE_TO_LREAL
       
  7497  */
       
  7498     case function_date_to_lreal :
       
  7499     {
       
  7500         symbol_c *last_type_symbol = NULL;
       
  7501 
       
  7502         {
       
  7503             identifier_c param_name("IN");
       
  7504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7506             
       
  7507             /* Get the value from a foo(<param_value>) style call */
       
  7508             if (IN_param_value == NULL)
       
  7509               IN_param_value = function_call_param_iterator.next();
       
  7510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7512             
       
  7513             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7514             {
       
  7515         
       
  7516                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7517                 return return_type_symbol;
       
  7518                 
       
  7519             }
       
  7520             
       
  7521             ERROR;
       
  7522         }
       
  7523         
       
  7524     }/*function_date_to_lreal*/
       
  7525     break;
       
  7526 
       
  7527 /****
       
  7528  *DATE_TO_STRING
       
  7529  */
       
  7530     case function_date_to_string :
       
  7531     {
       
  7532         symbol_c *last_type_symbol = NULL;
       
  7533 
       
  7534         {
       
  7535             identifier_c param_name("IN");
       
  7536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7538             
       
  7539             /* Get the value from a foo(<param_value>) style call */
       
  7540             if (IN_param_value == NULL)
       
  7541               IN_param_value = function_call_param_iterator.next();
       
  7542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7544             
       
  7545             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7546             {
       
  7547         
       
  7548                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7549                 return return_type_symbol;
       
  7550                 
       
  7551             }
       
  7552             
       
  7553             ERROR;
       
  7554         }
       
  7555         
       
  7556     }/*function_date_to_string*/
       
  7557     break;
       
  7558 
       
  7559 /****
       
  7560  *DATE_TO_BYTE
       
  7561  */
       
  7562     case function_date_to_byte :
       
  7563     {
       
  7564         symbol_c *last_type_symbol = NULL;
       
  7565 
       
  7566         {
       
  7567             identifier_c param_name("IN");
       
  7568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7570             
       
  7571             /* Get the value from a foo(<param_value>) style call */
       
  7572             if (IN_param_value == NULL)
       
  7573               IN_param_value = function_call_param_iterator.next();
       
  7574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7576             
       
  7577             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7578             {
       
  7579         
       
  7580                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7581                 return return_type_symbol;
       
  7582                 
       
  7583             }
       
  7584             
       
  7585             ERROR;
       
  7586         }
       
  7587         
       
  7588     }/*function_date_to_byte*/
       
  7589     break;
       
  7590 
       
  7591 /****
       
  7592  *DATE_TO_WORD
       
  7593  */
       
  7594     case function_date_to_word :
       
  7595     {
       
  7596         symbol_c *last_type_symbol = NULL;
       
  7597 
       
  7598         {
       
  7599             identifier_c param_name("IN");
       
  7600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7602             
       
  7603             /* Get the value from a foo(<param_value>) style call */
       
  7604             if (IN_param_value == NULL)
       
  7605               IN_param_value = function_call_param_iterator.next();
       
  7606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7608             
       
  7609             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7610             {
       
  7611         
       
  7612                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7613                 return return_type_symbol;
       
  7614                 
       
  7615             }
       
  7616             
       
  7617             ERROR;
       
  7618         }
       
  7619         
       
  7620     }/*function_date_to_word*/
       
  7621     break;
       
  7622 
       
  7623 /****
       
  7624  *DATE_TO_DWORD
       
  7625  */
       
  7626     case function_date_to_dword :
       
  7627     {
       
  7628         symbol_c *last_type_symbol = NULL;
       
  7629 
       
  7630         {
       
  7631             identifier_c param_name("IN");
       
  7632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7634             
       
  7635             /* Get the value from a foo(<param_value>) style call */
       
  7636             if (IN_param_value == NULL)
       
  7637               IN_param_value = function_call_param_iterator.next();
       
  7638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7640             
       
  7641             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7642             {
       
  7643         
       
  7644                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7645                 return return_type_symbol;
       
  7646                 
       
  7647             }
       
  7648             
       
  7649             ERROR;
       
  7650         }
       
  7651         
       
  7652     }/*function_date_to_dword*/
       
  7653     break;
       
  7654 
       
  7655 /****
       
  7656  *DATE_TO_LWORD
       
  7657  */
       
  7658     case function_date_to_lword :
       
  7659     {
       
  7660         symbol_c *last_type_symbol = NULL;
       
  7661 
       
  7662         {
       
  7663             identifier_c param_name("IN");
       
  7664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7666             
       
  7667             /* Get the value from a foo(<param_value>) style call */
       
  7668             if (IN_param_value == NULL)
       
  7669               IN_param_value = function_call_param_iterator.next();
       
  7670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7672             
       
  7673             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7674             {
       
  7675         
       
  7676                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7677                 return return_type_symbol;
       
  7678                 
       
  7679             }
       
  7680             
       
  7681             ERROR;
       
  7682         }
       
  7683         
       
  7684     }/*function_date_to_lword*/
       
  7685     break;
       
  7686 
       
  7687 /****
       
  7688  *TOD_TO_SINT
       
  7689  */
       
  7690     case function_tod_to_sint :
       
  7691     {
       
  7692         symbol_c *last_type_symbol = NULL;
       
  7693 
       
  7694         {
       
  7695             identifier_c param_name("IN");
       
  7696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7698             
       
  7699             /* Get the value from a foo(<param_value>) style call */
       
  7700             if (IN_param_value == NULL)
       
  7701               IN_param_value = function_call_param_iterator.next();
       
  7702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7704             
       
  7705             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7706             {
       
  7707         
       
  7708                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7709                 return return_type_symbol;
       
  7710                 
       
  7711             }
       
  7712             
       
  7713             ERROR;
       
  7714         }
       
  7715         
       
  7716     }/*function_tod_to_sint*/
       
  7717     break;
       
  7718 
       
  7719 /****
       
  7720  *TOD_TO_INT
       
  7721  */
       
  7722     case function_tod_to_int :
       
  7723     {
       
  7724         symbol_c *last_type_symbol = NULL;
       
  7725 
       
  7726         {
       
  7727             identifier_c param_name("IN");
       
  7728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7736             
       
  7737             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7738             {
       
  7739         
       
  7740                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7741                 return return_type_symbol;
       
  7742                 
       
  7743             }
       
  7744             
       
  7745             ERROR;
       
  7746         }
       
  7747         
       
  7748     }/*function_tod_to_int*/
       
  7749     break;
       
  7750 
       
  7751 /****
       
  7752  *TOD_TO_DINT
       
  7753  */
       
  7754     case function_tod_to_dint :
       
  7755     {
       
  7756         symbol_c *last_type_symbol = NULL;
       
  7757 
       
  7758         {
       
  7759             identifier_c param_name("IN");
       
  7760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7762             
       
  7763             /* Get the value from a foo(<param_value>) style call */
       
  7764             if (IN_param_value == NULL)
       
  7765               IN_param_value = function_call_param_iterator.next();
       
  7766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7768             
       
  7769             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7770             {
       
  7771         
       
  7772                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7773                 return return_type_symbol;
       
  7774                 
       
  7775             }
       
  7776             
       
  7777             ERROR;
       
  7778         }
       
  7779         
       
  7780     }/*function_tod_to_dint*/
       
  7781     break;
       
  7782 
       
  7783 /****
       
  7784  *TOD_TO_LINT
       
  7785  */
       
  7786     case function_tod_to_lint :
       
  7787     {
       
  7788         symbol_c *last_type_symbol = NULL;
       
  7789 
       
  7790         {
       
  7791             identifier_c param_name("IN");
       
  7792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7794             
       
  7795             /* Get the value from a foo(<param_value>) style call */
       
  7796             if (IN_param_value == NULL)
       
  7797               IN_param_value = function_call_param_iterator.next();
       
  7798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7800             
       
  7801             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7802             {
       
  7803         
       
  7804                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7805                 return return_type_symbol;
       
  7806                 
       
  7807             }
       
  7808             
       
  7809             ERROR;
       
  7810         }
       
  7811         
       
  7812     }/*function_tod_to_lint*/
       
  7813     break;
       
  7814 
       
  7815 /****
       
  7816  *TOD_TO_USINT
       
  7817  */
       
  7818     case function_tod_to_usint :
       
  7819     {
       
  7820         symbol_c *last_type_symbol = NULL;
       
  7821 
       
  7822         {
       
  7823             identifier_c param_name("IN");
       
  7824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7826             
       
  7827             /* Get the value from a foo(<param_value>) style call */
       
  7828             if (IN_param_value == NULL)
       
  7829               IN_param_value = function_call_param_iterator.next();
       
  7830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7832             
       
  7833             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7834             {
       
  7835         
       
  7836                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7837                 return return_type_symbol;
       
  7838                 
       
  7839             }
       
  7840             
       
  7841             ERROR;
       
  7842         }
       
  7843         
       
  7844     }/*function_tod_to_usint*/
       
  7845     break;
       
  7846 
       
  7847 /****
       
  7848  *TOD_TO_UINT
       
  7849  */
       
  7850     case function_tod_to_uint :
       
  7851     {
       
  7852         symbol_c *last_type_symbol = NULL;
       
  7853 
       
  7854         {
       
  7855             identifier_c param_name("IN");
       
  7856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7858             
       
  7859             /* Get the value from a foo(<param_value>) style call */
       
  7860             if (IN_param_value == NULL)
       
  7861               IN_param_value = function_call_param_iterator.next();
       
  7862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7864             
       
  7865             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7866             {
       
  7867         
       
  7868                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7869                 return return_type_symbol;
       
  7870                 
       
  7871             }
       
  7872             
       
  7873             ERROR;
       
  7874         }
       
  7875         
       
  7876     }/*function_tod_to_uint*/
       
  7877     break;
       
  7878 
       
  7879 /****
       
  7880  *TOD_TO_UDINT
       
  7881  */
       
  7882     case function_tod_to_udint :
       
  7883     {
       
  7884         symbol_c *last_type_symbol = NULL;
       
  7885 
       
  7886         {
       
  7887             identifier_c param_name("IN");
       
  7888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7890             
       
  7891             /* Get the value from a foo(<param_value>) style call */
       
  7892             if (IN_param_value == NULL)
       
  7893               IN_param_value = function_call_param_iterator.next();
       
  7894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7896             
       
  7897             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7898             {
       
  7899         
       
  7900                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7901                 return return_type_symbol;
       
  7902                 
       
  7903             }
       
  7904             
       
  7905             ERROR;
       
  7906         }
       
  7907         
       
  7908     }/*function_tod_to_udint*/
       
  7909     break;
       
  7910 
       
  7911 /****
       
  7912  *TOD_TO_ULINT
       
  7913  */
       
  7914     case function_tod_to_ulint :
       
  7915     {
       
  7916         symbol_c *last_type_symbol = NULL;
       
  7917 
       
  7918         {
       
  7919             identifier_c param_name("IN");
       
  7920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7922             
       
  7923             /* Get the value from a foo(<param_value>) style call */
       
  7924             if (IN_param_value == NULL)
       
  7925               IN_param_value = function_call_param_iterator.next();
       
  7926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7928             
       
  7929             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7930             {
       
  7931         
       
  7932                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7933                 return return_type_symbol;
       
  7934                 
       
  7935             }
       
  7936             
       
  7937             ERROR;
       
  7938         }
       
  7939         
       
  7940     }/*function_tod_to_ulint*/
       
  7941     break;
       
  7942 
       
  7943 /****
       
  7944  *TOD_TO_REAL
       
  7945  */
       
  7946     case function_tod_to_real :
       
  7947     {
       
  7948         symbol_c *last_type_symbol = NULL;
       
  7949 
       
  7950         {
       
  7951             identifier_c param_name("IN");
       
  7952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7954             
       
  7955             /* Get the value from a foo(<param_value>) style call */
       
  7956             if (IN_param_value == NULL)
       
  7957               IN_param_value = function_call_param_iterator.next();
       
  7958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7960             
       
  7961             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7962             {
       
  7963         
       
  7964                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7965                 return return_type_symbol;
       
  7966                 
       
  7967             }
       
  7968             
       
  7969             ERROR;
       
  7970         }
       
  7971         
       
  7972     }/*function_tod_to_real*/
       
  7973     break;
       
  7974 
       
  7975 /****
       
  7976  *TOD_TO_LREAL
       
  7977  */
       
  7978     case function_tod_to_lreal :
       
  7979     {
       
  7980         symbol_c *last_type_symbol = NULL;
       
  7981 
       
  7982         {
       
  7983             identifier_c param_name("IN");
       
  7984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7986             
       
  7987             /* Get the value from a foo(<param_value>) style call */
       
  7988             if (IN_param_value == NULL)
       
  7989               IN_param_value = function_call_param_iterator.next();
       
  7990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7992             
       
  7993             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7994             {
       
  7995         
       
  7996                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7997                 return return_type_symbol;
       
  7998                 
       
  7999             }
       
  8000             
       
  8001             ERROR;
       
  8002         }
       
  8003         
       
  8004     }/*function_tod_to_lreal*/
       
  8005     break;
       
  8006 
       
  8007 /****
       
  8008  *TOD_TO_STRING
       
  8009  */
       
  8010     case function_tod_to_string :
       
  8011     {
       
  8012         symbol_c *last_type_symbol = NULL;
       
  8013 
       
  8014         {
       
  8015             identifier_c param_name("IN");
       
  8016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8024             
       
  8025             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8026             {
       
  8027         
       
  8028                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8029                 return return_type_symbol;
       
  8030                 
       
  8031             }
       
  8032             
       
  8033             ERROR;
       
  8034         }
       
  8035         
       
  8036     }/*function_tod_to_string*/
       
  8037     break;
       
  8038 
       
  8039 /****
       
  8040  *TOD_TO_BYTE
       
  8041  */
       
  8042     case function_tod_to_byte :
       
  8043     {
       
  8044         symbol_c *last_type_symbol = NULL;
       
  8045 
       
  8046         {
       
  8047             identifier_c param_name("IN");
       
  8048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8050             
       
  8051             /* Get the value from a foo(<param_value>) style call */
       
  8052             if (IN_param_value == NULL)
       
  8053               IN_param_value = function_call_param_iterator.next();
       
  8054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8056             
       
  8057             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8058             {
       
  8059         
       
  8060                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8061                 return return_type_symbol;
       
  8062                 
       
  8063             }
       
  8064             
       
  8065             ERROR;
       
  8066         }
       
  8067         
       
  8068     }/*function_tod_to_byte*/
       
  8069     break;
       
  8070 
       
  8071 /****
       
  8072  *TOD_TO_WORD
       
  8073  */
       
  8074     case function_tod_to_word :
       
  8075     {
       
  8076         symbol_c *last_type_symbol = NULL;
       
  8077 
       
  8078         {
       
  8079             identifier_c param_name("IN");
       
  8080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8082             
       
  8083             /* Get the value from a foo(<param_value>) style call */
       
  8084             if (IN_param_value == NULL)
       
  8085               IN_param_value = function_call_param_iterator.next();
       
  8086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8088             
       
  8089             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8090             {
       
  8091         
       
  8092                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8093                 return return_type_symbol;
       
  8094                 
       
  8095             }
       
  8096             
       
  8097             ERROR;
       
  8098         }
       
  8099         
       
  8100     }/*function_tod_to_word*/
       
  8101     break;
       
  8102 
       
  8103 /****
       
  8104  *TOD_TO_DWORD
       
  8105  */
       
  8106     case function_tod_to_dword :
       
  8107     {
       
  8108         symbol_c *last_type_symbol = NULL;
       
  8109 
       
  8110         {
       
  8111             identifier_c param_name("IN");
       
  8112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8114             
       
  8115             /* Get the value from a foo(<param_value>) style call */
       
  8116             if (IN_param_value == NULL)
       
  8117               IN_param_value = function_call_param_iterator.next();
       
  8118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8120             
       
  8121             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8122             {
       
  8123         
       
  8124                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8125                 return return_type_symbol;
       
  8126                 
       
  8127             }
       
  8128             
       
  8129             ERROR;
       
  8130         }
       
  8131         
       
  8132     }/*function_tod_to_dword*/
       
  8133     break;
       
  8134 
       
  8135 /****
       
  8136  *TOD_TO_LWORD
       
  8137  */
       
  8138     case function_tod_to_lword :
       
  8139     {
       
  8140         symbol_c *last_type_symbol = NULL;
       
  8141 
       
  8142         {
       
  8143             identifier_c param_name("IN");
       
  8144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8146             
       
  8147             /* Get the value from a foo(<param_value>) style call */
       
  8148             if (IN_param_value == NULL)
       
  8149               IN_param_value = function_call_param_iterator.next();
       
  8150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8152             
       
  8153             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8154             {
       
  8155         
       
  8156                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8157                 return return_type_symbol;
       
  8158                 
       
  8159             }
       
  8160             
       
  8161             ERROR;
       
  8162         }
       
  8163         
       
  8164     }/*function_tod_to_lword*/
       
  8165     break;
       
  8166 
       
  8167 /****
       
  8168  *DT_TO_SINT
       
  8169  */
       
  8170     case function_dt_to_sint :
       
  8171     {
       
  8172         symbol_c *last_type_symbol = NULL;
       
  8173 
       
  8174         {
       
  8175             identifier_c param_name("IN");
       
  8176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8178             
       
  8179             /* Get the value from a foo(<param_value>) style call */
       
  8180             if (IN_param_value == NULL)
       
  8181               IN_param_value = function_call_param_iterator.next();
       
  8182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8184             
       
  8185             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8186             {
       
  8187         
       
  8188                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8189                 return return_type_symbol;
       
  8190                 
       
  8191             }
       
  8192             
       
  8193             ERROR;
       
  8194         }
       
  8195         
       
  8196     }/*function_dt_to_sint*/
       
  8197     break;
       
  8198 
       
  8199 /****
       
  8200  *DT_TO_INT
       
  8201  */
       
  8202     case function_dt_to_int :
       
  8203     {
       
  8204         symbol_c *last_type_symbol = NULL;
       
  8205 
       
  8206         {
       
  8207             identifier_c param_name("IN");
       
  8208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8210             
       
  8211             /* Get the value from a foo(<param_value>) style call */
       
  8212             if (IN_param_value == NULL)
       
  8213               IN_param_value = function_call_param_iterator.next();
       
  8214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8216             
       
  8217             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8218             {
       
  8219         
       
  8220                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8221                 return return_type_symbol;
       
  8222                 
       
  8223             }
       
  8224             
       
  8225             ERROR;
       
  8226         }
       
  8227         
       
  8228     }/*function_dt_to_int*/
       
  8229     break;
       
  8230 
       
  8231 /****
       
  8232  *DT_TO_DINT
       
  8233  */
       
  8234     case function_dt_to_dint :
       
  8235     {
       
  8236         symbol_c *last_type_symbol = NULL;
       
  8237 
       
  8238         {
       
  8239             identifier_c param_name("IN");
       
  8240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8242             
       
  8243             /* Get the value from a foo(<param_value>) style call */
       
  8244             if (IN_param_value == NULL)
       
  8245               IN_param_value = function_call_param_iterator.next();
       
  8246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8248             
       
  8249             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8250             {
       
  8251         
       
  8252                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8253                 return return_type_symbol;
       
  8254                 
       
  8255             }
       
  8256             
       
  8257             ERROR;
       
  8258         }
       
  8259         
       
  8260     }/*function_dt_to_dint*/
       
  8261     break;
       
  8262 
       
  8263 /****
       
  8264  *DT_TO_LINT
       
  8265  */
       
  8266     case function_dt_to_lint :
       
  8267     {
       
  8268         symbol_c *last_type_symbol = NULL;
       
  8269 
       
  8270         {
       
  8271             identifier_c param_name("IN");
       
  8272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8274             
       
  8275             /* Get the value from a foo(<param_value>) style call */
       
  8276             if (IN_param_value == NULL)
       
  8277               IN_param_value = function_call_param_iterator.next();
       
  8278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8280             
       
  8281             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8282             {
       
  8283         
       
  8284                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8285                 return return_type_symbol;
       
  8286                 
       
  8287             }
       
  8288             
       
  8289             ERROR;
       
  8290         }
       
  8291         
       
  8292     }/*function_dt_to_lint*/
       
  8293     break;
       
  8294 
       
  8295 /****
       
  8296  *DT_TO_USINT
       
  8297  */
       
  8298     case function_dt_to_usint :
       
  8299     {
       
  8300         symbol_c *last_type_symbol = NULL;
       
  8301 
       
  8302         {
       
  8303             identifier_c param_name("IN");
       
  8304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8312             
       
  8313             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8314             {
       
  8315         
       
  8316                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8317                 return return_type_symbol;
       
  8318                 
       
  8319             }
       
  8320             
       
  8321             ERROR;
       
  8322         }
       
  8323         
       
  8324     }/*function_dt_to_usint*/
       
  8325     break;
       
  8326 
       
  8327 /****
       
  8328  *DT_TO_UINT
       
  8329  */
       
  8330     case function_dt_to_uint :
       
  8331     {
       
  8332         symbol_c *last_type_symbol = NULL;
       
  8333 
       
  8334         {
       
  8335             identifier_c param_name("IN");
       
  8336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8338             
       
  8339             /* Get the value from a foo(<param_value>) style call */
       
  8340             if (IN_param_value == NULL)
       
  8341               IN_param_value = function_call_param_iterator.next();
       
  8342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8344             
       
  8345             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8346             {
       
  8347         
       
  8348                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8349                 return return_type_symbol;
       
  8350                 
       
  8351             }
       
  8352             
       
  8353             ERROR;
       
  8354         }
       
  8355         
       
  8356     }/*function_dt_to_uint*/
       
  8357     break;
       
  8358 
       
  8359 /****
       
  8360  *DT_TO_UDINT
       
  8361  */
       
  8362     case function_dt_to_udint :
       
  8363     {
       
  8364         symbol_c *last_type_symbol = NULL;
       
  8365 
       
  8366         {
       
  8367             identifier_c param_name("IN");
       
  8368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8370             
       
  8371             /* Get the value from a foo(<param_value>) style call */
       
  8372             if (IN_param_value == NULL)
       
  8373               IN_param_value = function_call_param_iterator.next();
       
  8374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8376             
       
  8377             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8378             {
       
  8379         
       
  8380                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8381                 return return_type_symbol;
       
  8382                 
       
  8383             }
       
  8384             
       
  8385             ERROR;
       
  8386         }
       
  8387         
       
  8388     }/*function_dt_to_udint*/
       
  8389     break;
       
  8390 
       
  8391 /****
       
  8392  *DT_TO_ULINT
       
  8393  */
       
  8394     case function_dt_to_ulint :
       
  8395     {
       
  8396         symbol_c *last_type_symbol = NULL;
       
  8397 
       
  8398         {
       
  8399             identifier_c param_name("IN");
       
  8400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8402             
       
  8403             /* Get the value from a foo(<param_value>) style call */
       
  8404             if (IN_param_value == NULL)
       
  8405               IN_param_value = function_call_param_iterator.next();
       
  8406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8408             
       
  8409             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8410             {
       
  8411         
       
  8412                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8413                 return return_type_symbol;
       
  8414                 
       
  8415             }
       
  8416             
       
  8417             ERROR;
       
  8418         }
       
  8419         
       
  8420     }/*function_dt_to_ulint*/
       
  8421     break;
       
  8422 
       
  8423 /****
       
  8424  *DT_TO_REAL
       
  8425  */
       
  8426     case function_dt_to_real :
       
  8427     {
       
  8428         symbol_c *last_type_symbol = NULL;
       
  8429 
       
  8430         {
       
  8431             identifier_c param_name("IN");
       
  8432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8434             
       
  8435             /* Get the value from a foo(<param_value>) style call */
       
  8436             if (IN_param_value == NULL)
       
  8437               IN_param_value = function_call_param_iterator.next();
       
  8438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8440             
       
  8441             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8442             {
       
  8443         
       
  8444                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8445                 return return_type_symbol;
       
  8446                 
       
  8447             }
       
  8448             
       
  8449             ERROR;
       
  8450         }
       
  8451         
       
  8452     }/*function_dt_to_real*/
       
  8453     break;
       
  8454 
       
  8455 /****
       
  8456  *DT_TO_LREAL
       
  8457  */
       
  8458     case function_dt_to_lreal :
       
  8459     {
       
  8460         symbol_c *last_type_symbol = NULL;
       
  8461 
       
  8462         {
       
  8463             identifier_c param_name("IN");
       
  8464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8466             
       
  8467             /* Get the value from a foo(<param_value>) style call */
       
  8468             if (IN_param_value == NULL)
       
  8469               IN_param_value = function_call_param_iterator.next();
       
  8470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8472             
       
  8473             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8474             {
       
  8475         
       
  8476                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8477                 return return_type_symbol;
       
  8478                 
       
  8479             }
       
  8480             
       
  8481             ERROR;
       
  8482         }
       
  8483         
       
  8484     }/*function_dt_to_lreal*/
       
  8485     break;
       
  8486 
       
  8487 /****
       
  8488  *DT_TO_STRING
       
  8489  */
       
  8490     case function_dt_to_string :
       
  8491     {
       
  8492         symbol_c *last_type_symbol = NULL;
       
  8493 
       
  8494         {
       
  8495             identifier_c param_name("IN");
       
  8496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8498             
       
  8499             /* Get the value from a foo(<param_value>) style call */
       
  8500             if (IN_param_value == NULL)
       
  8501               IN_param_value = function_call_param_iterator.next();
       
  8502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8504             
       
  8505             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8506             {
       
  8507         
       
  8508                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8509                 return return_type_symbol;
       
  8510                 
       
  8511             }
       
  8512             
       
  8513             ERROR;
       
  8514         }
       
  8515         
       
  8516     }/*function_dt_to_string*/
       
  8517     break;
       
  8518 
       
  8519 /****
       
  8520  *DT_TO_BYTE
       
  8521  */
       
  8522     case function_dt_to_byte :
       
  8523     {
       
  8524         symbol_c *last_type_symbol = NULL;
       
  8525 
       
  8526         {
       
  8527             identifier_c param_name("IN");
       
  8528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8530             
       
  8531             /* Get the value from a foo(<param_value>) style call */
       
  8532             if (IN_param_value == NULL)
       
  8533               IN_param_value = function_call_param_iterator.next();
       
  8534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8536             
       
  8537             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8538             {
       
  8539         
       
  8540                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8541                 return return_type_symbol;
       
  8542                 
       
  8543             }
       
  8544             
       
  8545             ERROR;
       
  8546         }
       
  8547         
       
  8548     }/*function_dt_to_byte*/
       
  8549     break;
       
  8550 
       
  8551 /****
       
  8552  *DT_TO_WORD
       
  8553  */
       
  8554     case function_dt_to_word :
       
  8555     {
       
  8556         symbol_c *last_type_symbol = NULL;
       
  8557 
       
  8558         {
       
  8559             identifier_c param_name("IN");
       
  8560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8562             
       
  8563             /* Get the value from a foo(<param_value>) style call */
       
  8564             if (IN_param_value == NULL)
       
  8565               IN_param_value = function_call_param_iterator.next();
       
  8566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8568             
       
  8569             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8570             {
       
  8571         
       
  8572                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8573                 return return_type_symbol;
       
  8574                 
       
  8575             }
       
  8576             
       
  8577             ERROR;
       
  8578         }
       
  8579         
       
  8580     }/*function_dt_to_word*/
       
  8581     break;
       
  8582 
       
  8583 /****
       
  8584  *DT_TO_DWORD
       
  8585  */
       
  8586     case function_dt_to_dword :
       
  8587     {
       
  8588         symbol_c *last_type_symbol = NULL;
       
  8589 
       
  8590         {
       
  8591             identifier_c param_name("IN");
       
  8592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8600             
       
  8601             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8602             {
       
  8603         
       
  8604                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8605                 return return_type_symbol;
       
  8606                 
       
  8607             }
       
  8608             
       
  8609             ERROR;
       
  8610         }
       
  8611         
       
  8612     }/*function_dt_to_dword*/
       
  8613     break;
       
  8614 
       
  8615 /****
       
  8616  *DT_TO_LWORD
       
  8617  */
       
  8618     case function_dt_to_lword :
       
  8619     {
       
  8620         symbol_c *last_type_symbol = NULL;
       
  8621 
       
  8622         {
       
  8623             identifier_c param_name("IN");
       
  8624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8626             
       
  8627             /* Get the value from a foo(<param_value>) style call */
       
  8628             if (IN_param_value == NULL)
       
  8629               IN_param_value = function_call_param_iterator.next();
       
  8630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8632             
       
  8633             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8634             {
       
  8635         
       
  8636                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8637                 return return_type_symbol;
       
  8638                 
       
  8639             }
       
  8640             
       
  8641             ERROR;
       
  8642         }
       
  8643         
       
  8644     }/*function_dt_to_lword*/
       
  8645     break;
       
  8646 
       
  8647 /****
       
  8648  *STRING_TO_BOOL
       
  8649  */
       
  8650     case function_string_to_bool :
       
  8651     {
       
  8652         symbol_c *last_type_symbol = NULL;
       
  8653 
       
  8654         {
       
  8655             identifier_c param_name("IN");
       
  8656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8658             
       
  8659             /* Get the value from a foo(<param_value>) style call */
       
  8660             if (IN_param_value == NULL)
       
  8661               IN_param_value = function_call_param_iterator.next();
       
  8662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8664             
       
  8665             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8666             {
       
  8667         
       
  8668                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8669                 return return_type_symbol;
       
  8670                 
       
  8671             }
       
  8672             
       
  8673             ERROR;
       
  8674         }
       
  8675         
       
  8676     }/*function_string_to_bool*/
       
  8677     break;
       
  8678 
       
  8679 /****
       
  8680  *STRING_TO_SINT
       
  8681  */
       
  8682     case function_string_to_sint :
       
  8683     {
       
  8684         symbol_c *last_type_symbol = NULL;
       
  8685 
       
  8686         {
       
  8687             identifier_c param_name("IN");
       
  8688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8690             
       
  8691             /* Get the value from a foo(<param_value>) style call */
       
  8692             if (IN_param_value == NULL)
       
  8693               IN_param_value = function_call_param_iterator.next();
       
  8694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8696             
       
  8697             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8698             {
       
  8699         
       
  8700                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8701                 return return_type_symbol;
       
  8702                 
       
  8703             }
       
  8704             
       
  8705             ERROR;
       
  8706         }
       
  8707         
       
  8708     }/*function_string_to_sint*/
       
  8709     break;
       
  8710 
       
  8711 /****
       
  8712  *STRING_TO_INT
       
  8713  */
       
  8714     case function_string_to_int :
       
  8715     {
       
  8716         symbol_c *last_type_symbol = NULL;
       
  8717 
       
  8718         {
       
  8719             identifier_c param_name("IN");
       
  8720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8722             
       
  8723             /* Get the value from a foo(<param_value>) style call */
       
  8724             if (IN_param_value == NULL)
       
  8725               IN_param_value = function_call_param_iterator.next();
       
  8726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8728             
       
  8729             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8730             {
       
  8731         
       
  8732                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8733                 return return_type_symbol;
       
  8734                 
       
  8735             }
       
  8736             
       
  8737             ERROR;
       
  8738         }
       
  8739         
       
  8740     }/*function_string_to_int*/
       
  8741     break;
       
  8742 
       
  8743 /****
       
  8744  *STRING_TO_DINT
       
  8745  */
       
  8746     case function_string_to_dint :
       
  8747     {
       
  8748         symbol_c *last_type_symbol = NULL;
       
  8749 
       
  8750         {
       
  8751             identifier_c param_name("IN");
       
  8752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8754             
       
  8755             /* Get the value from a foo(<param_value>) style call */
       
  8756             if (IN_param_value == NULL)
       
  8757               IN_param_value = function_call_param_iterator.next();
       
  8758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8760             
       
  8761             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8762             {
       
  8763         
       
  8764                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8765                 return return_type_symbol;
       
  8766                 
       
  8767             }
       
  8768             
       
  8769             ERROR;
       
  8770         }
       
  8771         
       
  8772     }/*function_string_to_dint*/
       
  8773     break;
       
  8774 
       
  8775 /****
       
  8776  *STRING_TO_LINT
       
  8777  */
       
  8778     case function_string_to_lint :
       
  8779     {
       
  8780         symbol_c *last_type_symbol = NULL;
       
  8781 
       
  8782         {
       
  8783             identifier_c param_name("IN");
       
  8784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8786             
       
  8787             /* Get the value from a foo(<param_value>) style call */
       
  8788             if (IN_param_value == NULL)
       
  8789               IN_param_value = function_call_param_iterator.next();
       
  8790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8792             
       
  8793             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8794             {
       
  8795         
       
  8796                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8797                 return return_type_symbol;
       
  8798                 
       
  8799             }
       
  8800             
       
  8801             ERROR;
       
  8802         }
       
  8803         
       
  8804     }/*function_string_to_lint*/
       
  8805     break;
       
  8806 
       
  8807 /****
       
  8808  *STRING_TO_USINT
       
  8809  */
       
  8810     case function_string_to_usint :
       
  8811     {
       
  8812         symbol_c *last_type_symbol = NULL;
       
  8813 
       
  8814         {
       
  8815             identifier_c param_name("IN");
       
  8816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8818             
       
  8819             /* Get the value from a foo(<param_value>) style call */
       
  8820             if (IN_param_value == NULL)
       
  8821               IN_param_value = function_call_param_iterator.next();
       
  8822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8824             
       
  8825             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8826             {
       
  8827         
       
  8828                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8829                 return return_type_symbol;
       
  8830                 
       
  8831             }
       
  8832             
       
  8833             ERROR;
       
  8834         }
       
  8835         
       
  8836     }/*function_string_to_usint*/
       
  8837     break;
       
  8838 
       
  8839 /****
       
  8840  *STRING_TO_UINT
       
  8841  */
       
  8842     case function_string_to_uint :
       
  8843     {
       
  8844         symbol_c *last_type_symbol = NULL;
       
  8845 
       
  8846         {
       
  8847             identifier_c param_name("IN");
       
  8848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8850             
       
  8851             /* Get the value from a foo(<param_value>) style call */
       
  8852             if (IN_param_value == NULL)
       
  8853               IN_param_value = function_call_param_iterator.next();
       
  8854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8856             
       
  8857             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8858             {
       
  8859         
       
  8860                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8861                 return return_type_symbol;
       
  8862                 
       
  8863             }
       
  8864             
       
  8865             ERROR;
       
  8866         }
       
  8867         
       
  8868     }/*function_string_to_uint*/
       
  8869     break;
       
  8870 
       
  8871 /****
       
  8872  *STRING_TO_UDINT
       
  8873  */
       
  8874     case function_string_to_udint :
       
  8875     {
       
  8876         symbol_c *last_type_symbol = NULL;
       
  8877 
       
  8878         {
       
  8879             identifier_c param_name("IN");
       
  8880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8888             
       
  8889             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8890             {
       
  8891         
       
  8892                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8893                 return return_type_symbol;
       
  8894                 
       
  8895             }
       
  8896             
       
  8897             ERROR;
       
  8898         }
       
  8899         
       
  8900     }/*function_string_to_udint*/
       
  8901     break;
       
  8902 
       
  8903 /****
       
  8904  *STRING_TO_ULINT
       
  8905  */
       
  8906     case function_string_to_ulint :
       
  8907     {
       
  8908         symbol_c *last_type_symbol = NULL;
       
  8909 
       
  8910         {
       
  8911             identifier_c param_name("IN");
       
  8912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8914             
       
  8915             /* Get the value from a foo(<param_value>) style call */
       
  8916             if (IN_param_value == NULL)
       
  8917               IN_param_value = function_call_param_iterator.next();
       
  8918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8920             
       
  8921             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8922             {
       
  8923         
       
  8924                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8925                 return return_type_symbol;
       
  8926                 
       
  8927             }
       
  8928             
       
  8929             ERROR;
       
  8930         }
       
  8931         
       
  8932     }/*function_string_to_ulint*/
       
  8933     break;
       
  8934 
       
  8935 /****
       
  8936  *STRING_TO_REAL
       
  8937  */
       
  8938     case function_string_to_real :
       
  8939     {
       
  8940         symbol_c *last_type_symbol = NULL;
       
  8941 
       
  8942         {
       
  8943             identifier_c param_name("IN");
       
  8944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8946             
       
  8947             /* Get the value from a foo(<param_value>) style call */
       
  8948             if (IN_param_value == NULL)
       
  8949               IN_param_value = function_call_param_iterator.next();
       
  8950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8952             
       
  8953             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8954             {
       
  8955         
       
  8956                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8957                 return return_type_symbol;
       
  8958                 
       
  8959             }
       
  8960             
       
  8961             ERROR;
       
  8962         }
       
  8963         
       
  8964     }/*function_string_to_real*/
       
  8965     break;
       
  8966 
       
  8967 /****
       
  8968  *STRING_TO_LREAL
       
  8969  */
       
  8970     case function_string_to_lreal :
       
  8971     {
       
  8972         symbol_c *last_type_symbol = NULL;
       
  8973 
       
  8974         {
       
  8975             identifier_c param_name("IN");
       
  8976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8978             
       
  8979             /* Get the value from a foo(<param_value>) style call */
       
  8980             if (IN_param_value == NULL)
       
  8981               IN_param_value = function_call_param_iterator.next();
       
  8982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8984             
       
  8985             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8986             {
       
  8987         
       
  8988                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8989                 return return_type_symbol;
       
  8990                 
       
  8991             }
       
  8992             
       
  8993             ERROR;
       
  8994         }
       
  8995         
       
  8996     }/*function_string_to_lreal*/
       
  8997     break;
       
  8998 
       
  8999 /****
       
  9000  *STRING_TO_TIME
       
  9001  */
       
  9002     case function_string_to_time :
       
  9003     {
       
  9004         symbol_c *last_type_symbol = NULL;
       
  9005 
       
  9006         {
       
  9007             identifier_c param_name("IN");
       
  9008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9010             
       
  9011             /* Get the value from a foo(<param_value>) style call */
       
  9012             if (IN_param_value == NULL)
       
  9013               IN_param_value = function_call_param_iterator.next();
       
  9014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9016             
       
  9017             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9018             {
       
  9019         
       
  9020                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9021                 return return_type_symbol;
       
  9022                 
       
  9023             }
       
  9024             
       
  9025             ERROR;
       
  9026         }
       
  9027         
       
  9028     }/*function_string_to_time*/
       
  9029     break;
       
  9030 
       
  9031 /****
       
  9032  *STRING_TO_DATE
       
  9033  */
       
  9034     case function_string_to_date :
       
  9035     {
       
  9036         symbol_c *last_type_symbol = NULL;
       
  9037 
       
  9038         {
       
  9039             identifier_c param_name("IN");
       
  9040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9042             
       
  9043             /* Get the value from a foo(<param_value>) style call */
       
  9044             if (IN_param_value == NULL)
       
  9045               IN_param_value = function_call_param_iterator.next();
       
  9046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9048             
       
  9049             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9050             {
       
  9051         
       
  9052                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9053                 return return_type_symbol;
       
  9054                 
       
  9055             }
       
  9056             
       
  9057             ERROR;
       
  9058         }
       
  9059         
       
  9060     }/*function_string_to_date*/
       
  9061     break;
       
  9062 
       
  9063 /****
       
  9064  *STRING_TO_TOD
       
  9065  */
       
  9066     case function_string_to_tod :
       
  9067     {
       
  9068         symbol_c *last_type_symbol = NULL;
       
  9069 
       
  9070         {
       
  9071             identifier_c param_name("IN");
       
  9072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9074             
       
  9075             /* Get the value from a foo(<param_value>) style call */
       
  9076             if (IN_param_value == NULL)
       
  9077               IN_param_value = function_call_param_iterator.next();
       
  9078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9080             
       
  9081             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9082             {
       
  9083         
       
  9084                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9085                 return return_type_symbol;
       
  9086                 
       
  9087             }
       
  9088             
       
  9089             ERROR;
       
  9090         }
       
  9091         
       
  9092     }/*function_string_to_tod*/
       
  9093     break;
       
  9094 
       
  9095 /****
       
  9096  *STRING_TO_DT
       
  9097  */
       
  9098     case function_string_to_dt :
       
  9099     {
       
  9100         symbol_c *last_type_symbol = NULL;
       
  9101 
       
  9102         {
       
  9103             identifier_c param_name("IN");
       
  9104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9106             
       
  9107             /* Get the value from a foo(<param_value>) style call */
       
  9108             if (IN_param_value == NULL)
       
  9109               IN_param_value = function_call_param_iterator.next();
       
  9110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9112             
       
  9113             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9114             {
       
  9115         
       
  9116                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9117                 return return_type_symbol;
       
  9118                 
       
  9119             }
       
  9120             
       
  9121             ERROR;
       
  9122         }
       
  9123         
       
  9124     }/*function_string_to_dt*/
       
  9125     break;
       
  9126 
       
  9127 /****
       
  9128  *STRING_TO_BYTE
       
  9129  */
       
  9130     case function_string_to_byte :
       
  9131     {
       
  9132         symbol_c *last_type_symbol = NULL;
       
  9133 
       
  9134         {
       
  9135             identifier_c param_name("IN");
       
  9136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9138             
       
  9139             /* Get the value from a foo(<param_value>) style call */
       
  9140             if (IN_param_value == NULL)
       
  9141               IN_param_value = function_call_param_iterator.next();
       
  9142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9144             
       
  9145             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9146             {
       
  9147         
       
  9148                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9149                 return return_type_symbol;
       
  9150                 
       
  9151             }
       
  9152             
       
  9153             ERROR;
       
  9154         }
       
  9155         
       
  9156     }/*function_string_to_byte*/
       
  9157     break;
       
  9158 
       
  9159 /****
       
  9160  *STRING_TO_WORD
       
  9161  */
       
  9162     case function_string_to_word :
       
  9163     {
       
  9164         symbol_c *last_type_symbol = NULL;
       
  9165 
       
  9166         {
       
  9167             identifier_c param_name("IN");
       
  9168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9176             
       
  9177             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9178             {
       
  9179         
       
  9180                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9181                 return return_type_symbol;
       
  9182                 
       
  9183             }
       
  9184             
       
  9185             ERROR;
       
  9186         }
       
  9187         
       
  9188     }/*function_string_to_word*/
       
  9189     break;
       
  9190 
       
  9191 /****
       
  9192  *STRING_TO_DWORD
       
  9193  */
       
  9194     case function_string_to_dword :
       
  9195     {
       
  9196         symbol_c *last_type_symbol = NULL;
       
  9197 
       
  9198         {
       
  9199             identifier_c param_name("IN");
       
  9200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9202             
       
  9203             /* Get the value from a foo(<param_value>) style call */
       
  9204             if (IN_param_value == NULL)
       
  9205               IN_param_value = function_call_param_iterator.next();
       
  9206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9208             
       
  9209             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9210             {
       
  9211         
       
  9212                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9213                 return return_type_symbol;
       
  9214                 
       
  9215             }
       
  9216             
       
  9217             ERROR;
       
  9218         }
       
  9219         
       
  9220     }/*function_string_to_dword*/
       
  9221     break;
       
  9222 
       
  9223 /****
       
  9224  *STRING_TO_LWORD
       
  9225  */
       
  9226     case function_string_to_lword :
       
  9227     {
       
  9228         symbol_c *last_type_symbol = NULL;
       
  9229 
       
  9230         {
       
  9231             identifier_c param_name("IN");
       
  9232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9234             
       
  9235             /* Get the value from a foo(<param_value>) style call */
       
  9236             if (IN_param_value == NULL)
       
  9237               IN_param_value = function_call_param_iterator.next();
       
  9238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9240             
       
  9241             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9242             {
       
  9243         
       
  9244                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9245                 return return_type_symbol;
       
  9246                 
       
  9247             }
       
  9248             
       
  9249             ERROR;
       
  9250         }
       
  9251         
       
  9252     }/*function_string_to_lword*/
       
  9253     break;
       
  9254 
       
  9255 /****
       
  9256  *BYTE_TO_BOOL
       
  9257  */
       
  9258     case function_byte_to_bool :
       
  9259     {
       
  9260         symbol_c *last_type_symbol = NULL;
       
  9261 
       
  9262         {
       
  9263             identifier_c param_name("IN");
       
  9264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9266             
       
  9267             /* Get the value from a foo(<param_value>) style call */
       
  9268             if (IN_param_value == NULL)
       
  9269               IN_param_value = function_call_param_iterator.next();
       
  9270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9272             
       
  9273             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9274             {
       
  9275         
       
  9276                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9277                 return return_type_symbol;
       
  9278                 
       
  9279             }
       
  9280             
       
  9281             ERROR;
       
  9282         }
       
  9283         
       
  9284     }/*function_byte_to_bool*/
       
  9285     break;
       
  9286 
       
  9287 /****
       
  9288  *BYTE_TO_SINT
       
  9289  */
       
  9290     case function_byte_to_sint :
       
  9291     {
       
  9292         symbol_c *last_type_symbol = NULL;
       
  9293 
       
  9294         {
       
  9295             identifier_c param_name("IN");
       
  9296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9298             
       
  9299             /* Get the value from a foo(<param_value>) style call */
       
  9300             if (IN_param_value == NULL)
       
  9301               IN_param_value = function_call_param_iterator.next();
       
  9302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9304             
       
  9305             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9306             {
       
  9307         
       
  9308                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9309                 return return_type_symbol;
       
  9310                 
       
  9311             }
       
  9312             
       
  9313             ERROR;
       
  9314         }
       
  9315         
       
  9316     }/*function_byte_to_sint*/
       
  9317     break;
       
  9318 
       
  9319 /****
       
  9320  *BYTE_TO_INT
       
  9321  */
       
  9322     case function_byte_to_int :
       
  9323     {
       
  9324         symbol_c *last_type_symbol = NULL;
       
  9325 
       
  9326         {
       
  9327             identifier_c param_name("IN");
       
  9328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9330             
       
  9331             /* Get the value from a foo(<param_value>) style call */
       
  9332             if (IN_param_value == NULL)
       
  9333               IN_param_value = function_call_param_iterator.next();
       
  9334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9336             
       
  9337             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9338             {
       
  9339         
       
  9340                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9341                 return return_type_symbol;
       
  9342                 
       
  9343             }
       
  9344             
       
  9345             ERROR;
       
  9346         }
       
  9347         
       
  9348     }/*function_byte_to_int*/
       
  9349     break;
       
  9350 
       
  9351 /****
       
  9352  *BYTE_TO_DINT
       
  9353  */
       
  9354     case function_byte_to_dint :
       
  9355     {
       
  9356         symbol_c *last_type_symbol = NULL;
       
  9357 
       
  9358         {
       
  9359             identifier_c param_name("IN");
       
  9360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9362             
       
  9363             /* Get the value from a foo(<param_value>) style call */
       
  9364             if (IN_param_value == NULL)
       
  9365               IN_param_value = function_call_param_iterator.next();
       
  9366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9368             
       
  9369             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9370             {
       
  9371         
       
  9372                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9373                 return return_type_symbol;
       
  9374                 
       
  9375             }
       
  9376             
       
  9377             ERROR;
       
  9378         }
       
  9379         
       
  9380     }/*function_byte_to_dint*/
       
  9381     break;
       
  9382 
       
  9383 /****
       
  9384  *BYTE_TO_LINT
       
  9385  */
       
  9386     case function_byte_to_lint :
       
  9387     {
       
  9388         symbol_c *last_type_symbol = NULL;
       
  9389 
       
  9390         {
       
  9391             identifier_c param_name("IN");
       
  9392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9394             
       
  9395             /* Get the value from a foo(<param_value>) style call */
       
  9396             if (IN_param_value == NULL)
       
  9397               IN_param_value = function_call_param_iterator.next();
       
  9398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9400             
       
  9401             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9402             {
       
  9403         
       
  9404                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9405                 return return_type_symbol;
       
  9406                 
       
  9407             }
       
  9408             
       
  9409             ERROR;
       
  9410         }
       
  9411         
       
  9412     }/*function_byte_to_lint*/
       
  9413     break;
       
  9414 
       
  9415 /****
       
  9416  *BYTE_TO_USINT
       
  9417  */
       
  9418     case function_byte_to_usint :
       
  9419     {
       
  9420         symbol_c *last_type_symbol = NULL;
       
  9421 
       
  9422         {
       
  9423             identifier_c param_name("IN");
       
  9424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9426             
       
  9427             /* Get the value from a foo(<param_value>) style call */
       
  9428             if (IN_param_value == NULL)
       
  9429               IN_param_value = function_call_param_iterator.next();
       
  9430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9432             
       
  9433             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9434             {
       
  9435         
       
  9436                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9437                 return return_type_symbol;
       
  9438                 
       
  9439             }
       
  9440             
       
  9441             ERROR;
       
  9442         }
       
  9443         
       
  9444     }/*function_byte_to_usint*/
       
  9445     break;
       
  9446 
       
  9447 /****
       
  9448  *BYTE_TO_UINT
       
  9449  */
       
  9450     case function_byte_to_uint :
       
  9451     {
       
  9452         symbol_c *last_type_symbol = NULL;
       
  9453 
       
  9454         {
       
  9455             identifier_c param_name("IN");
       
  9456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9464             
       
  9465             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9466             {
       
  9467         
       
  9468                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9469                 return return_type_symbol;
       
  9470                 
       
  9471             }
       
  9472             
       
  9473             ERROR;
       
  9474         }
       
  9475         
       
  9476     }/*function_byte_to_uint*/
       
  9477     break;
       
  9478 
       
  9479 /****
       
  9480  *BYTE_TO_UDINT
       
  9481  */
       
  9482     case function_byte_to_udint :
       
  9483     {
       
  9484         symbol_c *last_type_symbol = NULL;
       
  9485 
       
  9486         {
       
  9487             identifier_c param_name("IN");
       
  9488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9490             
       
  9491             /* Get the value from a foo(<param_value>) style call */
       
  9492             if (IN_param_value == NULL)
       
  9493               IN_param_value = function_call_param_iterator.next();
       
  9494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9496             
       
  9497             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9498             {
       
  9499         
       
  9500                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9501                 return return_type_symbol;
       
  9502                 
       
  9503             }
       
  9504             
       
  9505             ERROR;
       
  9506         }
       
  9507         
       
  9508     }/*function_byte_to_udint*/
       
  9509     break;
       
  9510 
       
  9511 /****
       
  9512  *BYTE_TO_ULINT
       
  9513  */
       
  9514     case function_byte_to_ulint :
       
  9515     {
       
  9516         symbol_c *last_type_symbol = NULL;
       
  9517 
       
  9518         {
       
  9519             identifier_c param_name("IN");
       
  9520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9522             
       
  9523             /* Get the value from a foo(<param_value>) style call */
       
  9524             if (IN_param_value == NULL)
       
  9525               IN_param_value = function_call_param_iterator.next();
       
  9526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9528             
       
  9529             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9530             {
       
  9531         
       
  9532                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9533                 return return_type_symbol;
       
  9534                 
       
  9535             }
       
  9536             
       
  9537             ERROR;
       
  9538         }
       
  9539         
       
  9540     }/*function_byte_to_ulint*/
       
  9541     break;
       
  9542 
       
  9543 /****
       
  9544  *BYTE_TO_REAL
       
  9545  */
       
  9546     case function_byte_to_real :
       
  9547     {
       
  9548         symbol_c *last_type_symbol = NULL;
       
  9549 
       
  9550         {
       
  9551             identifier_c param_name("IN");
       
  9552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9554             
       
  9555             /* Get the value from a foo(<param_value>) style call */
       
  9556             if (IN_param_value == NULL)
       
  9557               IN_param_value = function_call_param_iterator.next();
       
  9558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9560             
       
  9561             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9562             {
       
  9563         
       
  9564                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9565                 return return_type_symbol;
       
  9566                 
       
  9567             }
       
  9568             
       
  9569             ERROR;
       
  9570         }
       
  9571         
       
  9572     }/*function_byte_to_real*/
       
  9573     break;
       
  9574 
       
  9575 /****
       
  9576  *BYTE_TO_LREAL
       
  9577  */
       
  9578     case function_byte_to_lreal :
       
  9579     {
       
  9580         symbol_c *last_type_symbol = NULL;
       
  9581 
       
  9582         {
       
  9583             identifier_c param_name("IN");
       
  9584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9586             
       
  9587             /* Get the value from a foo(<param_value>) style call */
       
  9588             if (IN_param_value == NULL)
       
  9589               IN_param_value = function_call_param_iterator.next();
       
  9590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9592             
       
  9593             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9594             {
       
  9595         
       
  9596                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9597                 return return_type_symbol;
       
  9598                 
       
  9599             }
       
  9600             
       
  9601             ERROR;
       
  9602         }
       
  9603         
       
  9604     }/*function_byte_to_lreal*/
       
  9605     break;
       
  9606 
       
  9607 /****
       
  9608  *BYTE_TO_TIME
       
  9609  */
       
  9610     case function_byte_to_time :
       
  9611     {
       
  9612         symbol_c *last_type_symbol = NULL;
       
  9613 
       
  9614         {
       
  9615             identifier_c param_name("IN");
       
  9616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9618             
       
  9619             /* Get the value from a foo(<param_value>) style call */
       
  9620             if (IN_param_value == NULL)
       
  9621               IN_param_value = function_call_param_iterator.next();
       
  9622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9624             
       
  9625             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9626             {
       
  9627         
       
  9628                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9629                 return return_type_symbol;
       
  9630                 
       
  9631             }
       
  9632             
       
  9633             ERROR;
       
  9634         }
       
  9635         
       
  9636     }/*function_byte_to_time*/
       
  9637     break;
       
  9638 
       
  9639 /****
       
  9640  *BYTE_TO_DATE
       
  9641  */
       
  9642     case function_byte_to_date :
       
  9643     {
       
  9644         symbol_c *last_type_symbol = NULL;
       
  9645 
       
  9646         {
       
  9647             identifier_c param_name("IN");
       
  9648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9650             
       
  9651             /* Get the value from a foo(<param_value>) style call */
       
  9652             if (IN_param_value == NULL)
       
  9653               IN_param_value = function_call_param_iterator.next();
       
  9654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9656             
       
  9657             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9658             {
       
  9659         
       
  9660                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9661                 return return_type_symbol;
       
  9662                 
       
  9663             }
       
  9664             
       
  9665             ERROR;
       
  9666         }
       
  9667         
       
  9668     }/*function_byte_to_date*/
       
  9669     break;
       
  9670 
       
  9671 /****
       
  9672  *BYTE_TO_TOD
       
  9673  */
       
  9674     case function_byte_to_tod :
       
  9675     {
       
  9676         symbol_c *last_type_symbol = NULL;
       
  9677 
       
  9678         {
       
  9679             identifier_c param_name("IN");
       
  9680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9682             
       
  9683             /* Get the value from a foo(<param_value>) style call */
       
  9684             if (IN_param_value == NULL)
       
  9685               IN_param_value = function_call_param_iterator.next();
       
  9686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9688             
       
  9689             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9690             {
       
  9691         
       
  9692                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9693                 return return_type_symbol;
       
  9694                 
       
  9695             }
       
  9696             
       
  9697             ERROR;
       
  9698         }
       
  9699         
       
  9700     }/*function_byte_to_tod*/
       
  9701     break;
       
  9702 
       
  9703 /****
       
  9704  *BYTE_TO_DT
       
  9705  */
       
  9706     case function_byte_to_dt :
       
  9707     {
       
  9708         symbol_c *last_type_symbol = NULL;
       
  9709 
       
  9710         {
       
  9711             identifier_c param_name("IN");
       
  9712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9714             
       
  9715             /* Get the value from a foo(<param_value>) style call */
       
  9716             if (IN_param_value == NULL)
       
  9717               IN_param_value = function_call_param_iterator.next();
       
  9718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9720             
       
  9721             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9722             {
       
  9723         
       
  9724                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9725                 return return_type_symbol;
       
  9726                 
       
  9727             }
       
  9728             
       
  9729             ERROR;
       
  9730         }
       
  9731         
       
  9732     }/*function_byte_to_dt*/
       
  9733     break;
       
  9734 
       
  9735 /****
       
  9736  *BYTE_TO_STRING
       
  9737  */
       
  9738     case function_byte_to_string :
       
  9739     {
       
  9740         symbol_c *last_type_symbol = NULL;
       
  9741 
       
  9742         {
       
  9743             identifier_c param_name("IN");
       
  9744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9752             
       
  9753             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9754             {
       
  9755         
       
  9756                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9757                 return return_type_symbol;
       
  9758                 
       
  9759             }
       
  9760             
       
  9761             ERROR;
       
  9762         }
       
  9763         
       
  9764     }/*function_byte_to_string*/
       
  9765     break;
       
  9766 
       
  9767 /****
       
  9768  *BYTE_TO_WORD
       
  9769  */
       
  9770     case function_byte_to_word :
       
  9771     {
       
  9772         symbol_c *last_type_symbol = NULL;
       
  9773 
       
  9774         {
       
  9775             identifier_c param_name("IN");
       
  9776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9778             
       
  9779             /* Get the value from a foo(<param_value>) style call */
       
  9780             if (IN_param_value == NULL)
       
  9781               IN_param_value = function_call_param_iterator.next();
       
  9782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9784             
       
  9785             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9786             {
       
  9787         
       
  9788                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9789                 return return_type_symbol;
       
  9790                 
       
  9791             }
       
  9792             
       
  9793             ERROR;
       
  9794         }
       
  9795         
       
  9796     }/*function_byte_to_word*/
       
  9797     break;
       
  9798 
       
  9799 /****
       
  9800  *BYTE_TO_DWORD
       
  9801  */
       
  9802     case function_byte_to_dword :
       
  9803     {
       
  9804         symbol_c *last_type_symbol = NULL;
       
  9805 
       
  9806         {
       
  9807             identifier_c param_name("IN");
       
  9808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9810             
       
  9811             /* Get the value from a foo(<param_value>) style call */
       
  9812             if (IN_param_value == NULL)
       
  9813               IN_param_value = function_call_param_iterator.next();
       
  9814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9816             
       
  9817             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9818             {
       
  9819         
       
  9820                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9821                 return return_type_symbol;
       
  9822                 
       
  9823             }
       
  9824             
       
  9825             ERROR;
       
  9826         }
       
  9827         
       
  9828     }/*function_byte_to_dword*/
       
  9829     break;
       
  9830 
       
  9831 /****
       
  9832  *BYTE_TO_LWORD
       
  9833  */
       
  9834     case function_byte_to_lword :
       
  9835     {
       
  9836         symbol_c *last_type_symbol = NULL;
       
  9837 
       
  9838         {
       
  9839             identifier_c param_name("IN");
       
  9840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9842             
       
  9843             /* Get the value from a foo(<param_value>) style call */
       
  9844             if (IN_param_value == NULL)
       
  9845               IN_param_value = function_call_param_iterator.next();
       
  9846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9848             
       
  9849             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9850             {
       
  9851         
       
  9852                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9853                 return return_type_symbol;
       
  9854                 
       
  9855             }
       
  9856             
       
  9857             ERROR;
       
  9858         }
       
  9859         
       
  9860     }/*function_byte_to_lword*/
       
  9861     break;
       
  9862 
       
  9863 /****
       
  9864  *WORD_TO_BOOL
       
  9865  */
       
  9866     case function_word_to_bool :
       
  9867     {
       
  9868         symbol_c *last_type_symbol = NULL;
       
  9869 
       
  9870         {
       
  9871             identifier_c param_name("IN");
       
  9872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9874             
       
  9875             /* Get the value from a foo(<param_value>) style call */
       
  9876             if (IN_param_value == NULL)
       
  9877               IN_param_value = function_call_param_iterator.next();
       
  9878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9880             
       
  9881             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  9882             {
       
  9883         
       
  9884                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9885                 return return_type_symbol;
       
  9886                 
       
  9887             }
       
  9888             
       
  9889             ERROR;
       
  9890         }
       
  9891         
       
  9892     }/*function_word_to_bool*/
       
  9893     break;
       
  9894 
       
  9895 /****
       
  9896  *WORD_TO_SINT
       
  9897  */
       
  9898     case function_word_to_sint :
       
  9899     {
       
  9900         symbol_c *last_type_symbol = NULL;
       
  9901 
       
  9902         {
       
  9903             identifier_c param_name("IN");
       
  9904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9906             
       
  9907             /* Get the value from a foo(<param_value>) style call */
       
  9908             if (IN_param_value == NULL)
       
  9909               IN_param_value = function_call_param_iterator.next();
       
  9910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9912             
       
  9913             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  9914             {
       
  9915         
       
  9916                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9917                 return return_type_symbol;
       
  9918                 
       
  9919             }
       
  9920             
       
  9921             ERROR;
       
  9922         }
       
  9923         
       
  9924     }/*function_word_to_sint*/
       
  9925     break;
       
  9926 
       
  9927 /****
       
  9928  *WORD_TO_INT
       
  9929  */
       
  9930     case function_word_to_int :
       
  9931     {
       
  9932         symbol_c *last_type_symbol = NULL;
       
  9933 
       
  9934         {
       
  9935             identifier_c param_name("IN");
       
  9936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9938             
       
  9939             /* Get the value from a foo(<param_value>) style call */
       
  9940             if (IN_param_value == NULL)
       
  9941               IN_param_value = function_call_param_iterator.next();
       
  9942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9944             
       
  9945             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  9946             {
       
  9947         
       
  9948                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9949                 return return_type_symbol;
       
  9950                 
       
  9951             }
       
  9952             
       
  9953             ERROR;
       
  9954         }
       
  9955         
       
  9956     }/*function_word_to_int*/
       
  9957     break;
       
  9958 
       
  9959 /****
       
  9960  *WORD_TO_DINT
       
  9961  */
       
  9962     case function_word_to_dint :
       
  9963     {
       
  9964         symbol_c *last_type_symbol = NULL;
       
  9965 
       
  9966         {
       
  9967             identifier_c param_name("IN");
       
  9968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9970             
       
  9971             /* Get the value from a foo(<param_value>) style call */
       
  9972             if (IN_param_value == NULL)
       
  9973               IN_param_value = function_call_param_iterator.next();
       
  9974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9976             
       
  9977             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  9978             {
       
  9979         
       
  9980                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9981                 return return_type_symbol;
       
  9982                 
       
  9983             }
       
  9984             
       
  9985             ERROR;
       
  9986         }
       
  9987         
       
  9988     }/*function_word_to_dint*/
       
  9989     break;
       
  9990 
       
  9991 /****
       
  9992  *WORD_TO_LINT
       
  9993  */
       
  9994     case function_word_to_lint :
       
  9995     {
       
  9996         symbol_c *last_type_symbol = NULL;
       
  9997 
       
  9998         {
       
  9999             identifier_c param_name("IN");
       
 10000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10002             
       
 10003             /* Get the value from a foo(<param_value>) style call */
       
 10004             if (IN_param_value == NULL)
       
 10005               IN_param_value = function_call_param_iterator.next();
       
 10006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10008             
       
 10009             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10010             {
       
 10011         
       
 10012                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10013                 return return_type_symbol;
       
 10014                 
       
 10015             }
       
 10016             
       
 10017             ERROR;
       
 10018         }
       
 10019         
       
 10020     }/*function_word_to_lint*/
       
 10021     break;
       
 10022 
       
 10023 /****
       
 10024  *WORD_TO_USINT
       
 10025  */
       
 10026     case function_word_to_usint :
       
 10027     {
       
 10028         symbol_c *last_type_symbol = NULL;
       
 10029 
       
 10030         {
       
 10031             identifier_c param_name("IN");
       
 10032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10040             
       
 10041             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10042             {
       
 10043         
       
 10044                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10045                 return return_type_symbol;
       
 10046                 
       
 10047             }
       
 10048             
       
 10049             ERROR;
       
 10050         }
       
 10051         
       
 10052     }/*function_word_to_usint*/
       
 10053     break;
       
 10054 
       
 10055 /****
       
 10056  *WORD_TO_UINT
       
 10057  */
       
 10058     case function_word_to_uint :
       
 10059     {
       
 10060         symbol_c *last_type_symbol = NULL;
       
 10061 
       
 10062         {
       
 10063             identifier_c param_name("IN");
       
 10064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10066             
       
 10067             /* Get the value from a foo(<param_value>) style call */
       
 10068             if (IN_param_value == NULL)
       
 10069               IN_param_value = function_call_param_iterator.next();
       
 10070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10072             
       
 10073             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10074             {
       
 10075         
       
 10076                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10077                 return return_type_symbol;
       
 10078                 
       
 10079             }
       
 10080             
       
 10081             ERROR;
       
 10082         }
       
 10083         
       
 10084     }/*function_word_to_uint*/
       
 10085     break;
       
 10086 
       
 10087 /****
       
 10088  *WORD_TO_UDINT
       
 10089  */
       
 10090     case function_word_to_udint :
       
 10091     {
       
 10092         symbol_c *last_type_symbol = NULL;
       
 10093 
       
 10094         {
       
 10095             identifier_c param_name("IN");
       
 10096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10098             
       
 10099             /* Get the value from a foo(<param_value>) style call */
       
 10100             if (IN_param_value == NULL)
       
 10101               IN_param_value = function_call_param_iterator.next();
       
 10102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10104             
       
 10105             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10106             {
       
 10107         
       
 10108                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10109                 return return_type_symbol;
       
 10110                 
       
 10111             }
       
 10112             
       
 10113             ERROR;
       
 10114         }
       
 10115         
       
 10116     }/*function_word_to_udint*/
       
 10117     break;
       
 10118 
       
 10119 /****
       
 10120  *WORD_TO_ULINT
       
 10121  */
       
 10122     case function_word_to_ulint :
       
 10123     {
       
 10124         symbol_c *last_type_symbol = NULL;
       
 10125 
       
 10126         {
       
 10127             identifier_c param_name("IN");
       
 10128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10130             
       
 10131             /* Get the value from a foo(<param_value>) style call */
       
 10132             if (IN_param_value == NULL)
       
 10133               IN_param_value = function_call_param_iterator.next();
       
 10134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10136             
       
 10137             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10138             {
       
 10139         
       
 10140                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10141                 return return_type_symbol;
       
 10142                 
       
 10143             }
       
 10144             
       
 10145             ERROR;
       
 10146         }
       
 10147         
       
 10148     }/*function_word_to_ulint*/
       
 10149     break;
       
 10150 
       
 10151 /****
       
 10152  *WORD_TO_REAL
       
 10153  */
       
 10154     case function_word_to_real :
       
 10155     {
       
 10156         symbol_c *last_type_symbol = NULL;
       
 10157 
       
 10158         {
       
 10159             identifier_c param_name("IN");
       
 10160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10162             
       
 10163             /* Get the value from a foo(<param_value>) style call */
       
 10164             if (IN_param_value == NULL)
       
 10165               IN_param_value = function_call_param_iterator.next();
       
 10166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10168             
       
 10169             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10170             {
       
 10171         
       
 10172                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10173                 return return_type_symbol;
       
 10174                 
       
 10175             }
       
 10176             
       
 10177             ERROR;
       
 10178         }
       
 10179         
       
 10180     }/*function_word_to_real*/
       
 10181     break;
       
 10182 
       
 10183 /****
       
 10184  *WORD_TO_LREAL
       
 10185  */
       
 10186     case function_word_to_lreal :
       
 10187     {
       
 10188         symbol_c *last_type_symbol = NULL;
       
 10189 
       
 10190         {
       
 10191             identifier_c param_name("IN");
       
 10192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10194             
       
 10195             /* Get the value from a foo(<param_value>) style call */
       
 10196             if (IN_param_value == NULL)
       
 10197               IN_param_value = function_call_param_iterator.next();
       
 10198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10200             
       
 10201             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10202             {
       
 10203         
       
 10204                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10205                 return return_type_symbol;
       
 10206                 
       
 10207             }
       
 10208             
       
 10209             ERROR;
       
 10210         }
       
 10211         
       
 10212     }/*function_word_to_lreal*/
       
 10213     break;
       
 10214 
       
 10215 /****
       
 10216  *WORD_TO_TIME
       
 10217  */
       
 10218     case function_word_to_time :
       
 10219     {
       
 10220         symbol_c *last_type_symbol = NULL;
       
 10221 
       
 10222         {
       
 10223             identifier_c param_name("IN");
       
 10224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10226             
       
 10227             /* Get the value from a foo(<param_value>) style call */
       
 10228             if (IN_param_value == NULL)
       
 10229               IN_param_value = function_call_param_iterator.next();
       
 10230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10232             
       
 10233             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10234             {
       
 10235         
       
 10236                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10237                 return return_type_symbol;
       
 10238                 
       
 10239             }
       
 10240             
       
 10241             ERROR;
       
 10242         }
       
 10243         
       
 10244     }/*function_word_to_time*/
       
 10245     break;
       
 10246 
       
 10247 /****
       
 10248  *WORD_TO_DATE
       
 10249  */
       
 10250     case function_word_to_date :
       
 10251     {
       
 10252         symbol_c *last_type_symbol = NULL;
       
 10253 
       
 10254         {
       
 10255             identifier_c param_name("IN");
       
 10256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10258             
       
 10259             /* Get the value from a foo(<param_value>) style call */
       
 10260             if (IN_param_value == NULL)
       
 10261               IN_param_value = function_call_param_iterator.next();
       
 10262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10264             
       
 10265             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10266             {
       
 10267         
       
 10268                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10269                 return return_type_symbol;
       
 10270                 
       
 10271             }
       
 10272             
       
 10273             ERROR;
       
 10274         }
       
 10275         
       
 10276     }/*function_word_to_date*/
       
 10277     break;
       
 10278 
       
 10279 /****
       
 10280  *WORD_TO_TOD
       
 10281  */
       
 10282     case function_word_to_tod :
       
 10283     {
       
 10284         symbol_c *last_type_symbol = NULL;
       
 10285 
       
 10286         {
       
 10287             identifier_c param_name("IN");
       
 10288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10290             
       
 10291             /* Get the value from a foo(<param_value>) style call */
       
 10292             if (IN_param_value == NULL)
       
 10293               IN_param_value = function_call_param_iterator.next();
       
 10294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10296             
       
 10297             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10298             {
       
 10299         
       
 10300                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10301                 return return_type_symbol;
       
 10302                 
       
 10303             }
       
 10304             
       
 10305             ERROR;
       
 10306         }
       
 10307         
       
 10308     }/*function_word_to_tod*/
       
 10309     break;
       
 10310 
       
 10311 /****
       
 10312  *WORD_TO_DT
       
 10313  */
       
 10314     case function_word_to_dt :
       
 10315     {
       
 10316         symbol_c *last_type_symbol = NULL;
       
 10317 
       
 10318         {
       
 10319             identifier_c param_name("IN");
       
 10320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10328             
       
 10329             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10330             {
       
 10331         
       
 10332                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10333                 return return_type_symbol;
       
 10334                 
       
 10335             }
       
 10336             
       
 10337             ERROR;
       
 10338         }
       
 10339         
       
 10340     }/*function_word_to_dt*/
       
 10341     break;
       
 10342 
       
 10343 /****
       
 10344  *WORD_TO_STRING
       
 10345  */
       
 10346     case function_word_to_string :
       
 10347     {
       
 10348         symbol_c *last_type_symbol = NULL;
       
 10349 
       
 10350         {
       
 10351             identifier_c param_name("IN");
       
 10352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10354             
       
 10355             /* Get the value from a foo(<param_value>) style call */
       
 10356             if (IN_param_value == NULL)
       
 10357               IN_param_value = function_call_param_iterator.next();
       
 10358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10360             
       
 10361             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10362             {
       
 10363         
       
 10364                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10365                 return return_type_symbol;
       
 10366                 
       
 10367             }
       
 10368             
       
 10369             ERROR;
       
 10370         }
       
 10371         
       
 10372     }/*function_word_to_string*/
       
 10373     break;
       
 10374 
       
 10375 /****
       
 10376  *WORD_TO_BYTE
       
 10377  */
       
 10378     case function_word_to_byte :
       
 10379     {
       
 10380         symbol_c *last_type_symbol = NULL;
       
 10381 
       
 10382         {
       
 10383             identifier_c param_name("IN");
       
 10384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10386             
       
 10387             /* Get the value from a foo(<param_value>) style call */
       
 10388             if (IN_param_value == NULL)
       
 10389               IN_param_value = function_call_param_iterator.next();
       
 10390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10392             
       
 10393             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10394             {
       
 10395         
       
 10396                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10397                 return return_type_symbol;
       
 10398                 
       
 10399             }
       
 10400             
       
 10401             ERROR;
       
 10402         }
       
 10403         
       
 10404     }/*function_word_to_byte*/
       
 10405     break;
       
 10406 
       
 10407 /****
       
 10408  *WORD_TO_DWORD
       
 10409  */
       
 10410     case function_word_to_dword :
       
 10411     {
       
 10412         symbol_c *last_type_symbol = NULL;
       
 10413 
       
 10414         {
       
 10415             identifier_c param_name("IN");
       
 10416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10418             
       
 10419             /* Get the value from a foo(<param_value>) style call */
       
 10420             if (IN_param_value == NULL)
       
 10421               IN_param_value = function_call_param_iterator.next();
       
 10422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10424             
       
 10425             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10426             {
       
 10427         
       
 10428                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10429                 return return_type_symbol;
       
 10430                 
       
 10431             }
       
 10432             
       
 10433             ERROR;
       
 10434         }
       
 10435         
       
 10436     }/*function_word_to_dword*/
       
 10437     break;
       
 10438 
       
 10439 /****
       
 10440  *WORD_TO_LWORD
       
 10441  */
       
 10442     case function_word_to_lword :
       
 10443     {
       
 10444         symbol_c *last_type_symbol = NULL;
       
 10445 
       
 10446         {
       
 10447             identifier_c param_name("IN");
       
 10448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10450             
       
 10451             /* Get the value from a foo(<param_value>) style call */
       
 10452             if (IN_param_value == NULL)
       
 10453               IN_param_value = function_call_param_iterator.next();
       
 10454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10456             
       
 10457             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10458             {
       
 10459         
       
 10460                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10461                 return return_type_symbol;
       
 10462                 
       
 10463             }
       
 10464             
       
 10465             ERROR;
       
 10466         }
       
 10467         
       
 10468     }/*function_word_to_lword*/
       
 10469     break;
       
 10470 
       
 10471 /****
       
 10472  *DWORD_TO_BOOL
       
 10473  */
       
 10474     case function_dword_to_bool :
       
 10475     {
       
 10476         symbol_c *last_type_symbol = NULL;
       
 10477 
       
 10478         {
       
 10479             identifier_c param_name("IN");
       
 10480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10482             
       
 10483             /* Get the value from a foo(<param_value>) style call */
       
 10484             if (IN_param_value == NULL)
       
 10485               IN_param_value = function_call_param_iterator.next();
       
 10486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10488             
       
 10489             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10490             {
       
 10491         
       
 10492                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10493                 return return_type_symbol;
       
 10494                 
       
 10495             }
       
 10496             
       
 10497             ERROR;
       
 10498         }
       
 10499         
       
 10500     }/*function_dword_to_bool*/
       
 10501     break;
       
 10502 
       
 10503 /****
       
 10504  *DWORD_TO_SINT
       
 10505  */
       
 10506     case function_dword_to_sint :
       
 10507     {
       
 10508         symbol_c *last_type_symbol = NULL;
       
 10509 
       
 10510         {
       
 10511             identifier_c param_name("IN");
       
 10512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10514             
       
 10515             /* Get the value from a foo(<param_value>) style call */
       
 10516             if (IN_param_value == NULL)
       
 10517               IN_param_value = function_call_param_iterator.next();
       
 10518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10520             
       
 10521             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10522             {
       
 10523         
       
 10524                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10525                 return return_type_symbol;
       
 10526                 
       
 10527             }
       
 10528             
       
 10529             ERROR;
       
 10530         }
       
 10531         
       
 10532     }/*function_dword_to_sint*/
       
 10533     break;
       
 10534 
       
 10535 /****
       
 10536  *DWORD_TO_INT
       
 10537  */
       
 10538     case function_dword_to_int :
       
 10539     {
       
 10540         symbol_c *last_type_symbol = NULL;
       
 10541 
       
 10542         {
       
 10543             identifier_c param_name("IN");
       
 10544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10546             
       
 10547             /* Get the value from a foo(<param_value>) style call */
       
 10548             if (IN_param_value == NULL)
       
 10549               IN_param_value = function_call_param_iterator.next();
       
 10550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10552             
       
 10553             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10554             {
       
 10555         
       
 10556                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10557                 return return_type_symbol;
       
 10558                 
       
 10559             }
       
 10560             
       
 10561             ERROR;
       
 10562         }
       
 10563         
       
 10564     }/*function_dword_to_int*/
       
 10565     break;
       
 10566 
       
 10567 /****
       
 10568  *DWORD_TO_DINT
       
 10569  */
       
 10570     case function_dword_to_dint :
       
 10571     {
       
 10572         symbol_c *last_type_symbol = NULL;
       
 10573 
       
 10574         {
       
 10575             identifier_c param_name("IN");
       
 10576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10578             
       
 10579             /* Get the value from a foo(<param_value>) style call */
       
 10580             if (IN_param_value == NULL)
       
 10581               IN_param_value = function_call_param_iterator.next();
       
 10582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10584             
       
 10585             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10586             {
       
 10587         
       
 10588                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10589                 return return_type_symbol;
       
 10590                 
       
 10591             }
       
 10592             
       
 10593             ERROR;
       
 10594         }
       
 10595         
       
 10596     }/*function_dword_to_dint*/
       
 10597     break;
       
 10598 
       
 10599 /****
       
 10600  *DWORD_TO_LINT
       
 10601  */
       
 10602     case function_dword_to_lint :
       
 10603     {
       
 10604         symbol_c *last_type_symbol = NULL;
       
 10605 
       
 10606         {
       
 10607             identifier_c param_name("IN");
       
 10608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10616             
       
 10617             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10618             {
       
 10619         
       
 10620                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10621                 return return_type_symbol;
       
 10622                 
       
 10623             }
       
 10624             
       
 10625             ERROR;
       
 10626         }
       
 10627         
       
 10628     }/*function_dword_to_lint*/
       
 10629     break;
       
 10630 
       
 10631 /****
       
 10632  *DWORD_TO_USINT
       
 10633  */
       
 10634     case function_dword_to_usint :
       
 10635     {
       
 10636         symbol_c *last_type_symbol = NULL;
       
 10637 
       
 10638         {
       
 10639             identifier_c param_name("IN");
       
 10640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10642             
       
 10643             /* Get the value from a foo(<param_value>) style call */
       
 10644             if (IN_param_value == NULL)
       
 10645               IN_param_value = function_call_param_iterator.next();
       
 10646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10648             
       
 10649             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10650             {
       
 10651         
       
 10652                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10653                 return return_type_symbol;
       
 10654                 
       
 10655             }
       
 10656             
       
 10657             ERROR;
       
 10658         }
       
 10659         
       
 10660     }/*function_dword_to_usint*/
       
 10661     break;
       
 10662 
       
 10663 /****
       
 10664  *DWORD_TO_UINT
       
 10665  */
       
 10666     case function_dword_to_uint :
       
 10667     {
       
 10668         symbol_c *last_type_symbol = NULL;
       
 10669 
       
 10670         {
       
 10671             identifier_c param_name("IN");
       
 10672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10674             
       
 10675             /* Get the value from a foo(<param_value>) style call */
       
 10676             if (IN_param_value == NULL)
       
 10677               IN_param_value = function_call_param_iterator.next();
       
 10678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10680             
       
 10681             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10682             {
       
 10683         
       
 10684                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10685                 return return_type_symbol;
       
 10686                 
       
 10687             }
       
 10688             
       
 10689             ERROR;
       
 10690         }
       
 10691         
       
 10692     }/*function_dword_to_uint*/
       
 10693     break;
       
 10694 
       
 10695 /****
       
 10696  *DWORD_TO_UDINT
       
 10697  */
       
 10698     case function_dword_to_udint :
       
 10699     {
       
 10700         symbol_c *last_type_symbol = NULL;
       
 10701 
       
 10702         {
       
 10703             identifier_c param_name("IN");
       
 10704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10706             
       
 10707             /* Get the value from a foo(<param_value>) style call */
       
 10708             if (IN_param_value == NULL)
       
 10709               IN_param_value = function_call_param_iterator.next();
       
 10710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10712             
       
 10713             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10714             {
       
 10715         
       
 10716                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10717                 return return_type_symbol;
       
 10718                 
       
 10719             }
       
 10720             
       
 10721             ERROR;
       
 10722         }
       
 10723         
       
 10724     }/*function_dword_to_udint*/
       
 10725     break;
       
 10726 
       
 10727 /****
       
 10728  *DWORD_TO_ULINT
       
 10729  */
       
 10730     case function_dword_to_ulint :
       
 10731     {
       
 10732         symbol_c *last_type_symbol = NULL;
       
 10733 
       
 10734         {
       
 10735             identifier_c param_name("IN");
       
 10736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10738             
       
 10739             /* Get the value from a foo(<param_value>) style call */
       
 10740             if (IN_param_value == NULL)
       
 10741               IN_param_value = function_call_param_iterator.next();
       
 10742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10744             
       
 10745             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10746             {
       
 10747         
       
 10748                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10749                 return return_type_symbol;
       
 10750                 
       
 10751             }
       
 10752             
       
 10753             ERROR;
       
 10754         }
       
 10755         
       
 10756     }/*function_dword_to_ulint*/
       
 10757     break;
       
 10758 
       
 10759 /****
       
 10760  *DWORD_TO_REAL
       
 10761  */
       
 10762     case function_dword_to_real :
       
 10763     {
       
 10764         symbol_c *last_type_symbol = NULL;
       
 10765 
       
 10766         {
       
 10767             identifier_c param_name("IN");
       
 10768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10770             
       
 10771             /* Get the value from a foo(<param_value>) style call */
       
 10772             if (IN_param_value == NULL)
       
 10773               IN_param_value = function_call_param_iterator.next();
       
 10774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10776             
       
 10777             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10778             {
       
 10779         
       
 10780                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10781                 return return_type_symbol;
       
 10782                 
       
 10783             }
       
 10784             
       
 10785             ERROR;
       
 10786         }
       
 10787         
       
 10788     }/*function_dword_to_real*/
       
 10789     break;
       
 10790 
       
 10791 /****
       
 10792  *DWORD_TO_LREAL
       
 10793  */
       
 10794     case function_dword_to_lreal :
       
 10795     {
       
 10796         symbol_c *last_type_symbol = NULL;
       
 10797 
       
 10798         {
       
 10799             identifier_c param_name("IN");
       
 10800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10802             
       
 10803             /* Get the value from a foo(<param_value>) style call */
       
 10804             if (IN_param_value == NULL)
       
 10805               IN_param_value = function_call_param_iterator.next();
       
 10806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10808             
       
 10809             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10810             {
       
 10811         
       
 10812                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10813                 return return_type_symbol;
       
 10814                 
       
 10815             }
       
 10816             
       
 10817             ERROR;
       
 10818         }
       
 10819         
       
 10820     }/*function_dword_to_lreal*/
       
 10821     break;
       
 10822 
       
 10823 /****
       
 10824  *DWORD_TO_TIME
       
 10825  */
       
 10826     case function_dword_to_time :
       
 10827     {
       
 10828         symbol_c *last_type_symbol = NULL;
       
 10829 
       
 10830         {
       
 10831             identifier_c param_name("IN");
       
 10832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10834             
       
 10835             /* Get the value from a foo(<param_value>) style call */
       
 10836             if (IN_param_value == NULL)
       
 10837               IN_param_value = function_call_param_iterator.next();
       
 10838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10840             
       
 10841             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10842             {
       
 10843         
       
 10844                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10845                 return return_type_symbol;
       
 10846                 
       
 10847             }
       
 10848             
       
 10849             ERROR;
       
 10850         }
       
 10851         
       
 10852     }/*function_dword_to_time*/
       
 10853     break;
       
 10854 
       
 10855 /****
       
 10856  *DWORD_TO_DATE
       
 10857  */
       
 10858     case function_dword_to_date :
       
 10859     {
       
 10860         symbol_c *last_type_symbol = NULL;
       
 10861 
       
 10862         {
       
 10863             identifier_c param_name("IN");
       
 10864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10866             
       
 10867             /* Get the value from a foo(<param_value>) style call */
       
 10868             if (IN_param_value == NULL)
       
 10869               IN_param_value = function_call_param_iterator.next();
       
 10870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10872             
       
 10873             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10874             {
       
 10875         
       
 10876                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10877                 return return_type_symbol;
       
 10878                 
       
 10879             }
       
 10880             
       
 10881             ERROR;
       
 10882         }
       
 10883         
       
 10884     }/*function_dword_to_date*/
       
 10885     break;
       
 10886 
       
 10887 /****
       
 10888  *DWORD_TO_TOD
       
 10889  */
       
 10890     case function_dword_to_tod :
       
 10891     {
       
 10892         symbol_c *last_type_symbol = NULL;
       
 10893 
       
 10894         {
       
 10895             identifier_c param_name("IN");
       
 10896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10904             
       
 10905             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10906             {
       
 10907         
       
 10908                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10909                 return return_type_symbol;
       
 10910                 
       
 10911             }
       
 10912             
       
 10913             ERROR;
       
 10914         }
       
 10915         
       
 10916     }/*function_dword_to_tod*/
       
 10917     break;
       
 10918 
       
 10919 /****
       
 10920  *DWORD_TO_DT
       
 10921  */
       
 10922     case function_dword_to_dt :
       
 10923     {
       
 10924         symbol_c *last_type_symbol = NULL;
       
 10925 
       
 10926         {
       
 10927             identifier_c param_name("IN");
       
 10928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10930             
       
 10931             /* Get the value from a foo(<param_value>) style call */
       
 10932             if (IN_param_value == NULL)
       
 10933               IN_param_value = function_call_param_iterator.next();
       
 10934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10936             
       
 10937             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10938             {
       
 10939         
       
 10940                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10941                 return return_type_symbol;
       
 10942                 
       
 10943             }
       
 10944             
       
 10945             ERROR;
       
 10946         }
       
 10947         
       
 10948     }/*function_dword_to_dt*/
       
 10949     break;
       
 10950 
       
 10951 /****
       
 10952  *DWORD_TO_STRING
       
 10953  */
       
 10954     case function_dword_to_string :
       
 10955     {
       
 10956         symbol_c *last_type_symbol = NULL;
       
 10957 
       
 10958         {
       
 10959             identifier_c param_name("IN");
       
 10960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10962             
       
 10963             /* Get the value from a foo(<param_value>) style call */
       
 10964             if (IN_param_value == NULL)
       
 10965               IN_param_value = function_call_param_iterator.next();
       
 10966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10968             
       
 10969             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10970             {
       
 10971         
       
 10972                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10973                 return return_type_symbol;
       
 10974                 
       
 10975             }
       
 10976             
       
 10977             ERROR;
       
 10978         }
       
 10979         
       
 10980     }/*function_dword_to_string*/
       
 10981     break;
       
 10982 
       
 10983 /****
       
 10984  *DWORD_TO_BYTE
       
 10985  */
       
 10986     case function_dword_to_byte :
       
 10987     {
       
 10988         symbol_c *last_type_symbol = NULL;
       
 10989 
       
 10990         {
       
 10991             identifier_c param_name("IN");
       
 10992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10994             
       
 10995             /* Get the value from a foo(<param_value>) style call */
       
 10996             if (IN_param_value == NULL)
       
 10997               IN_param_value = function_call_param_iterator.next();
       
 10998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11000             
       
 11001             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 11002             {
       
 11003         
       
 11004                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11005                 return return_type_symbol;
       
 11006                 
       
 11007             }
       
 11008             
       
 11009             ERROR;
       
 11010         }
       
 11011         
       
 11012     }/*function_dword_to_byte*/
       
 11013     break;
       
 11014 
       
 11015 /****
       
 11016  *DWORD_TO_WORD
       
 11017  */
       
 11018     case function_dword_to_word :
       
 11019     {
       
 11020         symbol_c *last_type_symbol = NULL;
       
 11021 
       
 11022         {
       
 11023             identifier_c param_name("IN");
       
 11024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11026             
       
 11027             /* Get the value from a foo(<param_value>) style call */
       
 11028             if (IN_param_value == NULL)
       
 11029               IN_param_value = function_call_param_iterator.next();
       
 11030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11032             
       
 11033             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 11034             {
       
 11035         
       
 11036                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11037                 return return_type_symbol;
       
 11038                 
       
 11039             }
       
 11040             
       
 11041             ERROR;
       
 11042         }
       
 11043         
       
 11044     }/*function_dword_to_word*/
       
 11045     break;
       
 11046 
       
 11047 /****
       
 11048  *DWORD_TO_LWORD
       
 11049  */
       
 11050     case function_dword_to_lword :
       
 11051     {
       
 11052         symbol_c *last_type_symbol = NULL;
       
 11053 
       
 11054         {
       
 11055             identifier_c param_name("IN");
       
 11056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11058             
       
 11059             /* Get the value from a foo(<param_value>) style call */
       
 11060             if (IN_param_value == NULL)
       
 11061               IN_param_value = function_call_param_iterator.next();
       
 11062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11064             
       
 11065             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 11066             {
       
 11067         
       
 11068                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11069                 return return_type_symbol;
       
 11070                 
       
 11071             }
       
 11072             
       
 11073             ERROR;
       
 11074         }
       
 11075         
       
 11076     }/*function_dword_to_lword*/
       
 11077     break;
       
 11078 
       
 11079 /****
       
 11080  *LWORD_TO_BOOL
       
 11081  */
       
 11082     case function_lword_to_bool :
       
 11083     {
       
 11084         symbol_c *last_type_symbol = NULL;
       
 11085 
       
 11086         {
       
 11087             identifier_c param_name("IN");
       
 11088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11090             
       
 11091             /* Get the value from a foo(<param_value>) style call */
       
 11092             if (IN_param_value == NULL)
       
 11093               IN_param_value = function_call_param_iterator.next();
       
 11094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11096             
       
 11097             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11098             {
       
 11099         
       
 11100                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11101                 return return_type_symbol;
       
 11102                 
       
 11103             }
       
 11104             
       
 11105             ERROR;
       
 11106         }
       
 11107         
       
 11108     }/*function_lword_to_bool*/
       
 11109     break;
       
 11110 
       
 11111 /****
       
 11112  *LWORD_TO_SINT
       
 11113  */
       
 11114     case function_lword_to_sint :
       
 11115     {
       
 11116         symbol_c *last_type_symbol = NULL;
       
 11117 
       
 11118         {
       
 11119             identifier_c param_name("IN");
       
 11120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11122             
       
 11123             /* Get the value from a foo(<param_value>) style call */
       
 11124             if (IN_param_value == NULL)
       
 11125               IN_param_value = function_call_param_iterator.next();
       
 11126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11128             
       
 11129             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11130             {
       
 11131         
       
 11132                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11133                 return return_type_symbol;
       
 11134                 
       
 11135             }
       
 11136             
       
 11137             ERROR;
       
 11138         }
       
 11139         
       
 11140     }/*function_lword_to_sint*/
       
 11141     break;
       
 11142 
       
 11143 /****
       
 11144  *LWORD_TO_INT
       
 11145  */
       
 11146     case function_lword_to_int :
       
 11147     {
       
 11148         symbol_c *last_type_symbol = NULL;
       
 11149 
       
 11150         {
       
 11151             identifier_c param_name("IN");
       
 11152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11154             
       
 11155             /* Get the value from a foo(<param_value>) style call */
       
 11156             if (IN_param_value == NULL)
       
 11157               IN_param_value = function_call_param_iterator.next();
       
 11158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11160             
       
 11161             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11162             {
       
 11163         
       
 11164                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11165                 return return_type_symbol;
       
 11166                 
       
 11167             }
       
 11168             
       
 11169             ERROR;
       
 11170         }
       
 11171         
       
 11172     }/*function_lword_to_int*/
       
 11173     break;
       
 11174 
       
 11175 /****
       
 11176  *LWORD_TO_DINT
       
 11177  */
       
 11178     case function_lword_to_dint :
       
 11179     {
       
 11180         symbol_c *last_type_symbol = NULL;
       
 11181 
       
 11182         {
       
 11183             identifier_c param_name("IN");
       
 11184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11192             
       
 11193             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11194             {
       
 11195         
       
 11196                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11197                 return return_type_symbol;
       
 11198                 
       
 11199             }
       
 11200             
       
 11201             ERROR;
       
 11202         }
       
 11203         
       
 11204     }/*function_lword_to_dint*/
       
 11205     break;
       
 11206 
       
 11207 /****
       
 11208  *LWORD_TO_LINT
       
 11209  */
       
 11210     case function_lword_to_lint :
       
 11211     {
       
 11212         symbol_c *last_type_symbol = NULL;
       
 11213 
       
 11214         {
       
 11215             identifier_c param_name("IN");
       
 11216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11218             
       
 11219             /* Get the value from a foo(<param_value>) style call */
       
 11220             if (IN_param_value == NULL)
       
 11221               IN_param_value = function_call_param_iterator.next();
       
 11222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11224             
       
 11225             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11226             {
       
 11227         
       
 11228                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11229                 return return_type_symbol;
       
 11230                 
       
 11231             }
       
 11232             
       
 11233             ERROR;
       
 11234         }
       
 11235         
       
 11236     }/*function_lword_to_lint*/
       
 11237     break;
       
 11238 
       
 11239 /****
       
 11240  *LWORD_TO_USINT
       
 11241  */
       
 11242     case function_lword_to_usint :
       
 11243     {
       
 11244         symbol_c *last_type_symbol = NULL;
       
 11245 
       
 11246         {
       
 11247             identifier_c param_name("IN");
       
 11248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11250             
       
 11251             /* Get the value from a foo(<param_value>) style call */
       
 11252             if (IN_param_value == NULL)
       
 11253               IN_param_value = function_call_param_iterator.next();
       
 11254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11256             
       
 11257             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11258             {
       
 11259         
       
 11260                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11261                 return return_type_symbol;
       
 11262                 
       
 11263             }
       
 11264             
       
 11265             ERROR;
       
 11266         }
       
 11267         
       
 11268     }/*function_lword_to_usint*/
       
 11269     break;
       
 11270 
       
 11271 /****
       
 11272  *LWORD_TO_UINT
       
 11273  */
       
 11274     case function_lword_to_uint :
       
 11275     {
       
 11276         symbol_c *last_type_symbol = NULL;
       
 11277 
       
 11278         {
       
 11279             identifier_c param_name("IN");
       
 11280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11282             
       
 11283             /* Get the value from a foo(<param_value>) style call */
       
 11284             if (IN_param_value == NULL)
       
 11285               IN_param_value = function_call_param_iterator.next();
       
 11286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11288             
       
 11289             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11290             {
       
 11291         
       
 11292                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11293                 return return_type_symbol;
       
 11294                 
       
 11295             }
       
 11296             
       
 11297             ERROR;
       
 11298         }
       
 11299         
       
 11300     }/*function_lword_to_uint*/
       
 11301     break;
       
 11302 
       
 11303 /****
       
 11304  *LWORD_TO_UDINT
       
 11305  */
       
 11306     case function_lword_to_udint :
       
 11307     {
       
 11308         symbol_c *last_type_symbol = NULL;
       
 11309 
       
 11310         {
       
 11311             identifier_c param_name("IN");
       
 11312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11314             
       
 11315             /* Get the value from a foo(<param_value>) style call */
       
 11316             if (IN_param_value == NULL)
       
 11317               IN_param_value = function_call_param_iterator.next();
       
 11318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11320             
       
 11321             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11322             {
       
 11323         
       
 11324                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11325                 return return_type_symbol;
       
 11326                 
       
 11327             }
       
 11328             
       
 11329             ERROR;
       
 11330         }
       
 11331         
       
 11332     }/*function_lword_to_udint*/
       
 11333     break;
       
 11334 
       
 11335 /****
       
 11336  *LWORD_TO_ULINT
       
 11337  */
       
 11338     case function_lword_to_ulint :
       
 11339     {
       
 11340         symbol_c *last_type_symbol = NULL;
       
 11341 
       
 11342         {
       
 11343             identifier_c param_name("IN");
       
 11344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11346             
       
 11347             /* Get the value from a foo(<param_value>) style call */
       
 11348             if (IN_param_value == NULL)
       
 11349               IN_param_value = function_call_param_iterator.next();
       
 11350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11352             
       
 11353             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11354             {
       
 11355         
       
 11356                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11357                 return return_type_symbol;
       
 11358                 
       
 11359             }
       
 11360             
       
 11361             ERROR;
       
 11362         }
       
 11363         
       
 11364     }/*function_lword_to_ulint*/
       
 11365     break;
       
 11366 
       
 11367 /****
       
 11368  *LWORD_TO_REAL
       
 11369  */
       
 11370     case function_lword_to_real :
       
 11371     {
       
 11372         symbol_c *last_type_symbol = NULL;
       
 11373 
       
 11374         {
       
 11375             identifier_c param_name("IN");
       
 11376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11378             
       
 11379             /* Get the value from a foo(<param_value>) style call */
       
 11380             if (IN_param_value == NULL)
       
 11381               IN_param_value = function_call_param_iterator.next();
       
 11382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11384             
       
 11385             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11386             {
       
 11387         
       
 11388                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11389                 return return_type_symbol;
       
 11390                 
       
 11391             }
       
 11392             
       
 11393             ERROR;
       
 11394         }
       
 11395         
       
 11396     }/*function_lword_to_real*/
       
 11397     break;
       
 11398 
       
 11399 /****
       
 11400  *LWORD_TO_LREAL
       
 11401  */
       
 11402     case function_lword_to_lreal :
       
 11403     {
       
 11404         symbol_c *last_type_symbol = NULL;
       
 11405 
       
 11406         {
       
 11407             identifier_c param_name("IN");
       
 11408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11410             
       
 11411             /* Get the value from a foo(<param_value>) style call */
       
 11412             if (IN_param_value == NULL)
       
 11413               IN_param_value = function_call_param_iterator.next();
       
 11414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11416             
       
 11417             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11418             {
       
 11419         
       
 11420                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11421                 return return_type_symbol;
       
 11422                 
       
 11423             }
       
 11424             
       
 11425             ERROR;
       
 11426         }
       
 11427         
       
 11428     }/*function_lword_to_lreal*/
       
 11429     break;
       
 11430 
       
 11431 /****
       
 11432  *LWORD_TO_TIME
       
 11433  */
       
 11434     case function_lword_to_time :
       
 11435     {
       
 11436         symbol_c *last_type_symbol = NULL;
       
 11437 
       
 11438         {
       
 11439             identifier_c param_name("IN");
       
 11440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11442             
       
 11443             /* Get the value from a foo(<param_value>) style call */
       
 11444             if (IN_param_value == NULL)
       
 11445               IN_param_value = function_call_param_iterator.next();
       
 11446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11448             
       
 11449             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11450             {
       
 11451         
       
 11452                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11453                 return return_type_symbol;
       
 11454                 
       
 11455             }
       
 11456             
       
 11457             ERROR;
       
 11458         }
       
 11459         
       
 11460     }/*function_lword_to_time*/
       
 11461     break;
       
 11462 
       
 11463 /****
       
 11464  *LWORD_TO_DATE
       
 11465  */
       
 11466     case function_lword_to_date :
       
 11467     {
       
 11468         symbol_c *last_type_symbol = NULL;
       
 11469 
       
 11470         {
       
 11471             identifier_c param_name("IN");
       
 11472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11480             
       
 11481             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11482             {
       
 11483         
       
 11484                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11485                 return return_type_symbol;
       
 11486                 
       
 11487             }
       
 11488             
       
 11489             ERROR;
       
 11490         }
       
 11491         
       
 11492     }/*function_lword_to_date*/
       
 11493     break;
       
 11494 
       
 11495 /****
       
 11496  *LWORD_TO_TOD
       
 11497  */
       
 11498     case function_lword_to_tod :
       
 11499     {
       
 11500         symbol_c *last_type_symbol = NULL;
       
 11501 
       
 11502         {
       
 11503             identifier_c param_name("IN");
       
 11504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11506             
       
 11507             /* Get the value from a foo(<param_value>) style call */
       
 11508             if (IN_param_value == NULL)
       
 11509               IN_param_value = function_call_param_iterator.next();
       
 11510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11512             
       
 11513             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11514             {
       
 11515         
       
 11516                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11517                 return return_type_symbol;
       
 11518                 
       
 11519             }
       
 11520             
       
 11521             ERROR;
       
 11522         }
       
 11523         
       
 11524     }/*function_lword_to_tod*/
       
 11525     break;
       
 11526 
       
 11527 /****
       
 11528  *LWORD_TO_DT
       
 11529  */
       
 11530     case function_lword_to_dt :
       
 11531     {
       
 11532         symbol_c *last_type_symbol = NULL;
       
 11533 
       
 11534         {
       
 11535             identifier_c param_name("IN");
       
 11536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11538             
       
 11539             /* Get the value from a foo(<param_value>) style call */
       
 11540             if (IN_param_value == NULL)
       
 11541               IN_param_value = function_call_param_iterator.next();
       
 11542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11544             
       
 11545             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11546             {
       
 11547         
       
 11548                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11549                 return return_type_symbol;
       
 11550                 
       
 11551             }
       
 11552             
       
 11553             ERROR;
       
 11554         }
       
 11555         
       
 11556     }/*function_lword_to_dt*/
       
 11557     break;
       
 11558 
       
 11559 /****
       
 11560  *LWORD_TO_STRING
       
 11561  */
       
 11562     case function_lword_to_string :
       
 11563     {
       
 11564         symbol_c *last_type_symbol = NULL;
       
 11565 
       
 11566         {
       
 11567             identifier_c param_name("IN");
       
 11568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11570             
       
 11571             /* Get the value from a foo(<param_value>) style call */
       
 11572             if (IN_param_value == NULL)
       
 11573               IN_param_value = function_call_param_iterator.next();
       
 11574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11576             
       
 11577             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11578             {
       
 11579         
       
 11580                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11581                 return return_type_symbol;
       
 11582                 
       
 11583             }
       
 11584             
       
 11585             ERROR;
       
 11586         }
       
 11587         
       
 11588     }/*function_lword_to_string*/
       
 11589     break;
       
 11590 
       
 11591 /****
       
 11592  *LWORD_TO_BYTE
       
 11593  */
       
 11594     case function_lword_to_byte :
       
 11595     {
       
 11596         symbol_c *last_type_symbol = NULL;
       
 11597 
       
 11598         {
       
 11599             identifier_c param_name("IN");
       
 11600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11602             
       
 11603             /* Get the value from a foo(<param_value>) style call */
       
 11604             if (IN_param_value == NULL)
       
 11605               IN_param_value = function_call_param_iterator.next();
       
 11606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11608             
       
 11609             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11610             {
       
 11611         
       
 11612                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11613                 return return_type_symbol;
       
 11614                 
       
 11615             }
       
 11616             
       
 11617             ERROR;
       
 11618         }
       
 11619         
       
 11620     }/*function_lword_to_byte*/
       
 11621     break;
       
 11622 
       
 11623 /****
       
 11624  *LWORD_TO_WORD
       
 11625  */
       
 11626     case function_lword_to_word :
       
 11627     {
       
 11628         symbol_c *last_type_symbol = NULL;
       
 11629 
       
 11630         {
       
 11631             identifier_c param_name("IN");
       
 11632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11634             
       
 11635             /* Get the value from a foo(<param_value>) style call */
       
 11636             if (IN_param_value == NULL)
       
 11637               IN_param_value = function_call_param_iterator.next();
       
 11638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11640             
       
 11641             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11642             {
       
 11643         
       
 11644                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11645                 return return_type_symbol;
       
 11646                 
       
 11647             }
       
 11648             
       
 11649             ERROR;
       
 11650         }
       
 11651         
       
 11652     }/*function_lword_to_word*/
       
 11653     break;
       
 11654 
       
 11655 /****
       
 11656  *LWORD_TO_DWORD
       
 11657  */
       
 11658     case function_lword_to_dword :
       
 11659     {
       
 11660         symbol_c *last_type_symbol = NULL;
       
 11661 
       
 11662         {
       
 11663             identifier_c param_name("IN");
       
 11664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11666             
       
 11667             /* Get the value from a foo(<param_value>) style call */
       
 11668             if (IN_param_value == NULL)
       
 11669               IN_param_value = function_call_param_iterator.next();
       
 11670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11672             
       
 11673             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11674             {
       
 11675         
       
 11676                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11677                 return return_type_symbol;
       
 11678                 
       
 11679             }
       
 11680             
       
 11681             ERROR;
       
 11682         }
       
 11683         
       
 11684     }/*function_lword_to_dword*/
       
 11685     break;
       
 11686 
       
 11687 /****
       
 11688  *TRUNC
       
 11689  */
       
 11690     case function_trunc :
       
 11691     {
       
 11692         symbol_c *last_type_symbol = NULL;
       
 11693 
       
 11694         {
       
 11695             identifier_c param_name("IN");
       
 11696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11698             
       
 11699             /* Get the value from a foo(<param_value>) style call */
       
 11700             if (IN_param_value == NULL)
       
 11701               IN_param_value = function_call_param_iterator.next();
       
 11702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11704             
       
 11705             if(search_expression_type->is_real_type(IN_type_symbol))
       
 11706             {
       
 11707         
       
 11708                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 11709                 return return_type_symbol;
       
 11710                 
       
 11711             }
       
 11712             
       
 11713             ERROR;
       
 11714         }
       
 11715         
       
 11716     }/*function_trunc*/
       
 11717     break;
       
 11718 
       
 11719 /****
       
 11720  *BCD_TO_USINT
       
 11721  */
       
 11722     case function_bcd_to_usint :
       
 11723     {
       
 11724         symbol_c *last_type_symbol = NULL;
       
 11725 
       
 11726         {
       
 11727             identifier_c param_name("IN");
       
 11728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11730             
       
 11731             /* Get the value from a foo(<param_value>) style call */
       
 11732             if (IN_param_value == NULL)
       
 11733               IN_param_value = function_call_param_iterator.next();
       
 11734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11736             
       
 11737             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 11738             {
       
 11739         
       
 11740                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11741                 return return_type_symbol;
       
 11742                 
       
 11743             }
       
 11744             
       
 11745             ERROR;
       
 11746         }
       
 11747         
       
 11748     }/*function_bcd_to_usint*/
       
 11749     break;
       
 11750 
       
 11751 /****
       
 11752  *BCD_TO_UINT
       
 11753  */
       
 11754     case function_bcd_to_uint :
       
 11755     {
       
 11756         symbol_c *last_type_symbol = NULL;
       
 11757 
       
 11758         {
       
 11759             identifier_c param_name("IN");
       
 11760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11768             
       
 11769             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 11770             {
       
 11771         
       
 11772                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11773                 return return_type_symbol;
       
 11774                 
       
 11775             }
       
 11776             
       
 11777             ERROR;
       
 11778         }
       
 11779         
       
 11780     }/*function_bcd_to_uint*/
       
 11781     break;
       
 11782 
       
 11783 /****
       
 11784  *BCD_TO_UDINT
       
 11785  */
       
 11786     case function_bcd_to_udint :
       
 11787     {
       
 11788         symbol_c *last_type_symbol = NULL;
       
 11789 
       
 11790         {
       
 11791             identifier_c param_name("IN");
       
 11792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11794             
       
 11795             /* Get the value from a foo(<param_value>) style call */
       
 11796             if (IN_param_value == NULL)
       
 11797               IN_param_value = function_call_param_iterator.next();
       
 11798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11800             
       
 11801             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 11802             {
       
 11803         
       
 11804                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11805                 return return_type_symbol;
       
 11806                 
       
 11807             }
       
 11808             
       
 11809             ERROR;
       
 11810         }
       
 11811         
       
 11812     }/*function_bcd_to_udint*/
       
 11813     break;
       
 11814 
       
 11815 /****
       
 11816  *BCD_TO_ULINT
       
 11817  */
       
 11818     case function_bcd_to_ulint :
       
 11819     {
       
 11820         symbol_c *last_type_symbol = NULL;
       
 11821 
       
 11822         {
       
 11823             identifier_c param_name("IN");
       
 11824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11826             
       
 11827             /* Get the value from a foo(<param_value>) style call */
       
 11828             if (IN_param_value == NULL)
       
 11829               IN_param_value = function_call_param_iterator.next();
       
 11830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11832             
       
 11833             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11834             {
       
 11835         
       
 11836                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11837                 return return_type_symbol;
       
 11838                 
       
 11839             }
       
 11840             
       
 11841             ERROR;
       
 11842         }
       
 11843         
       
 11844     }/*function_bcd_to_ulint*/
       
 11845     break;
       
 11846 
       
 11847 /****
       
 11848  *USINT_TO_BCD
       
 11849  */
       
 11850     case function_usint_to_bcd :
       
 11851     {
       
 11852         symbol_c *last_type_symbol = NULL;
       
 11853 
       
 11854         {
       
 11855             identifier_c param_name("IN");
       
 11856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11858             
       
 11859             /* Get the value from a foo(<param_value>) style call */
       
 11860             if (IN_param_value == NULL)
       
 11861               IN_param_value = function_call_param_iterator.next();
       
 11862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11864             
       
 11865             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 11866             {
       
 11867         
       
 11868                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 11869                 return return_type_symbol;
       
 11870                 
       
 11871             }
       
 11872             
       
 11873             ERROR;
       
 11874         }
       
 11875         
       
 11876     }/*function_usint_to_bcd*/
       
 11877     break;
       
 11878 
       
 11879 /****
       
 11880  *UINT_TO_BCD
       
 11881  */
       
 11882     case function_uint_to_bcd :
       
 11883     {
       
 11884         symbol_c *last_type_symbol = NULL;
       
 11885 
       
 11886         {
       
 11887             identifier_c param_name("IN");
       
 11888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11890             
       
 11891             /* Get the value from a foo(<param_value>) style call */
       
 11892             if (IN_param_value == NULL)
       
 11893               IN_param_value = function_call_param_iterator.next();
       
 11894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11896             
       
 11897             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 11898             {
       
 11899         
       
 11900                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 11901                 return return_type_symbol;
       
 11902                 
       
 11903             }
       
 11904             
       
 11905             ERROR;
       
 11906         }
       
 11907         
       
 11908     }/*function_uint_to_bcd*/
       
 11909     break;
       
 11910 
       
 11911 /****
       
 11912  *UDINT_TO_BCD
       
 11913  */
       
 11914     case function_udint_to_bcd :
       
 11915     {
       
 11916         symbol_c *last_type_symbol = NULL;
       
 11917 
       
 11918         {
       
 11919             identifier_c param_name("IN");
       
 11920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11922             
       
 11923             /* Get the value from a foo(<param_value>) style call */
       
 11924             if (IN_param_value == NULL)
       
 11925               IN_param_value = function_call_param_iterator.next();
       
 11926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11928             
       
 11929             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 11930             {
       
 11931         
       
 11932                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 11933                 return return_type_symbol;
       
 11934                 
       
 11935             }
       
 11936             
       
 11937             ERROR;
       
 11938         }
       
 11939         
       
 11940     }/*function_udint_to_bcd*/
       
 11941     break;
       
 11942 
       
 11943 /****
       
 11944  *ULINT_TO_BCD
       
 11945  */
       
 11946     case function_ulint_to_bcd :
       
 11947     {
       
 11948         symbol_c *last_type_symbol = NULL;
       
 11949 
       
 11950         {
       
 11951             identifier_c param_name("IN");
       
 11952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11954             
       
 11955             /* Get the value from a foo(<param_value>) style call */
       
 11956             if (IN_param_value == NULL)
       
 11957               IN_param_value = function_call_param_iterator.next();
       
 11958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11960             
       
 11961             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 11962             {
       
 11963         
       
 11964                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 11965                 return return_type_symbol;
       
 11966                 
       
 11967             }
       
 11968             
       
 11969             ERROR;
       
 11970         }
       
 11971         
       
 11972     }/*function_ulint_to_bcd*/
       
 11973     break;
       
 11974 
       
 11975 /****
       
 11976  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 11977  */
       
 11978     case function_date_and_time_to_time_of_day :
       
 11979     {
       
 11980         symbol_c *last_type_symbol = NULL;
       
 11981 
       
 11982         {
       
 11983             identifier_c param_name("IN");
       
 11984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11986             
       
 11987             /* Get the value from a foo(<param_value>) style call */
       
 11988             if (IN_param_value == NULL)
       
 11989               IN_param_value = function_call_param_iterator.next();
       
 11990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11992             
       
 11993             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 11994             {
       
 11995         
       
 11996                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11997                 return return_type_symbol;
       
 11998                 
       
 11999             }
       
 12000             
       
 12001             ERROR;
       
 12002         }
       
 12003         
       
 12004     }/*function_date_and_time_to_time_of_day*/
       
 12005     break;
       
 12006 
       
 12007 /****
       
 12008  *DATE_AND_TIME_TO_DATE
       
 12009  */
       
 12010     case function_date_and_time_to_date :
       
 12011     {
       
 12012         symbol_c *last_type_symbol = NULL;
       
 12013 
       
 12014         {
       
 12015             identifier_c param_name("IN");
       
 12016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12018             
       
 12019             /* Get the value from a foo(<param_value>) style call */
       
 12020             if (IN_param_value == NULL)
       
 12021               IN_param_value = function_call_param_iterator.next();
       
 12022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12024             
       
 12025             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 12026             {
       
 12027         
       
 12028                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 12029                 return return_type_symbol;
       
 12030                 
       
 12031             }
       
 12032             
       
 12033             ERROR;
       
 12034         }
       
 12035         
       
 12036     }/*function_date_and_time_to_date*/
       
 12037     break;
       
 12038 
       
 12039 /****
       
 12040  *ABS
       
 12041  */
       
 12042     case function_abs :
       
 12043     {
       
 12044         symbol_c *last_type_symbol = NULL;
       
 12045 
       
 12046         {
       
 12047             identifier_c param_name("IN");
       
 12048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12056             
       
 12057             if(search_expression_type->is_num_type(IN_type_symbol))
       
 12058             {
       
 12059         
       
 12060                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12061                 return return_type_symbol;
       
 12062                 
       
 12063             }
       
 12064             
       
 12065             ERROR;
       
 12066         }
       
 12067         
       
 12068     }/*function_abs*/
       
 12069     break;
       
 12070 
       
 12071 /****
       
 12072  *SQRT
       
 12073  */
       
 12074     case function_sqrt :
       
 12075     {
       
 12076         symbol_c *last_type_symbol = NULL;
       
 12077 
       
 12078         {
       
 12079             identifier_c param_name("IN");
       
 12080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12082             
       
 12083             /* Get the value from a foo(<param_value>) style call */
       
 12084             if (IN_param_value == NULL)
       
 12085               IN_param_value = function_call_param_iterator.next();
       
 12086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12088             
       
 12089             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12090             {
       
 12091         
       
 12092                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12093                 return return_type_symbol;
       
 12094                 
       
 12095             }
       
 12096             
       
 12097             ERROR;
       
 12098         }
       
 12099         
       
 12100     }/*function_sqrt*/
       
 12101     break;
       
 12102 
       
 12103 /****
       
 12104  *LN
       
 12105  */
       
 12106     case function_ln :
       
 12107     {
       
 12108         symbol_c *last_type_symbol = NULL;
       
 12109 
       
 12110         {
       
 12111             identifier_c param_name("IN");
       
 12112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12114             
       
 12115             /* Get the value from a foo(<param_value>) style call */
       
 12116             if (IN_param_value == NULL)
       
 12117               IN_param_value = function_call_param_iterator.next();
       
 12118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12120             
       
 12121             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12122             {
       
 12123         
       
 12124                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12125                 return return_type_symbol;
       
 12126                 
       
 12127             }
       
 12128             
       
 12129             ERROR;
       
 12130         }
       
 12131         
       
 12132     }/*function_ln*/
       
 12133     break;
       
 12134 
       
 12135 /****
       
 12136  *LOG
       
 12137  */
       
 12138     case function_log :
       
 12139     {
       
 12140         symbol_c *last_type_symbol = NULL;
       
 12141 
       
 12142         {
       
 12143             identifier_c param_name("IN");
       
 12144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12146             
       
 12147             /* Get the value from a foo(<param_value>) style call */
       
 12148             if (IN_param_value == NULL)
       
 12149               IN_param_value = function_call_param_iterator.next();
       
 12150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12152             
       
 12153             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12154             {
       
 12155         
       
 12156                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12157                 return return_type_symbol;
       
 12158                 
       
 12159             }
       
 12160             
       
 12161             ERROR;
       
 12162         }
       
 12163         
       
 12164     }/*function_log*/
       
 12165     break;
       
 12166 
       
 12167 /****
       
 12168  *EXP
       
 12169  */
       
 12170     case function_exp :
       
 12171     {
       
 12172         symbol_c *last_type_symbol = NULL;
       
 12173 
       
 12174         {
       
 12175             identifier_c param_name("IN");
       
 12176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12178             
       
 12179             /* Get the value from a foo(<param_value>) style call */
       
 12180             if (IN_param_value == NULL)
       
 12181               IN_param_value = function_call_param_iterator.next();
       
 12182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12184             
       
 12185             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12186             {
       
 12187         
       
 12188                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12189                 return return_type_symbol;
       
 12190                 
       
 12191             }
       
 12192             
       
 12193             ERROR;
       
 12194         }
       
 12195         
       
 12196     }/*function_exp*/
       
 12197     break;
       
 12198 
       
 12199 /****
       
 12200  *SIN
       
 12201  */
       
 12202     case function_sin :
       
 12203     {
       
 12204         symbol_c *last_type_symbol = NULL;
       
 12205 
       
 12206         {
       
 12207             identifier_c param_name("IN");
       
 12208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12210             
       
 12211             /* Get the value from a foo(<param_value>) style call */
       
 12212             if (IN_param_value == NULL)
       
 12213               IN_param_value = function_call_param_iterator.next();
       
 12214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12216             
       
 12217             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12218             {
       
 12219         
       
 12220                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12221                 return return_type_symbol;
       
 12222                 
       
 12223             }
       
 12224             
       
 12225             ERROR;
       
 12226         }
       
 12227         
       
 12228     }/*function_sin*/
       
 12229     break;
       
 12230 
       
 12231 /****
       
 12232  *COS
       
 12233  */
       
 12234     case function_cos :
       
 12235     {
       
 12236         symbol_c *last_type_symbol = NULL;
       
 12237 
       
 12238         {
       
 12239             identifier_c param_name("IN");
       
 12240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12242             
       
 12243             /* Get the value from a foo(<param_value>) style call */
       
 12244             if (IN_param_value == NULL)
       
 12245               IN_param_value = function_call_param_iterator.next();
       
 12246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12248             
       
 12249             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12250             {
       
 12251         
       
 12252                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12253                 return return_type_symbol;
       
 12254                 
       
 12255             }
       
 12256             
       
 12257             ERROR;
       
 12258         }
       
 12259         
       
 12260     }/*function_cos*/
       
 12261     break;
       
 12262 
       
 12263 /****
       
 12264  *TAN
       
 12265  */
       
 12266     case function_tan :
       
 12267     {
       
 12268         symbol_c *last_type_symbol = NULL;
       
 12269 
       
 12270         {
       
 12271             identifier_c param_name("IN");
       
 12272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12274             
       
 12275             /* Get the value from a foo(<param_value>) style call */
       
 12276             if (IN_param_value == NULL)
       
 12277               IN_param_value = function_call_param_iterator.next();
       
 12278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12280             
       
 12281             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12282             {
       
 12283         
       
 12284                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12285                 return return_type_symbol;
       
 12286                 
       
 12287             }
       
 12288             
       
 12289             ERROR;
       
 12290         }
       
 12291         
       
 12292     }/*function_tan*/
       
 12293     break;
       
 12294 
       
 12295 /****
       
 12296  *ASIN
       
 12297  */
       
 12298     case function_asin :
       
 12299     {
       
 12300         symbol_c *last_type_symbol = NULL;
       
 12301 
       
 12302         {
       
 12303             identifier_c param_name("IN");
       
 12304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12306             
       
 12307             /* Get the value from a foo(<param_value>) style call */
       
 12308             if (IN_param_value == NULL)
       
 12309               IN_param_value = function_call_param_iterator.next();
       
 12310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12312             
       
 12313             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12314             {
       
 12315         
       
 12316                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12317                 return return_type_symbol;
       
 12318                 
       
 12319             }
       
 12320             
       
 12321             ERROR;
       
 12322         }
       
 12323         
       
 12324     }/*function_asin*/
       
 12325     break;
       
 12326 
       
 12327 /****
       
 12328  *ACOS
       
 12329  */
       
 12330     case function_acos :
       
 12331     {
       
 12332         symbol_c *last_type_symbol = NULL;
       
 12333 
       
 12334         {
       
 12335             identifier_c param_name("IN");
       
 12336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 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             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12344             
       
 12345             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12346             {
       
 12347         
       
 12348                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12349                 return return_type_symbol;
       
 12350                 
       
 12351             }
       
 12352             
       
 12353             ERROR;
       
 12354         }
       
 12355         
       
 12356     }/*function_acos*/
       
 12357     break;
       
 12358 
       
 12359 /****
       
 12360  *ATAN
       
 12361  */
       
 12362     case function_atan :
       
 12363     {
       
 12364         symbol_c *last_type_symbol = NULL;
       
 12365 
       
 12366         {
       
 12367             identifier_c param_name("IN");
       
 12368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12370             
       
 12371             /* Get the value from a foo(<param_value>) style call */
       
 12372             if (IN_param_value == NULL)
       
 12373               IN_param_value = function_call_param_iterator.next();
       
 12374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12376             
       
 12377             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12378             {
       
 12379         
       
 12380                 symbol_c * return_type_symbol = IN_type_symbol;
       
 12381                 return return_type_symbol;
       
 12382                 
       
 12383             }
       
 12384             
       
 12385             ERROR;
       
 12386         }
       
 12387         
       
 12388     }/*function_atan*/
       
 12389     break;
       
 12390 
       
 12391 /****
       
 12392  *ADD
       
 12393  */
       
 12394     case function_add :
       
 12395     {
       
 12396         symbol_c *last_type_symbol = NULL;
       
 12397 
       
 12398         {
       
 12399             identifier_c param_name("IN1");
       
 12400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12401             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 12402             
       
 12403             /* Get the value from a foo(<param_value>) style call */
       
 12404             if (IN1_param_value == NULL)
       
 12405               IN1_param_value = function_call_param_iterator.next();
       
 12406             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 12407             last_type_symbol = last_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 ;
       
 12408             
       
 12409             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 12410             {
       
 12411         
       
 12412                 {
       
 12413                     identifier_c param_name("IN2");
       
 12414                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12415                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12416                     
       
 12417                     /* Get the value from a foo(<param_value>) style call */
       
 12418                     if (IN2_param_value == NULL)
       
 12419                       IN2_param_value = function_call_param_iterator.next();
       
 12420                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12421                     last_type_symbol = last_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 ;
       
 12422                     
       
 12423                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 12424                     {
       
 12425                 
       
 12426                         symbol_c * return_type_symbol = last_type_symbol;
       
 12427                         return return_type_symbol;
       
 12428                         
       
 12429                     }
       
 12430                     
       
 12431                     ERROR;
       
 12432                 }
       
 12433                 
       
 12434             }
       
 12435             
       
 12436             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 12437             {
       
 12438         
       
 12439                 {
       
 12440                     identifier_c param_name("IN2");
       
 12441                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12442                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12443                     
       
 12444                     /* Get the value from a foo(<param_value>) style call */
       
 12445                     if (IN2_param_value == NULL)
       
 12446                       IN2_param_value = function_call_param_iterator.next();
       
 12447                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12448                     last_type_symbol = last_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 ;
       
 12449                     
       
 12450                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12451                     {
       
 12452                 
       
 12453                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12454                         return return_type_symbol;
       
 12455                         
       
 12456                     }
       
 12457                     
       
 12458                     ERROR;
       
 12459                 }
       
 12460                 
       
 12461             }
       
 12462             
       
 12463             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 12464             {
       
 12465         
       
 12466                 {
       
 12467                     identifier_c param_name("IN2");
       
 12468                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12469                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12470                     
       
 12471                     /* Get the value from a foo(<param_value>) style call */
       
 12472                     if (IN2_param_value == NULL)
       
 12473                       IN2_param_value = function_call_param_iterator.next();
       
 12474                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12475                     last_type_symbol = last_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 ;
       
 12476                     
       
 12477                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12478                     {
       
 12479                 
       
 12480                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12481                         return return_type_symbol;
       
 12482                         
       
 12483                     }
       
 12484                     
       
 12485                     ERROR;
       
 12486                 }
       
 12487                 
       
 12488             }
       
 12489             
       
 12490             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12491             {
       
 12492         
       
 12493                 {
       
 12494                     identifier_c param_name("IN2");
       
 12495                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12496                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12497                     
       
 12498                     /* Get the value from a foo(<param_value>) style call */
       
 12499                     if (IN2_param_value == NULL)
       
 12500                       IN2_param_value = function_call_param_iterator.next();
       
 12501                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12502                     last_type_symbol = last_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 ;
       
 12503                     
       
 12504                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12505                     {
       
 12506                 
       
 12507                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12508                         return return_type_symbol;
       
 12509                         
       
 12510                     }
       
 12511                     
       
 12512                     ERROR;
       
 12513                 }
       
 12514                 
       
 12515             }
       
 12516             
       
 12517             ERROR;
       
 12518         }
       
 12519         
       
 12520     }/*function_add*/
       
 12521     break;
       
 12522 
       
 12523 /****
       
 12524  *MUL
       
 12525  */
       
 12526     case function_mul :
       
 12527     {
       
 12528         symbol_c *last_type_symbol = NULL;
       
 12529 
       
 12530         {
       
 12531             identifier_c param_name("IN1");
       
 12532             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12533             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 12534             
       
 12535             /* Get the value from a foo(<param_value>) style call */
       
 12536             if (IN1_param_value == NULL)
       
 12537               IN1_param_value = function_call_param_iterator.next();
       
 12538             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 12539             last_type_symbol = last_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 ;
       
 12540             
       
 12541             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 12542             {
       
 12543         
       
 12544                 {
       
 12545                     identifier_c param_name("IN2");
       
 12546                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12547                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12548                     
       
 12549                     /* Get the value from a foo(<param_value>) style call */
       
 12550                     if (IN2_param_value == NULL)
       
 12551                       IN2_param_value = function_call_param_iterator.next();
       
 12552                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12553                     last_type_symbol = last_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 ;
       
 12554                     
       
 12555                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 12556                     {
       
 12557                 
       
 12558                         symbol_c * return_type_symbol = last_type_symbol;
       
 12559                         return return_type_symbol;
       
 12560                         
       
 12561                     }
       
 12562                     
       
 12563                     ERROR;
       
 12564                 }
       
 12565                 
       
 12566             }
       
 12567             
       
 12568             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12569             {
       
 12570         
       
 12571                 {
       
 12572                     identifier_c param_name("IN2");
       
 12573                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12574                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12575                     
       
 12576                     /* Get the value from a foo(<param_value>) style call */
       
 12577                     if (IN2_param_value == NULL)
       
 12578                       IN2_param_value = function_call_param_iterator.next();
       
 12579                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12580                     last_type_symbol = last_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 ;
       
 12581                     
       
 12582                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 12583                     {
       
 12584                 
       
 12585                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12586                         return return_type_symbol;
       
 12587                         
       
 12588                     }
       
 12589                     
       
 12590                     ERROR;
       
 12591                 }
       
 12592                 
       
 12593             }
       
 12594             
       
 12595             ERROR;
       
 12596         }
       
 12597         
       
 12598     }/*function_mul*/
       
 12599     break;
       
 12600 
       
 12601 /****
       
 12602  *SUB
       
 12603  */
       
 12604     case function_sub :
       
 12605     {
       
 12606         symbol_c *last_type_symbol = NULL;
       
 12607 
       
 12608         {
       
 12609             identifier_c param_name("IN1");
       
 12610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12611             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 12612             
       
 12613             /* Get the value from a foo(<param_value>) style call */
       
 12614             if (IN1_param_value == NULL)
       
 12615               IN1_param_value = function_call_param_iterator.next();
       
 12616             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 12617             last_type_symbol = last_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 ;
       
 12618             
       
 12619             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 12620             {
       
 12621         
       
 12622                 {
       
 12623                     identifier_c param_name("IN2");
       
 12624                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12625                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12626                     
       
 12627                     /* Get the value from a foo(<param_value>) style call */
       
 12628                     if (IN2_param_value == NULL)
       
 12629                       IN2_param_value = function_call_param_iterator.next();
       
 12630                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12631                     last_type_symbol = last_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 ;
       
 12632                     
       
 12633                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 12634                     {
       
 12635                 
       
 12636                         symbol_c * return_type_symbol = last_type_symbol;
       
 12637                         return return_type_symbol;
       
 12638                         
       
 12639                     }
       
 12640                     
       
 12641                     ERROR;
       
 12642                 }
       
 12643                 
       
 12644             }
       
 12645             
       
 12646             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 12647             {
       
 12648         
       
 12649                 {
       
 12650                     identifier_c param_name("IN2");
       
 12651                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12652                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12653                     
       
 12654                     /* Get the value from a foo(<param_value>) style call */
       
 12655                     if (IN2_param_value == NULL)
       
 12656                       IN2_param_value = function_call_param_iterator.next();
       
 12657                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12658                     last_type_symbol = last_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 ;
       
 12659                     
       
 12660                     if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 12661                     {
       
 12662                 
       
 12663                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12664                         return return_type_symbol;
       
 12665                         
       
 12666                     }
       
 12667                     
       
 12668                     ERROR;
       
 12669                 }
       
 12670                 
       
 12671             }
       
 12672             
       
 12673             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 12674             {
       
 12675         
       
 12676                 {
       
 12677                     identifier_c param_name("IN2");
       
 12678                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12679                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12680                     
       
 12681                     /* Get the value from a foo(<param_value>) style call */
       
 12682                     if (IN2_param_value == NULL)
       
 12683                       IN2_param_value = function_call_param_iterator.next();
       
 12684                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12685                     last_type_symbol = last_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 ;
       
 12686                     
       
 12687                     if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 12688                     {
       
 12689                 
       
 12690                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12691                         return return_type_symbol;
       
 12692                         
       
 12693                     }
       
 12694                     
       
 12695                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12696                     {
       
 12697                 
       
 12698                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 12699                         return return_type_symbol;
       
 12700                         
       
 12701                     }
       
 12702                     
       
 12703                     ERROR;
       
 12704                 }
       
 12705                 
       
 12706             }
       
 12707             
       
 12708             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 12709             {
       
 12710         
       
 12711                 {
       
 12712                     identifier_c param_name("IN2");
       
 12713                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12714                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12715                     
       
 12716                     /* Get the value from a foo(<param_value>) style call */
       
 12717                     if (IN2_param_value == NULL)
       
 12718                       IN2_param_value = function_call_param_iterator.next();
       
 12719                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12720                     last_type_symbol = last_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 ;
       
 12721                     
       
 12722                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 12723                     {
       
 12724                 
       
 12725                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12726                         return return_type_symbol;
       
 12727                         
       
 12728                     }
       
 12729                     
       
 12730                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12731                     {
       
 12732                 
       
 12733                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12734                         return return_type_symbol;
       
 12735                         
       
 12736                     }
       
 12737                     
       
 12738                     ERROR;
       
 12739                 }
       
 12740                 
       
 12741             }
       
 12742             
       
 12743             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12744             {
       
 12745         
       
 12746                 {
       
 12747                     identifier_c param_name("IN2");
       
 12748                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12749                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12750                     
       
 12751                     /* Get the value from a foo(<param_value>) style call */
       
 12752                     if (IN2_param_value == NULL)
       
 12753                       IN2_param_value = function_call_param_iterator.next();
       
 12754                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12755                     last_type_symbol = last_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 ;
       
 12756                     
       
 12757                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12758                     {
       
 12759                 
       
 12760                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12761                         return return_type_symbol;
       
 12762                         
       
 12763                     }
       
 12764                     
       
 12765                     ERROR;
       
 12766                 }
       
 12767                 
       
 12768             }
       
 12769             
       
 12770             ERROR;
       
 12771         }
       
 12772         
       
 12773     }/*function_sub*/
       
 12774     break;
       
 12775 
       
 12776 /****
       
 12777  *DIV
       
 12778  */
       
 12779     case function_div :
       
 12780     {
       
 12781         symbol_c *last_type_symbol = NULL;
       
 12782 
       
 12783         {
       
 12784             identifier_c param_name("IN1");
       
 12785             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12786             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 12787             
       
 12788             /* Get the value from a foo(<param_value>) style call */
       
 12789             if (IN1_param_value == NULL)
       
 12790               IN1_param_value = function_call_param_iterator.next();
       
 12791             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 12792             last_type_symbol = last_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 ;
       
 12793             
       
 12794             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 12795             {
       
 12796         
       
 12797                 {
       
 12798                     identifier_c param_name("IN2");
       
 12799                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12800                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12801                     
       
 12802                     /* Get the value from a foo(<param_value>) style call */
       
 12803                     if (IN2_param_value == NULL)
       
 12804                       IN2_param_value = function_call_param_iterator.next();
       
 12805                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12806                     last_type_symbol = last_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 ;
       
 12807                     
       
 12808                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 12809                     {
       
 12810                 
       
 12811                         symbol_c * return_type_symbol = last_type_symbol;
       
 12812                         return return_type_symbol;
       
 12813                         
       
 12814                     }
       
 12815                     
       
 12816                     ERROR;
       
 12817                 }
       
 12818                 
       
 12819             }
       
 12820             
       
 12821             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 12822             {
       
 12823         
       
 12824                 {
       
 12825                     identifier_c param_name("IN2");
       
 12826                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12827                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12828                     
       
 12829                     /* Get the value from a foo(<param_value>) style call */
       
 12830                     if (IN2_param_value == NULL)
       
 12831                       IN2_param_value = function_call_param_iterator.next();
       
 12832                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12833                     last_type_symbol = last_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 ;
       
 12834                     
       
 12835                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 12836                     {
       
 12837                 
       
 12838                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12839                         return return_type_symbol;
       
 12840                         
       
 12841                     }
       
 12842                     
       
 12843                     ERROR;
       
 12844                 }
       
 12845                 
       
 12846             }
       
 12847             
       
 12848             ERROR;
       
 12849         }
       
 12850         
       
 12851     }/*function_div*/
       
 12852     break;
       
 12853 
       
 12854 /****
       
 12855  *MOD
       
 12856  */
       
 12857     case function_mod :
       
 12858     {
       
 12859         symbol_c *last_type_symbol = NULL;
       
 12860 
       
 12861         {
       
 12862             identifier_c param_name("IN1");
       
 12863             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12864             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 12865             
       
 12866             /* Get the value from a foo(<param_value>) style call */
       
 12867             if (IN1_param_value == NULL)
       
 12868               IN1_param_value = function_call_param_iterator.next();
       
 12869             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 12870             last_type_symbol = last_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 ;
       
 12871             
       
 12872             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 12873             {
       
 12874         
       
 12875                 {
       
 12876                     identifier_c param_name("IN2");
       
 12877                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12878                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12879                     
       
 12880                     /* Get the value from a foo(<param_value>) style call */
       
 12881                     if (IN2_param_value == NULL)
       
 12882                       IN2_param_value = function_call_param_iterator.next();
       
 12883                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12884                     last_type_symbol = last_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 ;
       
 12885                     
       
 12886                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 12887                     {
       
 12888                 
       
 12889                         symbol_c * return_type_symbol = last_type_symbol;
       
 12890                         return return_type_symbol;
       
 12891                         
       
 12892                     }
       
 12893                     
       
 12894                     ERROR;
       
 12895                 }
       
 12896                 
       
 12897             }
       
 12898             
       
 12899             ERROR;
       
 12900         }
       
 12901         
       
 12902     }/*function_mod*/
       
 12903     break;
       
 12904 
       
 12905 /****
       
 12906  *EXPT
       
 12907  */
       
 12908     case function_expt :
       
 12909     {
       
 12910         symbol_c *last_type_symbol = NULL;
       
 12911 
       
 12912         {
       
 12913             identifier_c param_name("IN1");
       
 12914             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12915             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 12916             
       
 12917             /* Get the value from a foo(<param_value>) style call */
       
 12918             if (IN1_param_value == NULL)
       
 12919               IN1_param_value = function_call_param_iterator.next();
       
 12920             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 12921             last_type_symbol = last_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 ;
       
 12922             
       
 12923             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 12924             {
       
 12925         
       
 12926                 {
       
 12927                     identifier_c param_name("IN2");
       
 12928                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12929                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 12930                     
       
 12931                     /* Get the value from a foo(<param_value>) style call */
       
 12932                     if (IN2_param_value == NULL)
       
 12933                       IN2_param_value = function_call_param_iterator.next();
       
 12934                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 12935                     last_type_symbol = last_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 ;
       
 12936                     
       
 12937                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 12938                     {
       
 12939                 
       
 12940                         symbol_c * return_type_symbol = last_type_symbol;
       
 12941                         return return_type_symbol;
       
 12942                         
       
 12943                     }
       
 12944                     
       
 12945                     ERROR;
       
 12946                 }
       
 12947                 
       
 12948             }
       
 12949             
       
 12950             ERROR;
       
 12951         }
       
 12952         
       
 12953     }/*function_expt*/
       
 12954     break;
       
 12955 
       
 12956 /****
       
 12957  *MOVE
       
 12958  */
       
 12959     case function_move :
       
 12960     {
       
 12961         symbol_c *last_type_symbol = NULL;
       
 12962 
       
 12963         {
       
 12964             identifier_c param_name("IN");
       
 12965             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12966             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12967             
       
 12968             /* Get the value from a foo(<param_value>) style call */
       
 12969             if (IN_param_value == NULL)
       
 12970               IN_param_value = function_call_param_iterator.next();
       
 12971             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12972             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12973             
       
 12974             if(search_expression_type->is_num_type(IN_type_symbol))
       
 12975             {
       
 12976         
       
 12977                 symbol_c * return_type_symbol = last_type_symbol;
       
 12978                 return return_type_symbol;
       
 12979                 
       
 12980             }
       
 12981             
       
 12982             ERROR;
       
 12983         }
       
 12984         
       
 12985     }/*function_move*/
       
 12986     break;
       
 12987 
       
 12988 /****
       
 12989  *SHL
       
 12990  */
       
 12991     case function_shl :
       
 12992     {
       
 12993         symbol_c *last_type_symbol = NULL;
       
 12994 
       
 12995         {
       
 12996             identifier_c param_name("IN");
       
 12997             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12998             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12999             
       
 13000             /* Get the value from a foo(<param_value>) style call */
       
 13001             if (IN_param_value == NULL)
       
 13002               IN_param_value = function_call_param_iterator.next();
       
 13003             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13004             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13005             
       
 13006             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13007             {
       
 13008         
       
 13009                 {
       
 13010                     identifier_c param_name("N");
       
 13011                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13012                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 13013                     
       
 13014                     /* Get the value from a foo(<param_value>) style call */
       
 13015                     if (N_param_value == NULL)
       
 13016                       N_param_value = function_call_param_iterator.next();
       
 13017                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 13018                     last_type_symbol = last_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 ;
       
 13019                     
       
 13020                     if(search_expression_type->is_integer_type(N_type_symbol))
       
 13021                     {
       
 13022                 
       
 13023                         symbol_c * return_type_symbol = IN_type_symbol;
       
 13024                         return return_type_symbol;
       
 13025                         
       
 13026                     }
       
 13027                     
       
 13028                     ERROR;
       
 13029                 }
       
 13030                 
       
 13031             }
       
 13032             
       
 13033             ERROR;
       
 13034         }
       
 13035         
       
 13036     }/*function_shl*/
       
 13037     break;
       
 13038 
       
 13039 /****
       
 13040  *SHR
       
 13041  */
       
 13042     case function_shr :
       
 13043     {
       
 13044         symbol_c *last_type_symbol = NULL;
       
 13045 
       
 13046         {
       
 13047             identifier_c param_name("IN");
       
 13048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13050             
       
 13051             /* Get the value from a foo(<param_value>) style call */
       
 13052             if (IN_param_value == NULL)
       
 13053               IN_param_value = function_call_param_iterator.next();
       
 13054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13056             
       
 13057             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13058             {
       
 13059         
       
 13060                 {
       
 13061                     identifier_c param_name("N");
       
 13062                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13063                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 13064                     
       
 13065                     /* Get the value from a foo(<param_value>) style call */
       
 13066                     if (N_param_value == NULL)
       
 13067                       N_param_value = function_call_param_iterator.next();
       
 13068                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 13069                     last_type_symbol = last_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 ;
       
 13070                     
       
 13071                     if(search_expression_type->is_integer_type(N_type_symbol))
       
 13072                     {
       
 13073                 
       
 13074                         symbol_c * return_type_symbol = IN_type_symbol;
       
 13075                         return return_type_symbol;
       
 13076                         
       
 13077                     }
       
 13078                     
       
 13079                     ERROR;
       
 13080                 }
       
 13081                 
       
 13082             }
       
 13083             
       
 13084             ERROR;
       
 13085         }
       
 13086         
       
 13087     }/*function_shr*/
       
 13088     break;
       
 13089 
       
 13090 /****
       
 13091  *ROR
       
 13092  */
       
 13093     case function_ror :
       
 13094     {
       
 13095         symbol_c *last_type_symbol = NULL;
       
 13096 
       
 13097         {
       
 13098             identifier_c param_name("IN");
       
 13099             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13100             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13101             
       
 13102             /* Get the value from a foo(<param_value>) style call */
       
 13103             if (IN_param_value == NULL)
       
 13104               IN_param_value = function_call_param_iterator.next();
       
 13105             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13106             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13107             
       
 13108             if(search_expression_type->is_nbinary_type(IN_type_symbol))
       
 13109             {
       
 13110         
       
 13111                 {
       
 13112                     identifier_c param_name("N");
       
 13113                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13114                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 13115                     
       
 13116                     /* Get the value from a foo(<param_value>) style call */
       
 13117                     if (N_param_value == NULL)
       
 13118                       N_param_value = function_call_param_iterator.next();
       
 13119                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 13120                     last_type_symbol = last_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 ;
       
 13121                     
       
 13122                     if(search_expression_type->is_integer_type(N_type_symbol))
       
 13123                     {
       
 13124                 
       
 13125                         symbol_c * return_type_symbol = IN_type_symbol;
       
 13126                         return return_type_symbol;
       
 13127                         
       
 13128                     }
       
 13129                     
       
 13130                     ERROR;
       
 13131                 }
       
 13132                 
       
 13133             }
       
 13134             
       
 13135             ERROR;
       
 13136         }
       
 13137         
       
 13138     }/*function_ror*/
       
 13139     break;
       
 13140 
       
 13141 /****
       
 13142  *ROL
       
 13143  */
       
 13144     case function_rol :
       
 13145     {
       
 13146         symbol_c *last_type_symbol = NULL;
       
 13147 
       
 13148         {
       
 13149             identifier_c param_name("IN");
       
 13150             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13151             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13152             
       
 13153             /* Get the value from a foo(<param_value>) style call */
       
 13154             if (IN_param_value == NULL)
       
 13155               IN_param_value = function_call_param_iterator.next();
       
 13156             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13157             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13158             
       
 13159             if(search_expression_type->is_nbinary_type(IN_type_symbol))
       
 13160             {
       
 13161         
       
 13162                 {
       
 13163                     identifier_c param_name("N");
       
 13164                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13165                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 13166                     
       
 13167                     /* Get the value from a foo(<param_value>) style call */
       
 13168                     if (N_param_value == NULL)
       
 13169                       N_param_value = function_call_param_iterator.next();
       
 13170                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 13171                     last_type_symbol = last_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 ;
       
 13172                     
       
 13173                     if(search_expression_type->is_integer_type(N_type_symbol))
       
 13174                     {
       
 13175                 
       
 13176                         symbol_c * return_type_symbol = IN_type_symbol;
       
 13177                         return return_type_symbol;
       
 13178                         
       
 13179                     }
       
 13180                     
       
 13181                     ERROR;
       
 13182                 }
       
 13183                 
       
 13184             }
       
 13185             
       
 13186             ERROR;
       
 13187         }
       
 13188         
       
 13189     }/*function_rol*/
       
 13190     break;
       
 13191 
       
 13192 /****
       
 13193  *AND
       
 13194  */
       
 13195     case function_and :
       
 13196     {
       
 13197         symbol_c *last_type_symbol = NULL;
       
 13198 
       
 13199         {
       
 13200             identifier_c param_name("IN1");
       
 13201             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13202             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13203             
       
 13204             /* Get the value from a foo(<param_value>) style call */
       
 13205             if (IN1_param_value == NULL)
       
 13206               IN1_param_value = function_call_param_iterator.next();
       
 13207             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13208             last_type_symbol = last_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 ;
       
 13209             
       
 13210             if(search_expression_type->is_binary_type(IN1_type_symbol))
       
 13211             {
       
 13212         
       
 13213                 {
       
 13214                     identifier_c param_name("IN2");
       
 13215                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13216                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13217                     
       
 13218                     /* Get the value from a foo(<param_value>) style call */
       
 13219                     if (IN2_param_value == NULL)
       
 13220                       IN2_param_value = function_call_param_iterator.next();
       
 13221                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13222                     last_type_symbol = last_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 ;
       
 13223                     
       
 13224                     if(search_expression_type->is_binary_type(IN2_type_symbol))
       
 13225                     {
       
 13226                 
       
 13227                         symbol_c * return_type_symbol = last_type_symbol;
       
 13228                         return return_type_symbol;
       
 13229                         
       
 13230                     }
       
 13231                     
       
 13232                     ERROR;
       
 13233                 }
       
 13234                 
       
 13235             }
       
 13236             
       
 13237             ERROR;
       
 13238         }
       
 13239         
       
 13240     }/*function_and*/
       
 13241     break;
       
 13242 
       
 13243 /****
       
 13244  *OR
       
 13245  */
       
 13246     case function_or :
       
 13247     {
       
 13248         symbol_c *last_type_symbol = NULL;
       
 13249 
       
 13250         {
       
 13251             identifier_c param_name("IN1");
       
 13252             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13253             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13254             
       
 13255             /* Get the value from a foo(<param_value>) style call */
       
 13256             if (IN1_param_value == NULL)
       
 13257               IN1_param_value = function_call_param_iterator.next();
       
 13258             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13259             last_type_symbol = last_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 ;
       
 13260             
       
 13261             if(search_expression_type->is_binary_type(IN1_type_symbol))
       
 13262             {
       
 13263         
       
 13264                 {
       
 13265                     identifier_c param_name("IN2");
       
 13266                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13267                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13268                     
       
 13269                     /* Get the value from a foo(<param_value>) style call */
       
 13270                     if (IN2_param_value == NULL)
       
 13271                       IN2_param_value = function_call_param_iterator.next();
       
 13272                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13273                     last_type_symbol = last_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 ;
       
 13274                     
       
 13275                     if(search_expression_type->is_binary_type(IN2_type_symbol))
       
 13276                     {
       
 13277                 
       
 13278                         symbol_c * return_type_symbol = last_type_symbol;
       
 13279                         return return_type_symbol;
       
 13280                         
       
 13281                     }
       
 13282                     
       
 13283                     ERROR;
       
 13284                 }
       
 13285                 
       
 13286             }
       
 13287             
       
 13288             ERROR;
       
 13289         }
       
 13290         
       
 13291     }/*function_or*/
       
 13292     break;
       
 13293 
       
 13294 /****
       
 13295  *XOR
       
 13296  */
       
 13297     case function_xor :
       
 13298     {
       
 13299         symbol_c *last_type_symbol = NULL;
       
 13300 
       
 13301         {
       
 13302             identifier_c param_name("IN1");
       
 13303             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13304             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13305             
       
 13306             /* Get the value from a foo(<param_value>) style call */
       
 13307             if (IN1_param_value == NULL)
       
 13308               IN1_param_value = function_call_param_iterator.next();
       
 13309             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13310             last_type_symbol = last_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 ;
       
 13311             
       
 13312             if(search_expression_type->is_binary_type(IN1_type_symbol))
       
 13313             {
       
 13314         
       
 13315                 {
       
 13316                     identifier_c param_name("IN2");
       
 13317                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13318                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13319                     
       
 13320                     /* Get the value from a foo(<param_value>) style call */
       
 13321                     if (IN2_param_value == NULL)
       
 13322                       IN2_param_value = function_call_param_iterator.next();
       
 13323                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13324                     last_type_symbol = last_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 ;
       
 13325                     
       
 13326                     if(search_expression_type->is_binary_type(IN2_type_symbol))
       
 13327                     {
       
 13328                 
       
 13329                         symbol_c * return_type_symbol = last_type_symbol;
       
 13330                         return return_type_symbol;
       
 13331                         
       
 13332                     }
       
 13333                     
       
 13334                     ERROR;
       
 13335                 }
       
 13336                 
       
 13337             }
       
 13338             
       
 13339             ERROR;
       
 13340         }
       
 13341         
       
 13342     }/*function_xor*/
       
 13343     break;
       
 13344 
       
 13345 /****
       
 13346  *NOT
       
 13347  */
       
 13348     case function_not :
       
 13349     {
       
 13350         symbol_c *last_type_symbol = NULL;
       
 13351 
       
 13352         {
       
 13353             identifier_c param_name("IN");
       
 13354             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13355             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13356             
       
 13357             /* Get the value from a foo(<param_value>) style call */
       
 13358             if (IN_param_value == NULL)
       
 13359               IN_param_value = function_call_param_iterator.next();
       
 13360             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13361             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13362             
       
 13363             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 13364             {
       
 13365         
       
 13366                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13367                 return return_type_symbol;
       
 13368                 
       
 13369             }
       
 13370             
       
 13371             ERROR;
       
 13372         }
       
 13373         
       
 13374     }/*function_not*/
       
 13375     break;
       
 13376 
       
 13377 /****
       
 13378  *SEL
       
 13379  */
       
 13380     case function_sel :
       
 13381     {
       
 13382         symbol_c *last_type_symbol = NULL;
       
 13383 
       
 13384         {
       
 13385             identifier_c param_name("G");
       
 13386             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13387             symbol_c *G_param_value = function_call_param_iterator.search(&param_name);
       
 13388             
       
 13389             /* Get the value from a foo(<param_value>) style call */
       
 13390             if (G_param_value == NULL)
       
 13391               G_param_value = function_call_param_iterator.next();
       
 13392             symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
       
 13393             last_type_symbol = last_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 ;
       
 13394             
       
 13395             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 13396             {
       
 13397         
       
 13398                 {
       
 13399                     identifier_c param_name("IN0");
       
 13400                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13401                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 13402                     
       
 13403                     /* Get the value from a foo(<param_value>) style call */
       
 13404                     if (IN0_param_value == NULL)
       
 13405                       IN0_param_value = function_call_param_iterator.next();
       
 13406                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 13407                     last_type_symbol = last_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 ;
       
 13408                     
       
 13409                     
       
 13410                     {
       
 13411                 
       
 13412                         {
       
 13413                             identifier_c param_name("IN1");
       
 13414                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13415                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13416                             
       
 13417                             /* Get the value from a foo(<param_value>) style call */
       
 13418                             if (IN1_param_value == NULL)
       
 13419                               IN1_param_value = function_call_param_iterator.next();
       
 13420                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13421                             last_type_symbol = last_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 ;
       
 13422                             
       
 13423                             
       
 13424                             {
       
 13425                         
       
 13426                                 symbol_c * return_type_symbol = last_type_symbol;
       
 13427                                 return return_type_symbol;
       
 13428                                 
       
 13429                             }
       
 13430                             
       
 13431                             ERROR;
       
 13432                         }
       
 13433                         
       
 13434                     }
       
 13435                     
       
 13436                     ERROR;
       
 13437                 }
       
 13438                 
       
 13439             }
       
 13440             
       
 13441             ERROR;
       
 13442         }
       
 13443         
       
 13444     }/*function_sel*/
       
 13445     break;
       
 13446 
       
 13447 /****
       
 13448  *MAX
       
 13449  */
       
 13450     case function_max :
       
 13451     {
       
 13452         symbol_c *last_type_symbol = NULL;
       
 13453 
       
 13454         {
       
 13455             identifier_c param_name("IN1");
       
 13456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13457             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13458             
       
 13459             /* Get the value from a foo(<param_value>) style call */
       
 13460             if (IN1_param_value == NULL)
       
 13461               IN1_param_value = function_call_param_iterator.next();
       
 13462             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13463             last_type_symbol = last_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 ;
       
 13464             
       
 13465             
       
 13466             {
       
 13467         
       
 13468                 {
       
 13469                     identifier_c param_name("IN2");
       
 13470                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13471                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13472                     
       
 13473                     /* Get the value from a foo(<param_value>) style call */
       
 13474                     if (IN2_param_value == NULL)
       
 13475                       IN2_param_value = function_call_param_iterator.next();
       
 13476                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13477                     last_type_symbol = last_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 ;
       
 13478                     
       
 13479                     
       
 13480                     {
       
 13481                 
       
 13482                         symbol_c * return_type_symbol = last_type_symbol;
       
 13483                         return return_type_symbol;
       
 13484                         
       
 13485                     }
       
 13486                     
       
 13487                     ERROR;
       
 13488                 }
       
 13489                 
       
 13490             }
       
 13491             
       
 13492             ERROR;
       
 13493         }
       
 13494         
       
 13495     }/*function_max*/
       
 13496     break;
       
 13497 
       
 13498 /****
       
 13499  *MIN
       
 13500  */
       
 13501     case function_min :
       
 13502     {
       
 13503         symbol_c *last_type_symbol = NULL;
       
 13504 
       
 13505         {
       
 13506             identifier_c param_name("IN1");
       
 13507             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13508             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13509             
       
 13510             /* Get the value from a foo(<param_value>) style call */
       
 13511             if (IN1_param_value == NULL)
       
 13512               IN1_param_value = function_call_param_iterator.next();
       
 13513             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13514             last_type_symbol = last_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 ;
       
 13515             
       
 13516             
       
 13517             {
       
 13518         
       
 13519                 {
       
 13520                     identifier_c param_name("IN2");
       
 13521                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13522                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13523                     
       
 13524                     /* Get the value from a foo(<param_value>) style call */
       
 13525                     if (IN2_param_value == NULL)
       
 13526                       IN2_param_value = function_call_param_iterator.next();
       
 13527                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13528                     last_type_symbol = last_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 ;
       
 13529                     
       
 13530                     
       
 13531                     {
       
 13532                 
       
 13533                         symbol_c * return_type_symbol = last_type_symbol;
       
 13534                         return return_type_symbol;
       
 13535                         
       
 13536                     }
       
 13537                     
       
 13538                     ERROR;
       
 13539                 }
       
 13540                 
       
 13541             }
       
 13542             
       
 13543             ERROR;
       
 13544         }
       
 13545         
       
 13546     }/*function_min*/
       
 13547     break;
       
 13548 
       
 13549 /****
       
 13550  *LIMIT
       
 13551  */
       
 13552     case function_limit :
       
 13553     {
       
 13554         symbol_c *last_type_symbol = NULL;
       
 13555 
       
 13556         {
       
 13557             identifier_c param_name("MN");
       
 13558             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13559             symbol_c *MN_param_value = function_call_param_iterator.search(&param_name);
       
 13560             
       
 13561             /* Get the value from a foo(<param_value>) style call */
       
 13562             if (MN_param_value == NULL)
       
 13563               MN_param_value = function_call_param_iterator.next();
       
 13564             symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value);
       
 13565             last_type_symbol = last_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 ;
       
 13566             
       
 13567             
       
 13568             {
       
 13569         
       
 13570                 {
       
 13571                     identifier_c param_name("IN");
       
 13572                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13573                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 13574                     
       
 13575                     /* Get the value from a foo(<param_value>) style call */
       
 13576                     if (IN_param_value == NULL)
       
 13577                       IN_param_value = function_call_param_iterator.next();
       
 13578                     symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 13579                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 13580                     
       
 13581                     
       
 13582                     {
       
 13583                 
       
 13584                         {
       
 13585                             identifier_c param_name("MX");
       
 13586                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13587                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
       
 13588                             
       
 13589                             /* Get the value from a foo(<param_value>) style call */
       
 13590                             if (MX_param_value == NULL)
       
 13591                               MX_param_value = function_call_param_iterator.next();
       
 13592                             symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
       
 13593                             last_type_symbol = last_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 ;
       
 13594                             
       
 13595                             
       
 13596                             {
       
 13597                         
       
 13598                                 symbol_c * return_type_symbol = IN_type_symbol;
       
 13599                                 return return_type_symbol;
       
 13600                                 
       
 13601                             }
       
 13602                             
       
 13603                             ERROR;
       
 13604                         }
       
 13605                         
       
 13606                     }
       
 13607                     
       
 13608                     ERROR;
       
 13609                 }
       
 13610                 
       
 13611             }
       
 13612             
       
 13613             ERROR;
       
 13614         }
       
 13615         
       
 13616     }/*function_limit*/
       
 13617     break;
       
 13618 
       
 13619 /****
       
 13620  *MUX
       
 13621  */
       
 13622     case function_mux :
       
 13623     {
       
 13624         symbol_c *last_type_symbol = NULL;
       
 13625 
       
 13626         {
       
 13627             identifier_c param_name("K");
       
 13628             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13629             symbol_c *K_param_value = function_call_param_iterator.search(&param_name);
       
 13630             
       
 13631             /* Get the value from a foo(<param_value>) style call */
       
 13632             if (K_param_value == NULL)
       
 13633               K_param_value = function_call_param_iterator.next();
       
 13634             symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value);
       
 13635             last_type_symbol = last_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 ;
       
 13636             
       
 13637             if(search_expression_type->is_integer_type(K_type_symbol))
       
 13638             {
       
 13639         
       
 13640                 {
       
 13641                     identifier_c param_name("IN0");
       
 13642                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13643                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 13644                     
       
 13645                     /* Get the value from a foo(<param_value>) style call */
       
 13646                     if (IN0_param_value == NULL)
       
 13647                       IN0_param_value = function_call_param_iterator.next();
       
 13648                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 13649                     last_type_symbol = last_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 ;
       
 13650                     
       
 13651                     
       
 13652                     {
       
 13653                 
       
 13654                         {
       
 13655                             identifier_c param_name("IN1");
       
 13656                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13657                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13658                             
       
 13659                             /* Get the value from a foo(<param_value>) style call */
       
 13660                             if (IN1_param_value == NULL)
       
 13661                               IN1_param_value = function_call_param_iterator.next();
       
 13662                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13663                             last_type_symbol = last_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 ;
       
 13664                             
       
 13665                             
       
 13666                             {
       
 13667                         
       
 13668                                 symbol_c * return_type_symbol = last_type_symbol;
       
 13669                                 return return_type_symbol;
       
 13670                                 
       
 13671                             }
       
 13672                             
       
 13673                             ERROR;
       
 13674                         }
       
 13675                         
       
 13676                     }
       
 13677                     
       
 13678                     ERROR;
       
 13679                 }
       
 13680                 
       
 13681             }
       
 13682             
       
 13683             ERROR;
       
 13684         }
       
 13685         
       
 13686     }/*function_mux*/
       
 13687     break;
       
 13688 
       
 13689 /****
       
 13690  *GT
       
 13691  */
       
 13692     case function_gt :
       
 13693     {
       
 13694         symbol_c *last_type_symbol = NULL;
       
 13695 
       
 13696         {
       
 13697             identifier_c param_name("IN1");
       
 13698             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13699             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13700             
       
 13701             /* Get the value from a foo(<param_value>) style call */
       
 13702             if (IN1_param_value == NULL)
       
 13703               IN1_param_value = function_call_param_iterator.next();
       
 13704             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13705             last_type_symbol = last_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 ;
       
 13706             
       
 13707             
       
 13708             {
       
 13709         
       
 13710                 {
       
 13711                     identifier_c param_name("IN2");
       
 13712                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13713                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13714                     
       
 13715                     /* Get the value from a foo(<param_value>) style call */
       
 13716                     if (IN2_param_value == NULL)
       
 13717                       IN2_param_value = function_call_param_iterator.next();
       
 13718                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13719                     last_type_symbol = last_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 ;
       
 13720                     
       
 13721                     
       
 13722                     {
       
 13723                 
       
 13724                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13725                         return return_type_symbol;
       
 13726                         
       
 13727                     }
       
 13728                     
       
 13729                     ERROR;
       
 13730                 }
       
 13731                 
       
 13732             }
       
 13733             
       
 13734             ERROR;
       
 13735         }
       
 13736         
       
 13737     }/*function_gt*/
       
 13738     break;
       
 13739 
       
 13740 /****
       
 13741  *GE
       
 13742  */
       
 13743     case function_ge :
       
 13744     {
       
 13745         symbol_c *last_type_symbol = NULL;
       
 13746 
       
 13747         {
       
 13748             identifier_c param_name("IN1");
       
 13749             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13750             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13751             
       
 13752             /* Get the value from a foo(<param_value>) style call */
       
 13753             if (IN1_param_value == NULL)
       
 13754               IN1_param_value = function_call_param_iterator.next();
       
 13755             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13756             last_type_symbol = last_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 ;
       
 13757             
       
 13758             
       
 13759             {
       
 13760         
       
 13761                 {
       
 13762                     identifier_c param_name("IN2");
       
 13763                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13764                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13765                     
       
 13766                     /* Get the value from a foo(<param_value>) style call */
       
 13767                     if (IN2_param_value == NULL)
       
 13768                       IN2_param_value = function_call_param_iterator.next();
       
 13769                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13770                     last_type_symbol = last_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 ;
       
 13771                     
       
 13772                     
       
 13773                     {
       
 13774                 
       
 13775                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13776                         return return_type_symbol;
       
 13777                         
       
 13778                     }
       
 13779                     
       
 13780                     ERROR;
       
 13781                 }
       
 13782                 
       
 13783             }
       
 13784             
       
 13785             ERROR;
       
 13786         }
       
 13787         
       
 13788     }/*function_ge*/
       
 13789     break;
       
 13790 
       
 13791 /****
       
 13792  *EQ
       
 13793  */
       
 13794     case function_eq :
       
 13795     {
       
 13796         symbol_c *last_type_symbol = NULL;
       
 13797 
       
 13798         {
       
 13799             identifier_c param_name("IN1");
       
 13800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13801             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13802             
       
 13803             /* Get the value from a foo(<param_value>) style call */
       
 13804             if (IN1_param_value == NULL)
       
 13805               IN1_param_value = function_call_param_iterator.next();
       
 13806             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13807             last_type_symbol = last_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 ;
       
 13808             
       
 13809             
       
 13810             {
       
 13811         
       
 13812                 {
       
 13813                     identifier_c param_name("IN2");
       
 13814                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13815                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13816                     
       
 13817                     /* Get the value from a foo(<param_value>) style call */
       
 13818                     if (IN2_param_value == NULL)
       
 13819                       IN2_param_value = function_call_param_iterator.next();
       
 13820                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13821                     last_type_symbol = last_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 ;
       
 13822                     
       
 13823                     
       
 13824                     {
       
 13825                 
       
 13826                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13827                         return return_type_symbol;
       
 13828                         
       
 13829                     }
       
 13830                     
       
 13831                     ERROR;
       
 13832                 }
       
 13833                 
       
 13834             }
       
 13835             
       
 13836             ERROR;
       
 13837         }
       
 13838         
       
 13839     }/*function_eq*/
       
 13840     break;
       
 13841 
       
 13842 /****
       
 13843  *LT
       
 13844  */
       
 13845     case function_lt :
       
 13846     {
       
 13847         symbol_c *last_type_symbol = NULL;
       
 13848 
       
 13849         {
       
 13850             identifier_c param_name("IN1");
       
 13851             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13852             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13853             
       
 13854             /* Get the value from a foo(<param_value>) style call */
       
 13855             if (IN1_param_value == NULL)
       
 13856               IN1_param_value = function_call_param_iterator.next();
       
 13857             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13858             last_type_symbol = last_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 ;
       
 13859             
       
 13860             
       
 13861             {
       
 13862         
       
 13863                 {
       
 13864                     identifier_c param_name("IN2");
       
 13865                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13866                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13867                     
       
 13868                     /* Get the value from a foo(<param_value>) style call */
       
 13869                     if (IN2_param_value == NULL)
       
 13870                       IN2_param_value = function_call_param_iterator.next();
       
 13871                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13872                     last_type_symbol = last_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 ;
       
 13873                     
       
 13874                     
       
 13875                     {
       
 13876                 
       
 13877                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13878                         return return_type_symbol;
       
 13879                         
       
 13880                     }
       
 13881                     
       
 13882                     ERROR;
       
 13883                 }
       
 13884                 
       
 13885             }
       
 13886             
       
 13887             ERROR;
       
 13888         }
       
 13889         
       
 13890     }/*function_lt*/
       
 13891     break;
       
 13892 
       
 13893 /****
       
 13894  *LE
       
 13895  */
       
 13896     case function_le :
       
 13897     {
       
 13898         symbol_c *last_type_symbol = NULL;
       
 13899 
       
 13900         {
       
 13901             identifier_c param_name("IN1");
       
 13902             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13903             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13904             
       
 13905             /* Get the value from a foo(<param_value>) style call */
       
 13906             if (IN1_param_value == NULL)
       
 13907               IN1_param_value = function_call_param_iterator.next();
       
 13908             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13909             last_type_symbol = last_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 ;
       
 13910             
       
 13911             
       
 13912             {
       
 13913         
       
 13914                 {
       
 13915                     identifier_c param_name("IN2");
       
 13916                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13917                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13918                     
       
 13919                     /* Get the value from a foo(<param_value>) style call */
       
 13920                     if (IN2_param_value == NULL)
       
 13921                       IN2_param_value = function_call_param_iterator.next();
       
 13922                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13923                     last_type_symbol = last_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 ;
       
 13924                     
       
 13925                     
       
 13926                     {
       
 13927                 
       
 13928                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13929                         return return_type_symbol;
       
 13930                         
       
 13931                     }
       
 13932                     
       
 13933                     ERROR;
       
 13934                 }
       
 13935                 
       
 13936             }
       
 13937             
       
 13938             ERROR;
       
 13939         }
       
 13940         
       
 13941     }/*function_le*/
       
 13942     break;
       
 13943 
       
 13944 /****
       
 13945  *NE
       
 13946  */
       
 13947     case function_ne :
       
 13948     {
       
 13949         symbol_c *last_type_symbol = NULL;
       
 13950 
       
 13951         {
       
 13952             identifier_c param_name("IN1");
       
 13953             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13954             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 13955             
       
 13956             /* Get the value from a foo(<param_value>) style call */
       
 13957             if (IN1_param_value == NULL)
       
 13958               IN1_param_value = function_call_param_iterator.next();
       
 13959             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 13960             last_type_symbol = last_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 ;
       
 13961             
       
 13962             
       
 13963             {
       
 13964         
       
 13965                 {
       
 13966                     identifier_c param_name("IN2");
       
 13967                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 13968                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 13969                     
       
 13970                     /* Get the value from a foo(<param_value>) style call */
       
 13971                     if (IN2_param_value == NULL)
       
 13972                       IN2_param_value = function_call_param_iterator.next();
       
 13973                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 13974                     last_type_symbol = last_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 ;
       
 13975                     
       
 13976                     
       
 13977                     {
       
 13978                 
       
 13979                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 13980                         return return_type_symbol;
       
 13981                         
       
 13982                     }
       
 13983                     
       
 13984                     ERROR;
       
 13985                 }
       
 13986                 
       
 13987             }
       
 13988             
       
 13989             ERROR;
       
 13990         }
       
 13991         
       
 13992     }/*function_ne*/
       
 13993     break;
       
 13994 
       
 13995 /****
       
 13996  *LEN
       
 13997  */
       
 13998     case function_len :
       
 13999     {
       
 14000         symbol_c *last_type_symbol = NULL;
       
 14001 
       
 14002         {
       
 14003             identifier_c param_name("IN");
       
 14004             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14005             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14006             
       
 14007             /* Get the value from a foo(<param_value>) style call */
       
 14008             if (IN_param_value == NULL)
       
 14009               IN_param_value = function_call_param_iterator.next();
       
 14010             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14011             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14012             
       
 14013             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14014             {
       
 14015         
       
 14016                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14017                 return return_type_symbol;
       
 14018                 
       
 14019             }
       
 14020             
       
 14021             ERROR;
       
 14022         }
       
 14023         
       
 14024     }/*function_len*/
       
 14025     break;
       
 14026 
       
 14027 /****
       
 14028  *LEFT
       
 14029  */
       
 14030     case function_left :
       
 14031     {
       
 14032         symbol_c *last_type_symbol = NULL;
       
 14033 
       
 14034         {
       
 14035             identifier_c param_name("IN");
       
 14036             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14037             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14038             
       
 14039             /* Get the value from a foo(<param_value>) style call */
       
 14040             if (IN_param_value == NULL)
       
 14041               IN_param_value = function_call_param_iterator.next();
       
 14042             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14043             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14044             
       
 14045             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14046             {
       
 14047         
       
 14048                 {
       
 14049                     identifier_c param_name("L");
       
 14050                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14051                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 14052                     
       
 14053                     /* Get the value from a foo(<param_value>) style call */
       
 14054                     if (L_param_value == NULL)
       
 14055                       L_param_value = function_call_param_iterator.next();
       
 14056                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 14057                     last_type_symbol = last_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 ;
       
 14058                     
       
 14059                     if(search_expression_type->is_integer_type(L_type_symbol))
       
 14060                     {
       
 14061                 
       
 14062                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14063                         return return_type_symbol;
       
 14064                         
       
 14065                     }
       
 14066                     
       
 14067                     ERROR;
       
 14068                 }
       
 14069                 
       
 14070             }
       
 14071             
       
 14072             ERROR;
       
 14073         }
       
 14074         
       
 14075     }/*function_left*/
       
 14076     break;
       
 14077 
       
 14078 /****
       
 14079  *RIGHT
       
 14080  */
       
 14081     case function_right :
       
 14082     {
       
 14083         symbol_c *last_type_symbol = NULL;
       
 14084 
       
 14085         {
       
 14086             identifier_c param_name("IN");
       
 14087             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14088             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14089             
       
 14090             /* Get the value from a foo(<param_value>) style call */
       
 14091             if (IN_param_value == NULL)
       
 14092               IN_param_value = function_call_param_iterator.next();
       
 14093             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14094             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14095             
       
 14096             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14097             {
       
 14098         
       
 14099                 {
       
 14100                     identifier_c param_name("L");
       
 14101                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14102                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 14103                     
       
 14104                     /* Get the value from a foo(<param_value>) style call */
       
 14105                     if (L_param_value == NULL)
       
 14106                       L_param_value = function_call_param_iterator.next();
       
 14107                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 14108                     last_type_symbol = last_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 ;
       
 14109                     
       
 14110                     if(search_expression_type->is_integer_type(L_type_symbol))
       
 14111                     {
       
 14112                 
       
 14113                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14114                         return return_type_symbol;
       
 14115                         
       
 14116                     }
       
 14117                     
       
 14118                     ERROR;
       
 14119                 }
       
 14120                 
       
 14121             }
       
 14122             
       
 14123             ERROR;
       
 14124         }
       
 14125         
       
 14126     }/*function_right*/
       
 14127     break;
       
 14128 
       
 14129 /****
       
 14130  *MID
       
 14131  */
       
 14132     case function_mid :
       
 14133     {
       
 14134         symbol_c *last_type_symbol = NULL;
       
 14135 
       
 14136         {
       
 14137             identifier_c param_name("IN");
       
 14138             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14139             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14140             
       
 14141             /* Get the value from a foo(<param_value>) style call */
       
 14142             if (IN_param_value == NULL)
       
 14143               IN_param_value = function_call_param_iterator.next();
       
 14144             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14145             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14146             
       
 14147             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14148             {
       
 14149         
       
 14150                 {
       
 14151                     identifier_c param_name("L");
       
 14152                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14153                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 14154                     
       
 14155                     /* Get the value from a foo(<param_value>) style call */
       
 14156                     if (L_param_value == NULL)
       
 14157                       L_param_value = function_call_param_iterator.next();
       
 14158                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 14159                     last_type_symbol = last_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 ;
       
 14160                     
       
 14161                     if(search_expression_type->is_integer_type(L_type_symbol))
       
 14162                     {
       
 14163                 
       
 14164                         {
       
 14165                             identifier_c param_name("P");
       
 14166                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14167                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 14168                             
       
 14169                             /* Get the value from a foo(<param_value>) style call */
       
 14170                             if (P_param_value == NULL)
       
 14171                               P_param_value = function_call_param_iterator.next();
       
 14172                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 14173                             last_type_symbol = last_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 ;
       
 14174                             
       
 14175                             if(search_expression_type->is_integer_type(P_type_symbol))
       
 14176                             {
       
 14177                         
       
 14178                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14179                                 return return_type_symbol;
       
 14180                                 
       
 14181                             }
       
 14182                             
       
 14183                             ERROR;
       
 14184                         }
       
 14185                         
       
 14186                     }
       
 14187                     
       
 14188                     ERROR;
       
 14189                 }
       
 14190                 
       
 14191             }
       
 14192             
       
 14193             ERROR;
       
 14194         }
       
 14195         
       
 14196     }/*function_mid*/
       
 14197     break;
       
 14198 
       
 14199 /****
       
 14200  *CONCAT
       
 14201  */
       
 14202     case function_concat :
       
 14203     {
       
 14204         symbol_c *last_type_symbol = NULL;
       
 14205 
       
 14206         {
       
 14207             identifier_c param_name("IN1");
       
 14208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14209             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14210             
       
 14211             /* Get the value from a foo(<param_value>) style call */
       
 14212             if (IN1_param_value == NULL)
       
 14213               IN1_param_value = function_call_param_iterator.next();
       
 14214             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14215             last_type_symbol = last_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 ;
       
 14216             
       
 14217             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 14218             {
       
 14219         
       
 14220                 {
       
 14221                     identifier_c param_name("IN2");
       
 14222                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14223                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14224                     
       
 14225                     /* Get the value from a foo(<param_value>) style call */
       
 14226                     if (IN2_param_value == NULL)
       
 14227                       IN2_param_value = function_call_param_iterator.next();
       
 14228                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14229                     last_type_symbol = last_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 ;
       
 14230                     
       
 14231                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 14232                     {
       
 14233                 
       
 14234                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14235                         return return_type_symbol;
       
 14236                         
       
 14237                     }
       
 14238                     
       
 14239                     ERROR;
       
 14240                 }
       
 14241                 
       
 14242             }
       
 14243             
       
 14244             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14245             {
       
 14246         
       
 14247                 {
       
 14248                     identifier_c param_name("IN2");
       
 14249                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14250                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14251                     
       
 14252                     /* Get the value from a foo(<param_value>) style call */
       
 14253                     if (IN2_param_value == NULL)
       
 14254                       IN2_param_value = function_call_param_iterator.next();
       
 14255                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14256                     last_type_symbol = last_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 ;
       
 14257                     
       
 14258                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14259                     {
       
 14260                 
       
 14261                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14262                         return return_type_symbol;
       
 14263                         
       
 14264                     }
       
 14265                     
       
 14266                     ERROR;
       
 14267                 }
       
 14268                 
       
 14269             }
       
 14270             
       
 14271             ERROR;
       
 14272         }
       
 14273         
       
 14274     }/*function_concat*/
       
 14275     break;
       
 14276 
       
 14277 /****
       
 14278  *INSERT
       
 14279  */
       
 14280     case function_insert :
       
 14281     {
       
 14282         symbol_c *last_type_symbol = NULL;
       
 14283 
       
 14284         {
       
 14285             identifier_c param_name("IN1");
       
 14286             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14287             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14288             
       
 14289             /* Get the value from a foo(<param_value>) style call */
       
 14290             if (IN1_param_value == NULL)
       
 14291               IN1_param_value = function_call_param_iterator.next();
       
 14292             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14293             last_type_symbol = last_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 ;
       
 14294             
       
 14295             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14296             {
       
 14297         
       
 14298                 {
       
 14299                     identifier_c param_name("IN2");
       
 14300                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14301                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14302                     
       
 14303                     /* Get the value from a foo(<param_value>) style call */
       
 14304                     if (IN2_param_value == NULL)
       
 14305                       IN2_param_value = function_call_param_iterator.next();
       
 14306                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14307                     last_type_symbol = last_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 ;
       
 14308                     
       
 14309                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14310                     {
       
 14311                 
       
 14312                         {
       
 14313                             identifier_c param_name("P");
       
 14314                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14315                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 14316                             
       
 14317                             /* Get the value from a foo(<param_value>) style call */
       
 14318                             if (P_param_value == NULL)
       
 14319                               P_param_value = function_call_param_iterator.next();
       
 14320                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 14321                             last_type_symbol = last_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 ;
       
 14322                             
       
 14323                             if(search_expression_type->is_integer_type(P_type_symbol))
       
 14324                             {
       
 14325                         
       
 14326                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14327                                 return return_type_symbol;
       
 14328                                 
       
 14329                             }
       
 14330                             
       
 14331                             ERROR;
       
 14332                         }
       
 14333                         
       
 14334                     }
       
 14335                     
       
 14336                     ERROR;
       
 14337                 }
       
 14338                 
       
 14339             }
       
 14340             
       
 14341             ERROR;
       
 14342         }
       
 14343         
       
 14344     }/*function_insert*/
       
 14345     break;
       
 14346 
       
 14347 /****
       
 14348  *DELETE
       
 14349  */
       
 14350     case function_delete :
       
 14351     {
       
 14352         symbol_c *last_type_symbol = NULL;
       
 14353 
       
 14354         {
       
 14355             identifier_c param_name("IN");
       
 14356             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14357             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 14358             
       
 14359             /* Get the value from a foo(<param_value>) style call */
       
 14360             if (IN_param_value == NULL)
       
 14361               IN_param_value = function_call_param_iterator.next();
       
 14362             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 14363             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 14364             
       
 14365             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14366             {
       
 14367         
       
 14368                 {
       
 14369                     identifier_c param_name("L");
       
 14370                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14371                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 14372                     
       
 14373                     /* Get the value from a foo(<param_value>) style call */
       
 14374                     if (L_param_value == NULL)
       
 14375                       L_param_value = function_call_param_iterator.next();
       
 14376                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 14377                     last_type_symbol = last_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 ;
       
 14378                     
       
 14379                     if(search_expression_type->is_integer_type(L_type_symbol))
       
 14380                     {
       
 14381                 
       
 14382                         {
       
 14383                             identifier_c param_name("P");
       
 14384                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14385                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 14386                             
       
 14387                             /* Get the value from a foo(<param_value>) style call */
       
 14388                             if (P_param_value == NULL)
       
 14389                               P_param_value = function_call_param_iterator.next();
       
 14390                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 14391                             last_type_symbol = last_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 ;
       
 14392                             
       
 14393                             if(search_expression_type->is_integer_type(P_type_symbol))
       
 14394                             {
       
 14395                         
       
 14396                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14397                                 return return_type_symbol;
       
 14398                                 
       
 14399                             }
       
 14400                             
       
 14401                             ERROR;
       
 14402                         }
       
 14403                         
       
 14404                     }
       
 14405                     
       
 14406                     ERROR;
       
 14407                 }
       
 14408                 
       
 14409             }
       
 14410             
       
 14411             ERROR;
       
 14412         }
       
 14413         
       
 14414     }/*function_delete*/
       
 14415     break;
       
 14416 
       
 14417 /****
       
 14418  *REPLACE
       
 14419  */
       
 14420     case function_replace :
       
 14421     {
       
 14422         symbol_c *last_type_symbol = NULL;
       
 14423 
       
 14424         {
       
 14425             identifier_c param_name("IN1");
       
 14426             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14427             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14428             
       
 14429             /* Get the value from a foo(<param_value>) style call */
       
 14430             if (IN1_param_value == NULL)
       
 14431               IN1_param_value = function_call_param_iterator.next();
       
 14432             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14433             last_type_symbol = last_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 ;
       
 14434             
       
 14435             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14436             {
       
 14437         
       
 14438                 {
       
 14439                     identifier_c param_name("IN2");
       
 14440                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14441                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14442                     
       
 14443                     /* Get the value from a foo(<param_value>) style call */
       
 14444                     if (IN2_param_value == NULL)
       
 14445                       IN2_param_value = function_call_param_iterator.next();
       
 14446                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14447                     last_type_symbol = last_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 ;
       
 14448                     
       
 14449                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14450                     {
       
 14451                 
       
 14452                         {
       
 14453                             identifier_c param_name("L");
       
 14454                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14455                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 14456                             
       
 14457                             /* Get the value from a foo(<param_value>) style call */
       
 14458                             if (L_param_value == NULL)
       
 14459                               L_param_value = function_call_param_iterator.next();
       
 14460                             symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 14461                             last_type_symbol = last_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 ;
       
 14462                             
       
 14463                             if(search_expression_type->is_integer_type(L_type_symbol))
       
 14464                             {
       
 14465                         
       
 14466                                 {
       
 14467                                     identifier_c param_name("P");
       
 14468                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14469                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 14470                                     
       
 14471                                     /* Get the value from a foo(<param_value>) style call */
       
 14472                                     if (P_param_value == NULL)
       
 14473                                       P_param_value = function_call_param_iterator.next();
       
 14474                                     symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 14475                                     last_type_symbol = last_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 ;
       
 14476                                     
       
 14477                                     if(search_expression_type->is_integer_type(P_type_symbol))
       
 14478                                     {
       
 14479                                 
       
 14480                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14481                                         return return_type_symbol;
       
 14482                                         
       
 14483                                     }
       
 14484                                     
       
 14485                                     ERROR;
       
 14486                                 }
       
 14487                                 
       
 14488                             }
       
 14489                             
       
 14490                             ERROR;
       
 14491                         }
       
 14492                         
       
 14493                     }
       
 14494                     
       
 14495                     ERROR;
       
 14496                 }
       
 14497                 
       
 14498             }
       
 14499             
       
 14500             ERROR;
       
 14501         }
       
 14502         
       
 14503     }/*function_replace*/
       
 14504     break;
       
 14505 
       
 14506 /****
       
 14507  *FIND
       
 14508  */
       
 14509     case function_find :
       
 14510     {
       
 14511         symbol_c *last_type_symbol = NULL;
       
 14512 
       
 14513         {
       
 14514             identifier_c param_name("IN1");
       
 14515             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14516             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 14517             
       
 14518             /* Get the value from a foo(<param_value>) style call */
       
 14519             if (IN1_param_value == NULL)
       
 14520               IN1_param_value = function_call_param_iterator.next();
       
 14521             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 14522             last_type_symbol = last_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 ;
       
 14523             
       
 14524             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14525             {
       
 14526         
       
 14527                 {
       
 14528                     identifier_c param_name("IN2");
       
 14529                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 14530                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 14531                     
       
 14532                     /* Get the value from a foo(<param_value>) style call */
       
 14533                     if (IN2_param_value == NULL)
       
 14534                       IN2_param_value = function_call_param_iterator.next();
       
 14535                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 14536                     last_type_symbol = last_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 ;
       
 14537                     
       
 14538                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 14539                     {
       
 14540                 
       
 14541                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14542                         return return_type_symbol;
       
 14543                         
       
 14544                     }
       
 14545                     
       
 14546                     ERROR;
       
 14547                 }
       
 14548                 
       
 14549             }
       
 14550             
       
 14551             ERROR;
       
 14552         }
       
 14553         
       
 14554     }/*function_find*/
       
 14555     break;
       
 14556 
       
 14557     case function_none :
       
 14558     ERROR;
       
 14559   }
       
 14560   return NULL;
       
 14561 }
       
 14562 
       
 14563 void *compute_standard_function_il(il_function_call_c *symbol, symbol_c *param_data_type) {
       
 14564   
       
 14565   function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
       
 14566   function_call_param_iterator_c function_call_param_iterator(symbol);  
       
 14567   search_expression_type_c* search_expression_type = this;
       
 14568 
       
 14569   switch(current_function_type){
       
 14570 
       
 14571 /****
       
 14572  *BOOL_TO_SINT
       
 14573  */
       
 14574     case function_bool_to_sint :
       
 14575     {
       
 14576         symbol_c *last_type_symbol = NULL;
       
 14577 
       
 14578         {
       
 14579             symbol_c *IN_type_symbol = param_data_type;
       
 14580             last_type_symbol = param_data_type;
       
 14581             
       
 14582             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14583             {
       
 14584         
       
 14585                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 14586                 return return_type_symbol;
       
 14587                 
       
 14588             }
       
 14589             
       
 14590             ERROR;
       
 14591         }
       
 14592         
       
 14593     }/*function_bool_to_sint*/
       
 14594     break;
       
 14595 
       
 14596 /****
       
 14597  *BOOL_TO_INT
       
 14598  */
       
 14599     case function_bool_to_int :
       
 14600     {
       
 14601         symbol_c *last_type_symbol = NULL;
       
 14602 
       
 14603         {
       
 14604             symbol_c *IN_type_symbol = param_data_type;
       
 14605             last_type_symbol = param_data_type;
       
 14606             
       
 14607             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14608             {
       
 14609         
       
 14610                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 14611                 return return_type_symbol;
       
 14612                 
       
 14613             }
       
 14614             
       
 14615             ERROR;
       
 14616         }
       
 14617         
       
 14618     }/*function_bool_to_int*/
       
 14619     break;
       
 14620 
       
 14621 /****
       
 14622  *BOOL_TO_DINT
       
 14623  */
       
 14624     case function_bool_to_dint :
       
 14625     {
       
 14626         symbol_c *last_type_symbol = NULL;
       
 14627 
       
 14628         {
       
 14629             symbol_c *IN_type_symbol = param_data_type;
       
 14630             last_type_symbol = param_data_type;
       
 14631             
       
 14632             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14633             {
       
 14634         
       
 14635                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 14636                 return return_type_symbol;
       
 14637                 
       
 14638             }
       
 14639             
       
 14640             ERROR;
       
 14641         }
       
 14642         
       
 14643     }/*function_bool_to_dint*/
       
 14644     break;
       
 14645 
       
 14646 /****
       
 14647  *BOOL_TO_LINT
       
 14648  */
       
 14649     case function_bool_to_lint :
       
 14650     {
       
 14651         symbol_c *last_type_symbol = NULL;
       
 14652 
       
 14653         {
       
 14654             symbol_c *IN_type_symbol = param_data_type;
       
 14655             last_type_symbol = param_data_type;
       
 14656             
       
 14657             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14658             {
       
 14659         
       
 14660                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 14661                 return return_type_symbol;
       
 14662                 
       
 14663             }
       
 14664             
       
 14665             ERROR;
       
 14666         }
       
 14667         
       
 14668     }/*function_bool_to_lint*/
       
 14669     break;
       
 14670 
       
 14671 /****
       
 14672  *BOOL_TO_USINT
       
 14673  */
       
 14674     case function_bool_to_usint :
       
 14675     {
       
 14676         symbol_c *last_type_symbol = NULL;
       
 14677 
       
 14678         {
       
 14679             symbol_c *IN_type_symbol = param_data_type;
       
 14680             last_type_symbol = param_data_type;
       
 14681             
       
 14682             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14683             {
       
 14684         
       
 14685                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 14686                 return return_type_symbol;
       
 14687                 
       
 14688             }
       
 14689             
       
 14690             ERROR;
       
 14691         }
       
 14692         
       
 14693     }/*function_bool_to_usint*/
       
 14694     break;
       
 14695 
       
 14696 /****
       
 14697  *BOOL_TO_UINT
       
 14698  */
       
 14699     case function_bool_to_uint :
       
 14700     {
       
 14701         symbol_c *last_type_symbol = NULL;
       
 14702 
       
 14703         {
       
 14704             symbol_c *IN_type_symbol = param_data_type;
       
 14705             last_type_symbol = param_data_type;
       
 14706             
       
 14707             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14708             {
       
 14709         
       
 14710                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 14711                 return return_type_symbol;
       
 14712                 
       
 14713             }
       
 14714             
       
 14715             ERROR;
       
 14716         }
       
 14717         
       
 14718     }/*function_bool_to_uint*/
       
 14719     break;
       
 14720 
       
 14721 /****
       
 14722  *BOOL_TO_UDINT
       
 14723  */
       
 14724     case function_bool_to_udint :
       
 14725     {
       
 14726         symbol_c *last_type_symbol = NULL;
       
 14727 
       
 14728         {
       
 14729             symbol_c *IN_type_symbol = param_data_type;
       
 14730             last_type_symbol = param_data_type;
       
 14731             
       
 14732             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14733             {
       
 14734         
       
 14735                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 14736                 return return_type_symbol;
       
 14737                 
       
 14738             }
       
 14739             
       
 14740             ERROR;
       
 14741         }
       
 14742         
       
 14743     }/*function_bool_to_udint*/
       
 14744     break;
       
 14745 
       
 14746 /****
       
 14747  *BOOL_TO_ULINT
       
 14748  */
       
 14749     case function_bool_to_ulint :
       
 14750     {
       
 14751         symbol_c *last_type_symbol = NULL;
       
 14752 
       
 14753         {
       
 14754             symbol_c *IN_type_symbol = param_data_type;
       
 14755             last_type_symbol = param_data_type;
       
 14756             
       
 14757             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14758             {
       
 14759         
       
 14760                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 14761                 return return_type_symbol;
       
 14762                 
       
 14763             }
       
 14764             
       
 14765             ERROR;
       
 14766         }
       
 14767         
       
 14768     }/*function_bool_to_ulint*/
       
 14769     break;
       
 14770 
       
 14771 /****
       
 14772  *BOOL_TO_REAL
       
 14773  */
       
 14774     case function_bool_to_real :
       
 14775     {
       
 14776         symbol_c *last_type_symbol = NULL;
       
 14777 
       
 14778         {
       
 14779             symbol_c *IN_type_symbol = param_data_type;
       
 14780             last_type_symbol = param_data_type;
       
 14781             
       
 14782             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14783             {
       
 14784         
       
 14785                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 14786                 return return_type_symbol;
       
 14787                 
       
 14788             }
       
 14789             
       
 14790             ERROR;
       
 14791         }
       
 14792         
       
 14793     }/*function_bool_to_real*/
       
 14794     break;
       
 14795 
       
 14796 /****
       
 14797  *BOOL_TO_LREAL
       
 14798  */
       
 14799     case function_bool_to_lreal :
       
 14800     {
       
 14801         symbol_c *last_type_symbol = NULL;
       
 14802 
       
 14803         {
       
 14804             symbol_c *IN_type_symbol = param_data_type;
       
 14805             last_type_symbol = param_data_type;
       
 14806             
       
 14807             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14808             {
       
 14809         
       
 14810                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 14811                 return return_type_symbol;
       
 14812                 
       
 14813             }
       
 14814             
       
 14815             ERROR;
       
 14816         }
       
 14817         
       
 14818     }/*function_bool_to_lreal*/
       
 14819     break;
       
 14820 
       
 14821 /****
       
 14822  *BOOL_TO_TIME
       
 14823  */
       
 14824     case function_bool_to_time :
       
 14825     {
       
 14826         symbol_c *last_type_symbol = NULL;
       
 14827 
       
 14828         {
       
 14829             symbol_c *IN_type_symbol = param_data_type;
       
 14830             last_type_symbol = param_data_type;
       
 14831             
       
 14832             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14833             {
       
 14834         
       
 14835                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 14836                 return return_type_symbol;
       
 14837                 
       
 14838             }
       
 14839             
       
 14840             ERROR;
       
 14841         }
       
 14842         
       
 14843     }/*function_bool_to_time*/
       
 14844     break;
       
 14845 
       
 14846 /****
       
 14847  *BOOL_TO_DATE
       
 14848  */
       
 14849     case function_bool_to_date :
       
 14850     {
       
 14851         symbol_c *last_type_symbol = NULL;
       
 14852 
       
 14853         {
       
 14854             symbol_c *IN_type_symbol = param_data_type;
       
 14855             last_type_symbol = param_data_type;
       
 14856             
       
 14857             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14858             {
       
 14859         
       
 14860                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 14861                 return return_type_symbol;
       
 14862                 
       
 14863             }
       
 14864             
       
 14865             ERROR;
       
 14866         }
       
 14867         
       
 14868     }/*function_bool_to_date*/
       
 14869     break;
       
 14870 
       
 14871 /****
       
 14872  *BOOL_TO_TOD
       
 14873  */
       
 14874     case function_bool_to_tod :
       
 14875     {
       
 14876         symbol_c *last_type_symbol = NULL;
       
 14877 
       
 14878         {
       
 14879             symbol_c *IN_type_symbol = param_data_type;
       
 14880             last_type_symbol = param_data_type;
       
 14881             
       
 14882             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14883             {
       
 14884         
       
 14885                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 14886                 return return_type_symbol;
       
 14887                 
       
 14888             }
       
 14889             
       
 14890             ERROR;
       
 14891         }
       
 14892         
       
 14893     }/*function_bool_to_tod*/
       
 14894     break;
       
 14895 
       
 14896 /****
       
 14897  *BOOL_TO_DT
       
 14898  */
       
 14899     case function_bool_to_dt :
       
 14900     {
       
 14901         symbol_c *last_type_symbol = NULL;
       
 14902 
       
 14903         {
       
 14904             symbol_c *IN_type_symbol = param_data_type;
       
 14905             last_type_symbol = param_data_type;
       
 14906             
       
 14907             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14908             {
       
 14909         
       
 14910                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 14911                 return return_type_symbol;
       
 14912                 
       
 14913             }
       
 14914             
       
 14915             ERROR;
       
 14916         }
       
 14917         
       
 14918     }/*function_bool_to_dt*/
       
 14919     break;
       
 14920 
       
 14921 /****
       
 14922  *BOOL_TO_STRING
       
 14923  */
       
 14924     case function_bool_to_string :
       
 14925     {
       
 14926         symbol_c *last_type_symbol = NULL;
       
 14927 
       
 14928         {
       
 14929             symbol_c *IN_type_symbol = param_data_type;
       
 14930             last_type_symbol = param_data_type;
       
 14931             
       
 14932             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14933             {
       
 14934         
       
 14935                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 14936                 return return_type_symbol;
       
 14937                 
       
 14938             }
       
 14939             
       
 14940             ERROR;
       
 14941         }
       
 14942         
       
 14943     }/*function_bool_to_string*/
       
 14944     break;
       
 14945 
       
 14946 /****
       
 14947  *BOOL_TO_BYTE
       
 14948  */
       
 14949     case function_bool_to_byte :
       
 14950     {
       
 14951         symbol_c *last_type_symbol = NULL;
       
 14952 
       
 14953         {
       
 14954             symbol_c *IN_type_symbol = param_data_type;
       
 14955             last_type_symbol = param_data_type;
       
 14956             
       
 14957             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14958             {
       
 14959         
       
 14960                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 14961                 return return_type_symbol;
       
 14962                 
       
 14963             }
       
 14964             
       
 14965             ERROR;
       
 14966         }
       
 14967         
       
 14968     }/*function_bool_to_byte*/
       
 14969     break;
       
 14970 
       
 14971 /****
       
 14972  *BOOL_TO_WORD
       
 14973  */
       
 14974     case function_bool_to_word :
       
 14975     {
       
 14976         symbol_c *last_type_symbol = NULL;
       
 14977 
       
 14978         {
       
 14979             symbol_c *IN_type_symbol = param_data_type;
       
 14980             last_type_symbol = param_data_type;
       
 14981             
       
 14982             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 14983             {
       
 14984         
       
 14985                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 14986                 return return_type_symbol;
       
 14987                 
       
 14988             }
       
 14989             
       
 14990             ERROR;
       
 14991         }
       
 14992         
       
 14993     }/*function_bool_to_word*/
       
 14994     break;
       
 14995 
       
 14996 /****
       
 14997  *BOOL_TO_DWORD
       
 14998  */
       
 14999     case function_bool_to_dword :
       
 15000     {
       
 15001         symbol_c *last_type_symbol = NULL;
       
 15002 
       
 15003         {
       
 15004             symbol_c *IN_type_symbol = param_data_type;
       
 15005             last_type_symbol = param_data_type;
       
 15006             
       
 15007             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 15008             {
       
 15009         
       
 15010                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 15011                 return return_type_symbol;
       
 15012                 
       
 15013             }
       
 15014             
       
 15015             ERROR;
       
 15016         }
       
 15017         
       
 15018     }/*function_bool_to_dword*/
       
 15019     break;
       
 15020 
       
 15021 /****
       
 15022  *BOOL_TO_LWORD
       
 15023  */
       
 15024     case function_bool_to_lword :
       
 15025     {
       
 15026         symbol_c *last_type_symbol = NULL;
       
 15027 
       
 15028         {
       
 15029             symbol_c *IN_type_symbol = param_data_type;
       
 15030             last_type_symbol = param_data_type;
       
 15031             
       
 15032             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 15033             {
       
 15034         
       
 15035                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15036                 return return_type_symbol;
       
 15037                 
       
 15038             }
       
 15039             
       
 15040             ERROR;
       
 15041         }
       
 15042         
       
 15043     }/*function_bool_to_lword*/
       
 15044     break;
       
 15045 
       
 15046 /****
       
 15047  *SINT_TO_BOOL
       
 15048  */
       
 15049     case function_sint_to_bool :
       
 15050     {
       
 15051         symbol_c *last_type_symbol = NULL;
       
 15052 
       
 15053         {
       
 15054             symbol_c *IN_type_symbol = param_data_type;
       
 15055             last_type_symbol = param_data_type;
       
 15056             
       
 15057             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15058             {
       
 15059         
       
 15060                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15061                 return return_type_symbol;
       
 15062                 
       
 15063             }
       
 15064             
       
 15065             ERROR;
       
 15066         }
       
 15067         
       
 15068     }/*function_sint_to_bool*/
       
 15069     break;
       
 15070 
       
 15071 /****
       
 15072  *SINT_TO_INT
       
 15073  */
       
 15074     case function_sint_to_int :
       
 15075     {
       
 15076         symbol_c *last_type_symbol = NULL;
       
 15077 
       
 15078         {
       
 15079             symbol_c *IN_type_symbol = param_data_type;
       
 15080             last_type_symbol = param_data_type;
       
 15081             
       
 15082             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15083             {
       
 15084         
       
 15085                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 15086                 return return_type_symbol;
       
 15087                 
       
 15088             }
       
 15089             
       
 15090             ERROR;
       
 15091         }
       
 15092         
       
 15093     }/*function_sint_to_int*/
       
 15094     break;
       
 15095 
       
 15096 /****
       
 15097  *SINT_TO_DINT
       
 15098  */
       
 15099     case function_sint_to_dint :
       
 15100     {
       
 15101         symbol_c *last_type_symbol = NULL;
       
 15102 
       
 15103         {
       
 15104             symbol_c *IN_type_symbol = param_data_type;
       
 15105             last_type_symbol = param_data_type;
       
 15106             
       
 15107             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15108             {
       
 15109         
       
 15110                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 15111                 return return_type_symbol;
       
 15112                 
       
 15113             }
       
 15114             
       
 15115             ERROR;
       
 15116         }
       
 15117         
       
 15118     }/*function_sint_to_dint*/
       
 15119     break;
       
 15120 
       
 15121 /****
       
 15122  *SINT_TO_LINT
       
 15123  */
       
 15124     case function_sint_to_lint :
       
 15125     {
       
 15126         symbol_c *last_type_symbol = NULL;
       
 15127 
       
 15128         {
       
 15129             symbol_c *IN_type_symbol = param_data_type;
       
 15130             last_type_symbol = param_data_type;
       
 15131             
       
 15132             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15133             {
       
 15134         
       
 15135                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15136                 return return_type_symbol;
       
 15137                 
       
 15138             }
       
 15139             
       
 15140             ERROR;
       
 15141         }
       
 15142         
       
 15143     }/*function_sint_to_lint*/
       
 15144     break;
       
 15145 
       
 15146 /****
       
 15147  *SINT_TO_USINT
       
 15148  */
       
 15149     case function_sint_to_usint :
       
 15150     {
       
 15151         symbol_c *last_type_symbol = NULL;
       
 15152 
       
 15153         {
       
 15154             symbol_c *IN_type_symbol = param_data_type;
       
 15155             last_type_symbol = param_data_type;
       
 15156             
       
 15157             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15158             {
       
 15159         
       
 15160                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15161                 return return_type_symbol;
       
 15162                 
       
 15163             }
       
 15164             
       
 15165             ERROR;
       
 15166         }
       
 15167         
       
 15168     }/*function_sint_to_usint*/
       
 15169     break;
       
 15170 
       
 15171 /****
       
 15172  *SINT_TO_UINT
       
 15173  */
       
 15174     case function_sint_to_uint :
       
 15175     {
       
 15176         symbol_c *last_type_symbol = NULL;
       
 15177 
       
 15178         {
       
 15179             symbol_c *IN_type_symbol = param_data_type;
       
 15180             last_type_symbol = param_data_type;
       
 15181             
       
 15182             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15183             {
       
 15184         
       
 15185                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15186                 return return_type_symbol;
       
 15187                 
       
 15188             }
       
 15189             
       
 15190             ERROR;
       
 15191         }
       
 15192         
       
 15193     }/*function_sint_to_uint*/
       
 15194     break;
       
 15195 
       
 15196 /****
       
 15197  *SINT_TO_UDINT
       
 15198  */
       
 15199     case function_sint_to_udint :
       
 15200     {
       
 15201         symbol_c *last_type_symbol = NULL;
       
 15202 
       
 15203         {
       
 15204             symbol_c *IN_type_symbol = param_data_type;
       
 15205             last_type_symbol = param_data_type;
       
 15206             
       
 15207             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15208             {
       
 15209         
       
 15210                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 15211                 return return_type_symbol;
       
 15212                 
       
 15213             }
       
 15214             
       
 15215             ERROR;
       
 15216         }
       
 15217         
       
 15218     }/*function_sint_to_udint*/
       
 15219     break;
       
 15220 
       
 15221 /****
       
 15222  *SINT_TO_ULINT
       
 15223  */
       
 15224     case function_sint_to_ulint :
       
 15225     {
       
 15226         symbol_c *last_type_symbol = NULL;
       
 15227 
       
 15228         {
       
 15229             symbol_c *IN_type_symbol = param_data_type;
       
 15230             last_type_symbol = param_data_type;
       
 15231             
       
 15232             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15233             {
       
 15234         
       
 15235                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15236                 return return_type_symbol;
       
 15237                 
       
 15238             }
       
 15239             
       
 15240             ERROR;
       
 15241         }
       
 15242         
       
 15243     }/*function_sint_to_ulint*/
       
 15244     break;
       
 15245 
       
 15246 /****
       
 15247  *SINT_TO_REAL
       
 15248  */
       
 15249     case function_sint_to_real :
       
 15250     {
       
 15251         symbol_c *last_type_symbol = NULL;
       
 15252 
       
 15253         {
       
 15254             symbol_c *IN_type_symbol = param_data_type;
       
 15255             last_type_symbol = param_data_type;
       
 15256             
       
 15257             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15258             {
       
 15259         
       
 15260                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 15261                 return return_type_symbol;
       
 15262                 
       
 15263             }
       
 15264             
       
 15265             ERROR;
       
 15266         }
       
 15267         
       
 15268     }/*function_sint_to_real*/
       
 15269     break;
       
 15270 
       
 15271 /****
       
 15272  *SINT_TO_LREAL
       
 15273  */
       
 15274     case function_sint_to_lreal :
       
 15275     {
       
 15276         symbol_c *last_type_symbol = NULL;
       
 15277 
       
 15278         {
       
 15279             symbol_c *IN_type_symbol = param_data_type;
       
 15280             last_type_symbol = param_data_type;
       
 15281             
       
 15282             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15283             {
       
 15284         
       
 15285                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15286                 return return_type_symbol;
       
 15287                 
       
 15288             }
       
 15289             
       
 15290             ERROR;
       
 15291         }
       
 15292         
       
 15293     }/*function_sint_to_lreal*/
       
 15294     break;
       
 15295 
       
 15296 /****
       
 15297  *SINT_TO_TIME
       
 15298  */
       
 15299     case function_sint_to_time :
       
 15300     {
       
 15301         symbol_c *last_type_symbol = NULL;
       
 15302 
       
 15303         {
       
 15304             symbol_c *IN_type_symbol = param_data_type;
       
 15305             last_type_symbol = param_data_type;
       
 15306             
       
 15307             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15308             {
       
 15309         
       
 15310                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15311                 return return_type_symbol;
       
 15312                 
       
 15313             }
       
 15314             
       
 15315             ERROR;
       
 15316         }
       
 15317         
       
 15318     }/*function_sint_to_time*/
       
 15319     break;
       
 15320 
       
 15321 /****
       
 15322  *SINT_TO_DATE
       
 15323  */
       
 15324     case function_sint_to_date :
       
 15325     {
       
 15326         symbol_c *last_type_symbol = NULL;
       
 15327 
       
 15328         {
       
 15329             symbol_c *IN_type_symbol = param_data_type;
       
 15330             last_type_symbol = param_data_type;
       
 15331             
       
 15332             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15333             {
       
 15334         
       
 15335                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 15336                 return return_type_symbol;
       
 15337                 
       
 15338             }
       
 15339             
       
 15340             ERROR;
       
 15341         }
       
 15342         
       
 15343     }/*function_sint_to_date*/
       
 15344     break;
       
 15345 
       
 15346 /****
       
 15347  *SINT_TO_TOD
       
 15348  */
       
 15349     case function_sint_to_tod :
       
 15350     {
       
 15351         symbol_c *last_type_symbol = NULL;
       
 15352 
       
 15353         {
       
 15354             symbol_c *IN_type_symbol = param_data_type;
       
 15355             last_type_symbol = param_data_type;
       
 15356             
       
 15357             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15358             {
       
 15359         
       
 15360                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 15361                 return return_type_symbol;
       
 15362                 
       
 15363             }
       
 15364             
       
 15365             ERROR;
       
 15366         }
       
 15367         
       
 15368     }/*function_sint_to_tod*/
       
 15369     break;
       
 15370 
       
 15371 /****
       
 15372  *SINT_TO_DT
       
 15373  */
       
 15374     case function_sint_to_dt :
       
 15375     {
       
 15376         symbol_c *last_type_symbol = NULL;
       
 15377 
       
 15378         {
       
 15379             symbol_c *IN_type_symbol = param_data_type;
       
 15380             last_type_symbol = param_data_type;
       
 15381             
       
 15382             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15383             {
       
 15384         
       
 15385                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 15386                 return return_type_symbol;
       
 15387                 
       
 15388             }
       
 15389             
       
 15390             ERROR;
       
 15391         }
       
 15392         
       
 15393     }/*function_sint_to_dt*/
       
 15394     break;
       
 15395 
       
 15396 /****
       
 15397  *SINT_TO_STRING
       
 15398  */
       
 15399     case function_sint_to_string :
       
 15400     {
       
 15401         symbol_c *last_type_symbol = NULL;
       
 15402 
       
 15403         {
       
 15404             symbol_c *IN_type_symbol = param_data_type;
       
 15405             last_type_symbol = param_data_type;
       
 15406             
       
 15407             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15408             {
       
 15409         
       
 15410                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15411                 return return_type_symbol;
       
 15412                 
       
 15413             }
       
 15414             
       
 15415             ERROR;
       
 15416         }
       
 15417         
       
 15418     }/*function_sint_to_string*/
       
 15419     break;
       
 15420 
       
 15421 /****
       
 15422  *SINT_TO_BYTE
       
 15423  */
       
 15424     case function_sint_to_byte :
       
 15425     {
       
 15426         symbol_c *last_type_symbol = NULL;
       
 15427 
       
 15428         {
       
 15429             symbol_c *IN_type_symbol = param_data_type;
       
 15430             last_type_symbol = param_data_type;
       
 15431             
       
 15432             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15433             {
       
 15434         
       
 15435                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15436                 return return_type_symbol;
       
 15437                 
       
 15438             }
       
 15439             
       
 15440             ERROR;
       
 15441         }
       
 15442         
       
 15443     }/*function_sint_to_byte*/
       
 15444     break;
       
 15445 
       
 15446 /****
       
 15447  *SINT_TO_WORD
       
 15448  */
       
 15449     case function_sint_to_word :
       
 15450     {
       
 15451         symbol_c *last_type_symbol = NULL;
       
 15452 
       
 15453         {
       
 15454             symbol_c *IN_type_symbol = param_data_type;
       
 15455             last_type_symbol = param_data_type;
       
 15456             
       
 15457             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15458             {
       
 15459         
       
 15460                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 15461                 return return_type_symbol;
       
 15462                 
       
 15463             }
       
 15464             
       
 15465             ERROR;
       
 15466         }
       
 15467         
       
 15468     }/*function_sint_to_word*/
       
 15469     break;
       
 15470 
       
 15471 /****
       
 15472  *SINT_TO_DWORD
       
 15473  */
       
 15474     case function_sint_to_dword :
       
 15475     {
       
 15476         symbol_c *last_type_symbol = NULL;
       
 15477 
       
 15478         {
       
 15479             symbol_c *IN_type_symbol = param_data_type;
       
 15480             last_type_symbol = param_data_type;
       
 15481             
       
 15482             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15483             {
       
 15484         
       
 15485                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 15486                 return return_type_symbol;
       
 15487                 
       
 15488             }
       
 15489             
       
 15490             ERROR;
       
 15491         }
       
 15492         
       
 15493     }/*function_sint_to_dword*/
       
 15494     break;
       
 15495 
       
 15496 /****
       
 15497  *SINT_TO_LWORD
       
 15498  */
       
 15499     case function_sint_to_lword :
       
 15500     {
       
 15501         symbol_c *last_type_symbol = NULL;
       
 15502 
       
 15503         {
       
 15504             symbol_c *IN_type_symbol = param_data_type;
       
 15505             last_type_symbol = param_data_type;
       
 15506             
       
 15507             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15508             {
       
 15509         
       
 15510                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15511                 return return_type_symbol;
       
 15512                 
       
 15513             }
       
 15514             
       
 15515             ERROR;
       
 15516         }
       
 15517         
       
 15518     }/*function_sint_to_lword*/
       
 15519     break;
       
 15520 
       
 15521 /****
       
 15522  *INT_TO_BOOL
       
 15523  */
       
 15524     case function_int_to_bool :
       
 15525     {
       
 15526         symbol_c *last_type_symbol = NULL;
       
 15527 
       
 15528         {
       
 15529             symbol_c *IN_type_symbol = param_data_type;
       
 15530             last_type_symbol = param_data_type;
       
 15531             
       
 15532             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15533             {
       
 15534         
       
 15535                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15536                 return return_type_symbol;
       
 15537                 
       
 15538             }
       
 15539             
       
 15540             ERROR;
       
 15541         }
       
 15542         
       
 15543     }/*function_int_to_bool*/
       
 15544     break;
       
 15545 
       
 15546 /****
       
 15547  *INT_TO_SINT
       
 15548  */
       
 15549     case function_int_to_sint :
       
 15550     {
       
 15551         symbol_c *last_type_symbol = NULL;
       
 15552 
       
 15553         {
       
 15554             symbol_c *IN_type_symbol = param_data_type;
       
 15555             last_type_symbol = param_data_type;
       
 15556             
       
 15557             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15558             {
       
 15559         
       
 15560                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 15561                 return return_type_symbol;
       
 15562                 
       
 15563             }
       
 15564             
       
 15565             ERROR;
       
 15566         }
       
 15567         
       
 15568     }/*function_int_to_sint*/
       
 15569     break;
       
 15570 
       
 15571 /****
       
 15572  *INT_TO_DINT
       
 15573  */
       
 15574     case function_int_to_dint :
       
 15575     {
       
 15576         symbol_c *last_type_symbol = NULL;
       
 15577 
       
 15578         {
       
 15579             symbol_c *IN_type_symbol = param_data_type;
       
 15580             last_type_symbol = param_data_type;
       
 15581             
       
 15582             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15583             {
       
 15584         
       
 15585                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 15586                 return return_type_symbol;
       
 15587                 
       
 15588             }
       
 15589             
       
 15590             ERROR;
       
 15591         }
       
 15592         
       
 15593     }/*function_int_to_dint*/
       
 15594     break;
       
 15595 
       
 15596 /****
       
 15597  *INT_TO_LINT
       
 15598  */
       
 15599     case function_int_to_lint :
       
 15600     {
       
 15601         symbol_c *last_type_symbol = NULL;
       
 15602 
       
 15603         {
       
 15604             symbol_c *IN_type_symbol = param_data_type;
       
 15605             last_type_symbol = param_data_type;
       
 15606             
       
 15607             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15608             {
       
 15609         
       
 15610                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15611                 return return_type_symbol;
       
 15612                 
       
 15613             }
       
 15614             
       
 15615             ERROR;
       
 15616         }
       
 15617         
       
 15618     }/*function_int_to_lint*/
       
 15619     break;
       
 15620 
       
 15621 /****
       
 15622  *INT_TO_USINT
       
 15623  */
       
 15624     case function_int_to_usint :
       
 15625     {
       
 15626         symbol_c *last_type_symbol = NULL;
       
 15627 
       
 15628         {
       
 15629             symbol_c *IN_type_symbol = param_data_type;
       
 15630             last_type_symbol = param_data_type;
       
 15631             
       
 15632             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15633             {
       
 15634         
       
 15635                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15636                 return return_type_symbol;
       
 15637                 
       
 15638             }
       
 15639             
       
 15640             ERROR;
       
 15641         }
       
 15642         
       
 15643     }/*function_int_to_usint*/
       
 15644     break;
       
 15645 
       
 15646 /****
       
 15647  *INT_TO_UINT
       
 15648  */
       
 15649     case function_int_to_uint :
       
 15650     {
       
 15651         symbol_c *last_type_symbol = NULL;
       
 15652 
       
 15653         {
       
 15654             symbol_c *IN_type_symbol = param_data_type;
       
 15655             last_type_symbol = param_data_type;
       
 15656             
       
 15657             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15658             {
       
 15659         
       
 15660                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15661                 return return_type_symbol;
       
 15662                 
       
 15663             }
       
 15664             
       
 15665             ERROR;
       
 15666         }
       
 15667         
       
 15668     }/*function_int_to_uint*/
       
 15669     break;
       
 15670 
       
 15671 /****
       
 15672  *INT_TO_UDINT
       
 15673  */
       
 15674     case function_int_to_udint :
       
 15675     {
       
 15676         symbol_c *last_type_symbol = NULL;
       
 15677 
       
 15678         {
       
 15679             symbol_c *IN_type_symbol = param_data_type;
       
 15680             last_type_symbol = param_data_type;
       
 15681             
       
 15682             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15683             {
       
 15684         
       
 15685                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 15686                 return return_type_symbol;
       
 15687                 
       
 15688             }
       
 15689             
       
 15690             ERROR;
       
 15691         }
       
 15692         
       
 15693     }/*function_int_to_udint*/
       
 15694     break;
       
 15695 
       
 15696 /****
       
 15697  *INT_TO_ULINT
       
 15698  */
       
 15699     case function_int_to_ulint :
       
 15700     {
       
 15701         symbol_c *last_type_symbol = NULL;
       
 15702 
       
 15703         {
       
 15704             symbol_c *IN_type_symbol = param_data_type;
       
 15705             last_type_symbol = param_data_type;
       
 15706             
       
 15707             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15708             {
       
 15709         
       
 15710                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15711                 return return_type_symbol;
       
 15712                 
       
 15713             }
       
 15714             
       
 15715             ERROR;
       
 15716         }
       
 15717         
       
 15718     }/*function_int_to_ulint*/
       
 15719     break;
       
 15720 
       
 15721 /****
       
 15722  *INT_TO_REAL
       
 15723  */
       
 15724     case function_int_to_real :
       
 15725     {
       
 15726         symbol_c *last_type_symbol = NULL;
       
 15727 
       
 15728         {
       
 15729             symbol_c *IN_type_symbol = param_data_type;
       
 15730             last_type_symbol = param_data_type;
       
 15731             
       
 15732             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15733             {
       
 15734         
       
 15735                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 15736                 return return_type_symbol;
       
 15737                 
       
 15738             }
       
 15739             
       
 15740             ERROR;
       
 15741         }
       
 15742         
       
 15743     }/*function_int_to_real*/
       
 15744     break;
       
 15745 
       
 15746 /****
       
 15747  *INT_TO_LREAL
       
 15748  */
       
 15749     case function_int_to_lreal :
       
 15750     {
       
 15751         symbol_c *last_type_symbol = NULL;
       
 15752 
       
 15753         {
       
 15754             symbol_c *IN_type_symbol = param_data_type;
       
 15755             last_type_symbol = param_data_type;
       
 15756             
       
 15757             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15758             {
       
 15759         
       
 15760                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15761                 return return_type_symbol;
       
 15762                 
       
 15763             }
       
 15764             
       
 15765             ERROR;
       
 15766         }
       
 15767         
       
 15768     }/*function_int_to_lreal*/
       
 15769     break;
       
 15770 
       
 15771 /****
       
 15772  *INT_TO_TIME
       
 15773  */
       
 15774     case function_int_to_time :
       
 15775     {
       
 15776         symbol_c *last_type_symbol = NULL;
       
 15777 
       
 15778         {
       
 15779             symbol_c *IN_type_symbol = param_data_type;
       
 15780             last_type_symbol = param_data_type;
       
 15781             
       
 15782             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15783             {
       
 15784         
       
 15785                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15786                 return return_type_symbol;
       
 15787                 
       
 15788             }
       
 15789             
       
 15790             ERROR;
       
 15791         }
       
 15792         
       
 15793     }/*function_int_to_time*/
       
 15794     break;
       
 15795 
       
 15796 /****
       
 15797  *INT_TO_DATE
       
 15798  */
       
 15799     case function_int_to_date :
       
 15800     {
       
 15801         symbol_c *last_type_symbol = NULL;
       
 15802 
       
 15803         {
       
 15804             symbol_c *IN_type_symbol = param_data_type;
       
 15805             last_type_symbol = param_data_type;
       
 15806             
       
 15807             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15808             {
       
 15809         
       
 15810                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 15811                 return return_type_symbol;
       
 15812                 
       
 15813             }
       
 15814             
       
 15815             ERROR;
       
 15816         }
       
 15817         
       
 15818     }/*function_int_to_date*/
       
 15819     break;
       
 15820 
       
 15821 /****
       
 15822  *INT_TO_TOD
       
 15823  */
       
 15824     case function_int_to_tod :
       
 15825     {
       
 15826         symbol_c *last_type_symbol = NULL;
       
 15827 
       
 15828         {
       
 15829             symbol_c *IN_type_symbol = param_data_type;
       
 15830             last_type_symbol = param_data_type;
       
 15831             
       
 15832             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15833             {
       
 15834         
       
 15835                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 15836                 return return_type_symbol;
       
 15837                 
       
 15838             }
       
 15839             
       
 15840             ERROR;
       
 15841         }
       
 15842         
       
 15843     }/*function_int_to_tod*/
       
 15844     break;
       
 15845 
       
 15846 /****
       
 15847  *INT_TO_DT
       
 15848  */
       
 15849     case function_int_to_dt :
       
 15850     {
       
 15851         symbol_c *last_type_symbol = NULL;
       
 15852 
       
 15853         {
       
 15854             symbol_c *IN_type_symbol = param_data_type;
       
 15855             last_type_symbol = param_data_type;
       
 15856             
       
 15857             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15858             {
       
 15859         
       
 15860                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 15861                 return return_type_symbol;
       
 15862                 
       
 15863             }
       
 15864             
       
 15865             ERROR;
       
 15866         }
       
 15867         
       
 15868     }/*function_int_to_dt*/
       
 15869     break;
       
 15870 
       
 15871 /****
       
 15872  *INT_TO_STRING
       
 15873  */
       
 15874     case function_int_to_string :
       
 15875     {
       
 15876         symbol_c *last_type_symbol = NULL;
       
 15877 
       
 15878         {
       
 15879             symbol_c *IN_type_symbol = param_data_type;
       
 15880             last_type_symbol = param_data_type;
       
 15881             
       
 15882             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15883             {
       
 15884         
       
 15885                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15886                 return return_type_symbol;
       
 15887                 
       
 15888             }
       
 15889             
       
 15890             ERROR;
       
 15891         }
       
 15892         
       
 15893     }/*function_int_to_string*/
       
 15894     break;
       
 15895 
       
 15896 /****
       
 15897  *INT_TO_BYTE
       
 15898  */
       
 15899     case function_int_to_byte :
       
 15900     {
       
 15901         symbol_c *last_type_symbol = NULL;
       
 15902 
       
 15903         {
       
 15904             symbol_c *IN_type_symbol = param_data_type;
       
 15905             last_type_symbol = param_data_type;
       
 15906             
       
 15907             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15908             {
       
 15909         
       
 15910                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15911                 return return_type_symbol;
       
 15912                 
       
 15913             }
       
 15914             
       
 15915             ERROR;
       
 15916         }
       
 15917         
       
 15918     }/*function_int_to_byte*/
       
 15919     break;
       
 15920 
       
 15921 /****
       
 15922  *INT_TO_WORD
       
 15923  */
       
 15924     case function_int_to_word :
       
 15925     {
       
 15926         symbol_c *last_type_symbol = NULL;
       
 15927 
       
 15928         {
       
 15929             symbol_c *IN_type_symbol = param_data_type;
       
 15930             last_type_symbol = param_data_type;
       
 15931             
       
 15932             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15933             {
       
 15934         
       
 15935                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 15936                 return return_type_symbol;
       
 15937                 
       
 15938             }
       
 15939             
       
 15940             ERROR;
       
 15941         }
       
 15942         
       
 15943     }/*function_int_to_word*/
       
 15944     break;
       
 15945 
       
 15946 /****
       
 15947  *INT_TO_DWORD
       
 15948  */
       
 15949     case function_int_to_dword :
       
 15950     {
       
 15951         symbol_c *last_type_symbol = NULL;
       
 15952 
       
 15953         {
       
 15954             symbol_c *IN_type_symbol = param_data_type;
       
 15955             last_type_symbol = param_data_type;
       
 15956             
       
 15957             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15958             {
       
 15959         
       
 15960                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 15961                 return return_type_symbol;
       
 15962                 
       
 15963             }
       
 15964             
       
 15965             ERROR;
       
 15966         }
       
 15967         
       
 15968     }/*function_int_to_dword*/
       
 15969     break;
       
 15970 
       
 15971 /****
       
 15972  *INT_TO_LWORD
       
 15973  */
       
 15974     case function_int_to_lword :
       
 15975     {
       
 15976         symbol_c *last_type_symbol = NULL;
       
 15977 
       
 15978         {
       
 15979             symbol_c *IN_type_symbol = param_data_type;
       
 15980             last_type_symbol = param_data_type;
       
 15981             
       
 15982             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 15983             {
       
 15984         
       
 15985                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15986                 return return_type_symbol;
       
 15987                 
       
 15988             }
       
 15989             
       
 15990             ERROR;
       
 15991         }
       
 15992         
       
 15993     }/*function_int_to_lword*/
       
 15994     break;
       
 15995 
       
 15996 /****
       
 15997  *DINT_TO_BOOL
       
 15998  */
       
 15999     case function_dint_to_bool :
       
 16000     {
       
 16001         symbol_c *last_type_symbol = NULL;
       
 16002 
       
 16003         {
       
 16004             symbol_c *IN_type_symbol = param_data_type;
       
 16005             last_type_symbol = param_data_type;
       
 16006             
       
 16007             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16008             {
       
 16009         
       
 16010                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16011                 return return_type_symbol;
       
 16012                 
       
 16013             }
       
 16014             
       
 16015             ERROR;
       
 16016         }
       
 16017         
       
 16018     }/*function_dint_to_bool*/
       
 16019     break;
       
 16020 
       
 16021 /****
       
 16022  *DINT_TO_SINT
       
 16023  */
       
 16024     case function_dint_to_sint :
       
 16025     {
       
 16026         symbol_c *last_type_symbol = NULL;
       
 16027 
       
 16028         {
       
 16029             symbol_c *IN_type_symbol = param_data_type;
       
 16030             last_type_symbol = param_data_type;
       
 16031             
       
 16032             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16033             {
       
 16034         
       
 16035                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 16036                 return return_type_symbol;
       
 16037                 
       
 16038             }
       
 16039             
       
 16040             ERROR;
       
 16041         }
       
 16042         
       
 16043     }/*function_dint_to_sint*/
       
 16044     break;
       
 16045 
       
 16046 /****
       
 16047  *DINT_TO_INT
       
 16048  */
       
 16049     case function_dint_to_int :
       
 16050     {
       
 16051         symbol_c *last_type_symbol = NULL;
       
 16052 
       
 16053         {
       
 16054             symbol_c *IN_type_symbol = param_data_type;
       
 16055             last_type_symbol = param_data_type;
       
 16056             
       
 16057             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16058             {
       
 16059         
       
 16060                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16061                 return return_type_symbol;
       
 16062                 
       
 16063             }
       
 16064             
       
 16065             ERROR;
       
 16066         }
       
 16067         
       
 16068     }/*function_dint_to_int*/
       
 16069     break;
       
 16070 
       
 16071 /****
       
 16072  *DINT_TO_LINT
       
 16073  */
       
 16074     case function_dint_to_lint :
       
 16075     {
       
 16076         symbol_c *last_type_symbol = NULL;
       
 16077 
       
 16078         {
       
 16079             symbol_c *IN_type_symbol = param_data_type;
       
 16080             last_type_symbol = param_data_type;
       
 16081             
       
 16082             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16083             {
       
 16084         
       
 16085                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16086                 return return_type_symbol;
       
 16087                 
       
 16088             }
       
 16089             
       
 16090             ERROR;
       
 16091         }
       
 16092         
       
 16093     }/*function_dint_to_lint*/
       
 16094     break;
       
 16095 
       
 16096 /****
       
 16097  *DINT_TO_USINT
       
 16098  */
       
 16099     case function_dint_to_usint :
       
 16100     {
       
 16101         symbol_c *last_type_symbol = NULL;
       
 16102 
       
 16103         {
       
 16104             symbol_c *IN_type_symbol = param_data_type;
       
 16105             last_type_symbol = param_data_type;
       
 16106             
       
 16107             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16108             {
       
 16109         
       
 16110                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 16111                 return return_type_symbol;
       
 16112                 
       
 16113             }
       
 16114             
       
 16115             ERROR;
       
 16116         }
       
 16117         
       
 16118     }/*function_dint_to_usint*/
       
 16119     break;
       
 16120 
       
 16121 /****
       
 16122  *DINT_TO_UINT
       
 16123  */
       
 16124     case function_dint_to_uint :
       
 16125     {
       
 16126         symbol_c *last_type_symbol = NULL;
       
 16127 
       
 16128         {
       
 16129             symbol_c *IN_type_symbol = param_data_type;
       
 16130             last_type_symbol = param_data_type;
       
 16131             
       
 16132             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16133             {
       
 16134         
       
 16135                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 16136                 return return_type_symbol;
       
 16137                 
       
 16138             }
       
 16139             
       
 16140             ERROR;
       
 16141         }
       
 16142         
       
 16143     }/*function_dint_to_uint*/
       
 16144     break;
       
 16145 
       
 16146 /****
       
 16147  *DINT_TO_UDINT
       
 16148  */
       
 16149     case function_dint_to_udint :
       
 16150     {
       
 16151         symbol_c *last_type_symbol = NULL;
       
 16152 
       
 16153         {
       
 16154             symbol_c *IN_type_symbol = param_data_type;
       
 16155             last_type_symbol = param_data_type;
       
 16156             
       
 16157             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16158             {
       
 16159         
       
 16160                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 16161                 return return_type_symbol;
       
 16162                 
       
 16163             }
       
 16164             
       
 16165             ERROR;
       
 16166         }
       
 16167         
       
 16168     }/*function_dint_to_udint*/
       
 16169     break;
       
 16170 
       
 16171 /****
       
 16172  *DINT_TO_ULINT
       
 16173  */
       
 16174     case function_dint_to_ulint :
       
 16175     {
       
 16176         symbol_c *last_type_symbol = NULL;
       
 16177 
       
 16178         {
       
 16179             symbol_c *IN_type_symbol = param_data_type;
       
 16180             last_type_symbol = param_data_type;
       
 16181             
       
 16182             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16183             {
       
 16184         
       
 16185                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 16186                 return return_type_symbol;
       
 16187                 
       
 16188             }
       
 16189             
       
 16190             ERROR;
       
 16191         }
       
 16192         
       
 16193     }/*function_dint_to_ulint*/
       
 16194     break;
       
 16195 
       
 16196 /****
       
 16197  *DINT_TO_REAL
       
 16198  */
       
 16199     case function_dint_to_real :
       
 16200     {
       
 16201         symbol_c *last_type_symbol = NULL;
       
 16202 
       
 16203         {
       
 16204             symbol_c *IN_type_symbol = param_data_type;
       
 16205             last_type_symbol = param_data_type;
       
 16206             
       
 16207             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16208             {
       
 16209         
       
 16210                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 16211                 return return_type_symbol;
       
 16212                 
       
 16213             }
       
 16214             
       
 16215             ERROR;
       
 16216         }
       
 16217         
       
 16218     }/*function_dint_to_real*/
       
 16219     break;
       
 16220 
       
 16221 /****
       
 16222  *DINT_TO_LREAL
       
 16223  */
       
 16224     case function_dint_to_lreal :
       
 16225     {
       
 16226         symbol_c *last_type_symbol = NULL;
       
 16227 
       
 16228         {
       
 16229             symbol_c *IN_type_symbol = param_data_type;
       
 16230             last_type_symbol = param_data_type;
       
 16231             
       
 16232             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16233             {
       
 16234         
       
 16235                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16236                 return return_type_symbol;
       
 16237                 
       
 16238             }
       
 16239             
       
 16240             ERROR;
       
 16241         }
       
 16242         
       
 16243     }/*function_dint_to_lreal*/
       
 16244     break;
       
 16245 
       
 16246 /****
       
 16247  *DINT_TO_TIME
       
 16248  */
       
 16249     case function_dint_to_time :
       
 16250     {
       
 16251         symbol_c *last_type_symbol = NULL;
       
 16252 
       
 16253         {
       
 16254             symbol_c *IN_type_symbol = param_data_type;
       
 16255             last_type_symbol = param_data_type;
       
 16256             
       
 16257             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16258             {
       
 16259         
       
 16260                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16261                 return return_type_symbol;
       
 16262                 
       
 16263             }
       
 16264             
       
 16265             ERROR;
       
 16266         }
       
 16267         
       
 16268     }/*function_dint_to_time*/
       
 16269     break;
       
 16270 
       
 16271 /****
       
 16272  *DINT_TO_DATE
       
 16273  */
       
 16274     case function_dint_to_date :
       
 16275     {
       
 16276         symbol_c *last_type_symbol = NULL;
       
 16277 
       
 16278         {
       
 16279             symbol_c *IN_type_symbol = param_data_type;
       
 16280             last_type_symbol = param_data_type;
       
 16281             
       
 16282             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16283             {
       
 16284         
       
 16285                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 16286                 return return_type_symbol;
       
 16287                 
       
 16288             }
       
 16289             
       
 16290             ERROR;
       
 16291         }
       
 16292         
       
 16293     }/*function_dint_to_date*/
       
 16294     break;
       
 16295 
       
 16296 /****
       
 16297  *DINT_TO_TOD
       
 16298  */
       
 16299     case function_dint_to_tod :
       
 16300     {
       
 16301         symbol_c *last_type_symbol = NULL;
       
 16302 
       
 16303         {
       
 16304             symbol_c *IN_type_symbol = param_data_type;
       
 16305             last_type_symbol = param_data_type;
       
 16306             
       
 16307             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16308             {
       
 16309         
       
 16310                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 16311                 return return_type_symbol;
       
 16312                 
       
 16313             }
       
 16314             
       
 16315             ERROR;
       
 16316         }
       
 16317         
       
 16318     }/*function_dint_to_tod*/
       
 16319     break;
       
 16320 
       
 16321 /****
       
 16322  *DINT_TO_DT
       
 16323  */
       
 16324     case function_dint_to_dt :
       
 16325     {
       
 16326         symbol_c *last_type_symbol = NULL;
       
 16327 
       
 16328         {
       
 16329             symbol_c *IN_type_symbol = param_data_type;
       
 16330             last_type_symbol = param_data_type;
       
 16331             
       
 16332             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16333             {
       
 16334         
       
 16335                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16336                 return return_type_symbol;
       
 16337                 
       
 16338             }
       
 16339             
       
 16340             ERROR;
       
 16341         }
       
 16342         
       
 16343     }/*function_dint_to_dt*/
       
 16344     break;
       
 16345 
       
 16346 /****
       
 16347  *DINT_TO_STRING
       
 16348  */
       
 16349     case function_dint_to_string :
       
 16350     {
       
 16351         symbol_c *last_type_symbol = NULL;
       
 16352 
       
 16353         {
       
 16354             symbol_c *IN_type_symbol = param_data_type;
       
 16355             last_type_symbol = param_data_type;
       
 16356             
       
 16357             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16358             {
       
 16359         
       
 16360                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16361                 return return_type_symbol;
       
 16362                 
       
 16363             }
       
 16364             
       
 16365             ERROR;
       
 16366         }
       
 16367         
       
 16368     }/*function_dint_to_string*/
       
 16369     break;
       
 16370 
       
 16371 /****
       
 16372  *DINT_TO_BYTE
       
 16373  */
       
 16374     case function_dint_to_byte :
       
 16375     {
       
 16376         symbol_c *last_type_symbol = NULL;
       
 16377 
       
 16378         {
       
 16379             symbol_c *IN_type_symbol = param_data_type;
       
 16380             last_type_symbol = param_data_type;
       
 16381             
       
 16382             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16383             {
       
 16384         
       
 16385                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 16386                 return return_type_symbol;
       
 16387                 
       
 16388             }
       
 16389             
       
 16390             ERROR;
       
 16391         }
       
 16392         
       
 16393     }/*function_dint_to_byte*/
       
 16394     break;
       
 16395 
       
 16396 /****
       
 16397  *DINT_TO_WORD
       
 16398  */
       
 16399     case function_dint_to_word :
       
 16400     {
       
 16401         symbol_c *last_type_symbol = NULL;
       
 16402 
       
 16403         {
       
 16404             symbol_c *IN_type_symbol = param_data_type;
       
 16405             last_type_symbol = param_data_type;
       
 16406             
       
 16407             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16408             {
       
 16409         
       
 16410                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 16411                 return return_type_symbol;
       
 16412                 
       
 16413             }
       
 16414             
       
 16415             ERROR;
       
 16416         }
       
 16417         
       
 16418     }/*function_dint_to_word*/
       
 16419     break;
       
 16420 
       
 16421 /****
       
 16422  *DINT_TO_DWORD
       
 16423  */
       
 16424     case function_dint_to_dword :
       
 16425     {
       
 16426         symbol_c *last_type_symbol = NULL;
       
 16427 
       
 16428         {
       
 16429             symbol_c *IN_type_symbol = param_data_type;
       
 16430             last_type_symbol = param_data_type;
       
 16431             
       
 16432             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16433             {
       
 16434         
       
 16435                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 16436                 return return_type_symbol;
       
 16437                 
       
 16438             }
       
 16439             
       
 16440             ERROR;
       
 16441         }
       
 16442         
       
 16443     }/*function_dint_to_dword*/
       
 16444     break;
       
 16445 
       
 16446 /****
       
 16447  *DINT_TO_LWORD
       
 16448  */
       
 16449     case function_dint_to_lword :
       
 16450     {
       
 16451         symbol_c *last_type_symbol = NULL;
       
 16452 
       
 16453         {
       
 16454             symbol_c *IN_type_symbol = param_data_type;
       
 16455             last_type_symbol = param_data_type;
       
 16456             
       
 16457             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16458             {
       
 16459         
       
 16460                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 16461                 return return_type_symbol;
       
 16462                 
       
 16463             }
       
 16464             
       
 16465             ERROR;
       
 16466         }
       
 16467         
       
 16468     }/*function_dint_to_lword*/
       
 16469     break;
       
 16470 
       
 16471 /****
       
 16472  *LINT_TO_BOOL
       
 16473  */
       
 16474     case function_lint_to_bool :
       
 16475     {
       
 16476         symbol_c *last_type_symbol = NULL;
       
 16477 
       
 16478         {
       
 16479             symbol_c *IN_type_symbol = param_data_type;
       
 16480             last_type_symbol = param_data_type;
       
 16481             
       
 16482             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16483             {
       
 16484         
       
 16485                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16486                 return return_type_symbol;
       
 16487                 
       
 16488             }
       
 16489             
       
 16490             ERROR;
       
 16491         }
       
 16492         
       
 16493     }/*function_lint_to_bool*/
       
 16494     break;
       
 16495 
       
 16496 /****
       
 16497  *LINT_TO_SINT
       
 16498  */
       
 16499     case function_lint_to_sint :
       
 16500     {
       
 16501         symbol_c *last_type_symbol = NULL;
       
 16502 
       
 16503         {
       
 16504             symbol_c *IN_type_symbol = param_data_type;
       
 16505             last_type_symbol = param_data_type;
       
 16506             
       
 16507             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16508             {
       
 16509         
       
 16510                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 16511                 return return_type_symbol;
       
 16512                 
       
 16513             }
       
 16514             
       
 16515             ERROR;
       
 16516         }
       
 16517         
       
 16518     }/*function_lint_to_sint*/
       
 16519     break;
       
 16520 
       
 16521 /****
       
 16522  *LINT_TO_INT
       
 16523  */
       
 16524     case function_lint_to_int :
       
 16525     {
       
 16526         symbol_c *last_type_symbol = NULL;
       
 16527 
       
 16528         {
       
 16529             symbol_c *IN_type_symbol = param_data_type;
       
 16530             last_type_symbol = param_data_type;
       
 16531             
       
 16532             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16533             {
       
 16534         
       
 16535                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16536                 return return_type_symbol;
       
 16537                 
       
 16538             }
       
 16539             
       
 16540             ERROR;
       
 16541         }
       
 16542         
       
 16543     }/*function_lint_to_int*/
       
 16544     break;
       
 16545 
       
 16546 /****
       
 16547  *LINT_TO_DINT
       
 16548  */
       
 16549     case function_lint_to_dint :
       
 16550     {
       
 16551         symbol_c *last_type_symbol = NULL;
       
 16552 
       
 16553         {
       
 16554             symbol_c *IN_type_symbol = param_data_type;
       
 16555             last_type_symbol = param_data_type;
       
 16556             
       
 16557             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16558             {
       
 16559         
       
 16560                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 16561                 return return_type_symbol;
       
 16562                 
       
 16563             }
       
 16564             
       
 16565             ERROR;
       
 16566         }
       
 16567         
       
 16568     }/*function_lint_to_dint*/
       
 16569     break;
       
 16570 
       
 16571 /****
       
 16572  *LINT_TO_USINT
       
 16573  */
       
 16574     case function_lint_to_usint :
       
 16575     {
       
 16576         symbol_c *last_type_symbol = NULL;
       
 16577 
       
 16578         {
       
 16579             symbol_c *IN_type_symbol = param_data_type;
       
 16580             last_type_symbol = param_data_type;
       
 16581             
       
 16582             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16583             {
       
 16584         
       
 16585                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 16586                 return return_type_symbol;
       
 16587                 
       
 16588             }
       
 16589             
       
 16590             ERROR;
       
 16591         }
       
 16592         
       
 16593     }/*function_lint_to_usint*/
       
 16594     break;
       
 16595 
       
 16596 /****
       
 16597  *LINT_TO_UINT
       
 16598  */
       
 16599     case function_lint_to_uint :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16608             {
       
 16609         
       
 16610                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 16611                 return return_type_symbol;
       
 16612                 
       
 16613             }
       
 16614             
       
 16615             ERROR;
       
 16616         }
       
 16617         
       
 16618     }/*function_lint_to_uint*/
       
 16619     break;
       
 16620 
       
 16621 /****
       
 16622  *LINT_TO_UDINT
       
 16623  */
       
 16624     case function_lint_to_udint :
       
 16625     {
       
 16626         symbol_c *last_type_symbol = NULL;
       
 16627 
       
 16628         {
       
 16629             symbol_c *IN_type_symbol = param_data_type;
       
 16630             last_type_symbol = param_data_type;
       
 16631             
       
 16632             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16633             {
       
 16634         
       
 16635                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 16636                 return return_type_symbol;
       
 16637                 
       
 16638             }
       
 16639             
       
 16640             ERROR;
       
 16641         }
       
 16642         
       
 16643     }/*function_lint_to_udint*/
       
 16644     break;
       
 16645 
       
 16646 /****
       
 16647  *LINT_TO_ULINT
       
 16648  */
       
 16649     case function_lint_to_ulint :
       
 16650     {
       
 16651         symbol_c *last_type_symbol = NULL;
       
 16652 
       
 16653         {
       
 16654             symbol_c *IN_type_symbol = param_data_type;
       
 16655             last_type_symbol = param_data_type;
       
 16656             
       
 16657             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16658             {
       
 16659         
       
 16660                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 16661                 return return_type_symbol;
       
 16662                 
       
 16663             }
       
 16664             
       
 16665             ERROR;
       
 16666         }
       
 16667         
       
 16668     }/*function_lint_to_ulint*/
       
 16669     break;
       
 16670 
       
 16671 /****
       
 16672  *LINT_TO_REAL
       
 16673  */
       
 16674     case function_lint_to_real :
       
 16675     {
       
 16676         symbol_c *last_type_symbol = NULL;
       
 16677 
       
 16678         {
       
 16679             symbol_c *IN_type_symbol = param_data_type;
       
 16680             last_type_symbol = param_data_type;
       
 16681             
       
 16682             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16683             {
       
 16684         
       
 16685                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 16686                 return return_type_symbol;
       
 16687                 
       
 16688             }
       
 16689             
       
 16690             ERROR;
       
 16691         }
       
 16692         
       
 16693     }/*function_lint_to_real*/
       
 16694     break;
       
 16695 
       
 16696 /****
       
 16697  *LINT_TO_LREAL
       
 16698  */
       
 16699     case function_lint_to_lreal :
       
 16700     {
       
 16701         symbol_c *last_type_symbol = NULL;
       
 16702 
       
 16703         {
       
 16704             symbol_c *IN_type_symbol = param_data_type;
       
 16705             last_type_symbol = param_data_type;
       
 16706             
       
 16707             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16708             {
       
 16709         
       
 16710                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16711                 return return_type_symbol;
       
 16712                 
       
 16713             }
       
 16714             
       
 16715             ERROR;
       
 16716         }
       
 16717         
       
 16718     }/*function_lint_to_lreal*/
       
 16719     break;
       
 16720 
       
 16721 /****
       
 16722  *LINT_TO_TIME
       
 16723  */
       
 16724     case function_lint_to_time :
       
 16725     {
       
 16726         symbol_c *last_type_symbol = NULL;
       
 16727 
       
 16728         {
       
 16729             symbol_c *IN_type_symbol = param_data_type;
       
 16730             last_type_symbol = param_data_type;
       
 16731             
       
 16732             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16733             {
       
 16734         
       
 16735                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16736                 return return_type_symbol;
       
 16737                 
       
 16738             }
       
 16739             
       
 16740             ERROR;
       
 16741         }
       
 16742         
       
 16743     }/*function_lint_to_time*/
       
 16744     break;
       
 16745 
       
 16746 /****
       
 16747  *LINT_TO_DATE
       
 16748  */
       
 16749     case function_lint_to_date :
       
 16750     {
       
 16751         symbol_c *last_type_symbol = NULL;
       
 16752 
       
 16753         {
       
 16754             symbol_c *IN_type_symbol = param_data_type;
       
 16755             last_type_symbol = param_data_type;
       
 16756             
       
 16757             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16758             {
       
 16759         
       
 16760                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 16761                 return return_type_symbol;
       
 16762                 
       
 16763             }
       
 16764             
       
 16765             ERROR;
       
 16766         }
       
 16767         
       
 16768     }/*function_lint_to_date*/
       
 16769     break;
       
 16770 
       
 16771 /****
       
 16772  *LINT_TO_TOD
       
 16773  */
       
 16774     case function_lint_to_tod :
       
 16775     {
       
 16776         symbol_c *last_type_symbol = NULL;
       
 16777 
       
 16778         {
       
 16779             symbol_c *IN_type_symbol = param_data_type;
       
 16780             last_type_symbol = param_data_type;
       
 16781             
       
 16782             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16783             {
       
 16784         
       
 16785                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 16786                 return return_type_symbol;
       
 16787                 
       
 16788             }
       
 16789             
       
 16790             ERROR;
       
 16791         }
       
 16792         
       
 16793     }/*function_lint_to_tod*/
       
 16794     break;
       
 16795 
       
 16796 /****
       
 16797  *LINT_TO_DT
       
 16798  */
       
 16799     case function_lint_to_dt :
       
 16800     {
       
 16801         symbol_c *last_type_symbol = NULL;
       
 16802 
       
 16803         {
       
 16804             symbol_c *IN_type_symbol = param_data_type;
       
 16805             last_type_symbol = param_data_type;
       
 16806             
       
 16807             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16808             {
       
 16809         
       
 16810                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16811                 return return_type_symbol;
       
 16812                 
       
 16813             }
       
 16814             
       
 16815             ERROR;
       
 16816         }
       
 16817         
       
 16818     }/*function_lint_to_dt*/
       
 16819     break;
       
 16820 
       
 16821 /****
       
 16822  *LINT_TO_STRING
       
 16823  */
       
 16824     case function_lint_to_string :
       
 16825     {
       
 16826         symbol_c *last_type_symbol = NULL;
       
 16827 
       
 16828         {
       
 16829             symbol_c *IN_type_symbol = param_data_type;
       
 16830             last_type_symbol = param_data_type;
       
 16831             
       
 16832             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16833             {
       
 16834         
       
 16835                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16836                 return return_type_symbol;
       
 16837                 
       
 16838             }
       
 16839             
       
 16840             ERROR;
       
 16841         }
       
 16842         
       
 16843     }/*function_lint_to_string*/
       
 16844     break;
       
 16845 
       
 16846 /****
       
 16847  *LINT_TO_BYTE
       
 16848  */
       
 16849     case function_lint_to_byte :
       
 16850     {
       
 16851         symbol_c *last_type_symbol = NULL;
       
 16852 
       
 16853         {
       
 16854             symbol_c *IN_type_symbol = param_data_type;
       
 16855             last_type_symbol = param_data_type;
       
 16856             
       
 16857             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16858             {
       
 16859         
       
 16860                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 16861                 return return_type_symbol;
       
 16862                 
       
 16863             }
       
 16864             
       
 16865             ERROR;
       
 16866         }
       
 16867         
       
 16868     }/*function_lint_to_byte*/
       
 16869     break;
       
 16870 
       
 16871 /****
       
 16872  *LINT_TO_WORD
       
 16873  */
       
 16874     case function_lint_to_word :
       
 16875     {
       
 16876         symbol_c *last_type_symbol = NULL;
       
 16877 
       
 16878         {
       
 16879             symbol_c *IN_type_symbol = param_data_type;
       
 16880             last_type_symbol = param_data_type;
       
 16881             
       
 16882             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16883             {
       
 16884         
       
 16885                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 16886                 return return_type_symbol;
       
 16887                 
       
 16888             }
       
 16889             
       
 16890             ERROR;
       
 16891         }
       
 16892         
       
 16893     }/*function_lint_to_word*/
       
 16894     break;
       
 16895 
       
 16896 /****
       
 16897  *LINT_TO_DWORD
       
 16898  */
       
 16899     case function_lint_to_dword :
       
 16900     {
       
 16901         symbol_c *last_type_symbol = NULL;
       
 16902 
       
 16903         {
       
 16904             symbol_c *IN_type_symbol = param_data_type;
       
 16905             last_type_symbol = param_data_type;
       
 16906             
       
 16907             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16908             {
       
 16909         
       
 16910                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 16911                 return return_type_symbol;
       
 16912                 
       
 16913             }
       
 16914             
       
 16915             ERROR;
       
 16916         }
       
 16917         
       
 16918     }/*function_lint_to_dword*/
       
 16919     break;
       
 16920 
       
 16921 /****
       
 16922  *LINT_TO_LWORD
       
 16923  */
       
 16924     case function_lint_to_lword :
       
 16925     {
       
 16926         symbol_c *last_type_symbol = NULL;
       
 16927 
       
 16928         {
       
 16929             symbol_c *IN_type_symbol = param_data_type;
       
 16930             last_type_symbol = param_data_type;
       
 16931             
       
 16932             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16933             {
       
 16934         
       
 16935                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 16936                 return return_type_symbol;
       
 16937                 
       
 16938             }
       
 16939             
       
 16940             ERROR;
       
 16941         }
       
 16942         
       
 16943     }/*function_lint_to_lword*/
       
 16944     break;
       
 16945 
       
 16946 /****
       
 16947  *USINT_TO_BOOL
       
 16948  */
       
 16949     case function_usint_to_bool :
       
 16950     {
       
 16951         symbol_c *last_type_symbol = NULL;
       
 16952 
       
 16953         {
       
 16954             symbol_c *IN_type_symbol = param_data_type;
       
 16955             last_type_symbol = param_data_type;
       
 16956             
       
 16957             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 16958             {
       
 16959         
       
 16960                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16961                 return return_type_symbol;
       
 16962                 
       
 16963             }
       
 16964             
       
 16965             ERROR;
       
 16966         }
       
 16967         
       
 16968     }/*function_usint_to_bool*/
       
 16969     break;
       
 16970 
       
 16971 /****
       
 16972  *USINT_TO_SINT
       
 16973  */
       
 16974     case function_usint_to_sint :
       
 16975     {
       
 16976         symbol_c *last_type_symbol = NULL;
       
 16977 
       
 16978         {
       
 16979             symbol_c *IN_type_symbol = param_data_type;
       
 16980             last_type_symbol = param_data_type;
       
 16981             
       
 16982             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 16983             {
       
 16984         
       
 16985                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 16986                 return return_type_symbol;
       
 16987                 
       
 16988             }
       
 16989             
       
 16990             ERROR;
       
 16991         }
       
 16992         
       
 16993     }/*function_usint_to_sint*/
       
 16994     break;
       
 16995 
       
 16996 /****
       
 16997  *USINT_TO_INT
       
 16998  */
       
 16999     case function_usint_to_int :
       
 17000     {
       
 17001         symbol_c *last_type_symbol = NULL;
       
 17002 
       
 17003         {
       
 17004             symbol_c *IN_type_symbol = param_data_type;
       
 17005             last_type_symbol = param_data_type;
       
 17006             
       
 17007             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17008             {
       
 17009         
       
 17010                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17011                 return return_type_symbol;
       
 17012                 
       
 17013             }
       
 17014             
       
 17015             ERROR;
       
 17016         }
       
 17017         
       
 17018     }/*function_usint_to_int*/
       
 17019     break;
       
 17020 
       
 17021 /****
       
 17022  *USINT_TO_DINT
       
 17023  */
       
 17024     case function_usint_to_dint :
       
 17025     {
       
 17026         symbol_c *last_type_symbol = NULL;
       
 17027 
       
 17028         {
       
 17029             symbol_c *IN_type_symbol = param_data_type;
       
 17030             last_type_symbol = param_data_type;
       
 17031             
       
 17032             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17033             {
       
 17034         
       
 17035                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 17036                 return return_type_symbol;
       
 17037                 
       
 17038             }
       
 17039             
       
 17040             ERROR;
       
 17041         }
       
 17042         
       
 17043     }/*function_usint_to_dint*/
       
 17044     break;
       
 17045 
       
 17046 /****
       
 17047  *USINT_TO_LINT
       
 17048  */
       
 17049     case function_usint_to_lint :
       
 17050     {
       
 17051         symbol_c *last_type_symbol = NULL;
       
 17052 
       
 17053         {
       
 17054             symbol_c *IN_type_symbol = param_data_type;
       
 17055             last_type_symbol = param_data_type;
       
 17056             
       
 17057             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17058             {
       
 17059         
       
 17060                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17061                 return return_type_symbol;
       
 17062                 
       
 17063             }
       
 17064             
       
 17065             ERROR;
       
 17066         }
       
 17067         
       
 17068     }/*function_usint_to_lint*/
       
 17069     break;
       
 17070 
       
 17071 /****
       
 17072  *USINT_TO_UINT
       
 17073  */
       
 17074     case function_usint_to_uint :
       
 17075     {
       
 17076         symbol_c *last_type_symbol = NULL;
       
 17077 
       
 17078         {
       
 17079             symbol_c *IN_type_symbol = param_data_type;
       
 17080             last_type_symbol = param_data_type;
       
 17081             
       
 17082             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17083             {
       
 17084         
       
 17085                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 17086                 return return_type_symbol;
       
 17087                 
       
 17088             }
       
 17089             
       
 17090             ERROR;
       
 17091         }
       
 17092         
       
 17093     }/*function_usint_to_uint*/
       
 17094     break;
       
 17095 
       
 17096 /****
       
 17097  *USINT_TO_UDINT
       
 17098  */
       
 17099     case function_usint_to_udint :
       
 17100     {
       
 17101         symbol_c *last_type_symbol = NULL;
       
 17102 
       
 17103         {
       
 17104             symbol_c *IN_type_symbol = param_data_type;
       
 17105             last_type_symbol = param_data_type;
       
 17106             
       
 17107             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17108             {
       
 17109         
       
 17110                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 17111                 return return_type_symbol;
       
 17112                 
       
 17113             }
       
 17114             
       
 17115             ERROR;
       
 17116         }
       
 17117         
       
 17118     }/*function_usint_to_udint*/
       
 17119     break;
       
 17120 
       
 17121 /****
       
 17122  *USINT_TO_ULINT
       
 17123  */
       
 17124     case function_usint_to_ulint :
       
 17125     {
       
 17126         symbol_c *last_type_symbol = NULL;
       
 17127 
       
 17128         {
       
 17129             symbol_c *IN_type_symbol = param_data_type;
       
 17130             last_type_symbol = param_data_type;
       
 17131             
       
 17132             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17133             {
       
 17134         
       
 17135                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 17136                 return return_type_symbol;
       
 17137                 
       
 17138             }
       
 17139             
       
 17140             ERROR;
       
 17141         }
       
 17142         
       
 17143     }/*function_usint_to_ulint*/
       
 17144     break;
       
 17145 
       
 17146 /****
       
 17147  *USINT_TO_REAL
       
 17148  */
       
 17149     case function_usint_to_real :
       
 17150     {
       
 17151         symbol_c *last_type_symbol = NULL;
       
 17152 
       
 17153         {
       
 17154             symbol_c *IN_type_symbol = param_data_type;
       
 17155             last_type_symbol = param_data_type;
       
 17156             
       
 17157             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17158             {
       
 17159         
       
 17160                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 17161                 return return_type_symbol;
       
 17162                 
       
 17163             }
       
 17164             
       
 17165             ERROR;
       
 17166         }
       
 17167         
       
 17168     }/*function_usint_to_real*/
       
 17169     break;
       
 17170 
       
 17171 /****
       
 17172  *USINT_TO_LREAL
       
 17173  */
       
 17174     case function_usint_to_lreal :
       
 17175     {
       
 17176         symbol_c *last_type_symbol = NULL;
       
 17177 
       
 17178         {
       
 17179             symbol_c *IN_type_symbol = param_data_type;
       
 17180             last_type_symbol = param_data_type;
       
 17181             
       
 17182             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17183             {
       
 17184         
       
 17185                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17186                 return return_type_symbol;
       
 17187                 
       
 17188             }
       
 17189             
       
 17190             ERROR;
       
 17191         }
       
 17192         
       
 17193     }/*function_usint_to_lreal*/
       
 17194     break;
       
 17195 
       
 17196 /****
       
 17197  *USINT_TO_TIME
       
 17198  */
       
 17199     case function_usint_to_time :
       
 17200     {
       
 17201         symbol_c *last_type_symbol = NULL;
       
 17202 
       
 17203         {
       
 17204             symbol_c *IN_type_symbol = param_data_type;
       
 17205             last_type_symbol = param_data_type;
       
 17206             
       
 17207             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17208             {
       
 17209         
       
 17210                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17211                 return return_type_symbol;
       
 17212                 
       
 17213             }
       
 17214             
       
 17215             ERROR;
       
 17216         }
       
 17217         
       
 17218     }/*function_usint_to_time*/
       
 17219     break;
       
 17220 
       
 17221 /****
       
 17222  *USINT_TO_DATE
       
 17223  */
       
 17224     case function_usint_to_date :
       
 17225     {
       
 17226         symbol_c *last_type_symbol = NULL;
       
 17227 
       
 17228         {
       
 17229             symbol_c *IN_type_symbol = param_data_type;
       
 17230             last_type_symbol = param_data_type;
       
 17231             
       
 17232             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17233             {
       
 17234         
       
 17235                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 17236                 return return_type_symbol;
       
 17237                 
       
 17238             }
       
 17239             
       
 17240             ERROR;
       
 17241         }
       
 17242         
       
 17243     }/*function_usint_to_date*/
       
 17244     break;
       
 17245 
       
 17246 /****
       
 17247  *USINT_TO_TOD
       
 17248  */
       
 17249     case function_usint_to_tod :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17258             {
       
 17259         
       
 17260                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17261                 return return_type_symbol;
       
 17262                 
       
 17263             }
       
 17264             
       
 17265             ERROR;
       
 17266         }
       
 17267         
       
 17268     }/*function_usint_to_tod*/
       
 17269     break;
       
 17270 
       
 17271 /****
       
 17272  *USINT_TO_DT
       
 17273  */
       
 17274     case function_usint_to_dt :
       
 17275     {
       
 17276         symbol_c *last_type_symbol = NULL;
       
 17277 
       
 17278         {
       
 17279             symbol_c *IN_type_symbol = param_data_type;
       
 17280             last_type_symbol = param_data_type;
       
 17281             
       
 17282             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17283             {
       
 17284         
       
 17285                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17286                 return return_type_symbol;
       
 17287                 
       
 17288             }
       
 17289             
       
 17290             ERROR;
       
 17291         }
       
 17292         
       
 17293     }/*function_usint_to_dt*/
       
 17294     break;
       
 17295 
       
 17296 /****
       
 17297  *USINT_TO_STRING
       
 17298  */
       
 17299     case function_usint_to_string :
       
 17300     {
       
 17301         symbol_c *last_type_symbol = NULL;
       
 17302 
       
 17303         {
       
 17304             symbol_c *IN_type_symbol = param_data_type;
       
 17305             last_type_symbol = param_data_type;
       
 17306             
       
 17307             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17308             {
       
 17309         
       
 17310                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 17311                 return return_type_symbol;
       
 17312                 
       
 17313             }
       
 17314             
       
 17315             ERROR;
       
 17316         }
       
 17317         
       
 17318     }/*function_usint_to_string*/
       
 17319     break;
       
 17320 
       
 17321 /****
       
 17322  *USINT_TO_BYTE
       
 17323  */
       
 17324     case function_usint_to_byte :
       
 17325     {
       
 17326         symbol_c *last_type_symbol = NULL;
       
 17327 
       
 17328         {
       
 17329             symbol_c *IN_type_symbol = param_data_type;
       
 17330             last_type_symbol = param_data_type;
       
 17331             
       
 17332             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17333             {
       
 17334         
       
 17335                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 17336                 return return_type_symbol;
       
 17337                 
       
 17338             }
       
 17339             
       
 17340             ERROR;
       
 17341         }
       
 17342         
       
 17343     }/*function_usint_to_byte*/
       
 17344     break;
       
 17345 
       
 17346 /****
       
 17347  *USINT_TO_WORD
       
 17348  */
       
 17349     case function_usint_to_word :
       
 17350     {
       
 17351         symbol_c *last_type_symbol = NULL;
       
 17352 
       
 17353         {
       
 17354             symbol_c *IN_type_symbol = param_data_type;
       
 17355             last_type_symbol = param_data_type;
       
 17356             
       
 17357             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17358             {
       
 17359         
       
 17360                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 17361                 return return_type_symbol;
       
 17362                 
       
 17363             }
       
 17364             
       
 17365             ERROR;
       
 17366         }
       
 17367         
       
 17368     }/*function_usint_to_word*/
       
 17369     break;
       
 17370 
       
 17371 /****
       
 17372  *USINT_TO_DWORD
       
 17373  */
       
 17374     case function_usint_to_dword :
       
 17375     {
       
 17376         symbol_c *last_type_symbol = NULL;
       
 17377 
       
 17378         {
       
 17379             symbol_c *IN_type_symbol = param_data_type;
       
 17380             last_type_symbol = param_data_type;
       
 17381             
       
 17382             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17383             {
       
 17384         
       
 17385                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 17386                 return return_type_symbol;
       
 17387                 
       
 17388             }
       
 17389             
       
 17390             ERROR;
       
 17391         }
       
 17392         
       
 17393     }/*function_usint_to_dword*/
       
 17394     break;
       
 17395 
       
 17396 /****
       
 17397  *USINT_TO_LWORD
       
 17398  */
       
 17399     case function_usint_to_lword :
       
 17400     {
       
 17401         symbol_c *last_type_symbol = NULL;
       
 17402 
       
 17403         {
       
 17404             symbol_c *IN_type_symbol = param_data_type;
       
 17405             last_type_symbol = param_data_type;
       
 17406             
       
 17407             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 17408             {
       
 17409         
       
 17410                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17411                 return return_type_symbol;
       
 17412                 
       
 17413             }
       
 17414             
       
 17415             ERROR;
       
 17416         }
       
 17417         
       
 17418     }/*function_usint_to_lword*/
       
 17419     break;
       
 17420 
       
 17421 /****
       
 17422  *UINT_TO_BOOL
       
 17423  */
       
 17424     case function_uint_to_bool :
       
 17425     {
       
 17426         symbol_c *last_type_symbol = NULL;
       
 17427 
       
 17428         {
       
 17429             symbol_c *IN_type_symbol = param_data_type;
       
 17430             last_type_symbol = param_data_type;
       
 17431             
       
 17432             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17433             {
       
 17434         
       
 17435                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 17436                 return return_type_symbol;
       
 17437                 
       
 17438             }
       
 17439             
       
 17440             ERROR;
       
 17441         }
       
 17442         
       
 17443     }/*function_uint_to_bool*/
       
 17444     break;
       
 17445 
       
 17446 /****
       
 17447  *UINT_TO_SINT
       
 17448  */
       
 17449     case function_uint_to_sint :
       
 17450     {
       
 17451         symbol_c *last_type_symbol = NULL;
       
 17452 
       
 17453         {
       
 17454             symbol_c *IN_type_symbol = param_data_type;
       
 17455             last_type_symbol = param_data_type;
       
 17456             
       
 17457             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17458             {
       
 17459         
       
 17460                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 17461                 return return_type_symbol;
       
 17462                 
       
 17463             }
       
 17464             
       
 17465             ERROR;
       
 17466         }
       
 17467         
       
 17468     }/*function_uint_to_sint*/
       
 17469     break;
       
 17470 
       
 17471 /****
       
 17472  *UINT_TO_INT
       
 17473  */
       
 17474     case function_uint_to_int :
       
 17475     {
       
 17476         symbol_c *last_type_symbol = NULL;
       
 17477 
       
 17478         {
       
 17479             symbol_c *IN_type_symbol = param_data_type;
       
 17480             last_type_symbol = param_data_type;
       
 17481             
       
 17482             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17483             {
       
 17484         
       
 17485                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17486                 return return_type_symbol;
       
 17487                 
       
 17488             }
       
 17489             
       
 17490             ERROR;
       
 17491         }
       
 17492         
       
 17493     }/*function_uint_to_int*/
       
 17494     break;
       
 17495 
       
 17496 /****
       
 17497  *UINT_TO_DINT
       
 17498  */
       
 17499     case function_uint_to_dint :
       
 17500     {
       
 17501         symbol_c *last_type_symbol = NULL;
       
 17502 
       
 17503         {
       
 17504             symbol_c *IN_type_symbol = param_data_type;
       
 17505             last_type_symbol = param_data_type;
       
 17506             
       
 17507             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17508             {
       
 17509         
       
 17510                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 17511                 return return_type_symbol;
       
 17512                 
       
 17513             }
       
 17514             
       
 17515             ERROR;
       
 17516         }
       
 17517         
       
 17518     }/*function_uint_to_dint*/
       
 17519     break;
       
 17520 
       
 17521 /****
       
 17522  *UINT_TO_LINT
       
 17523  */
       
 17524     case function_uint_to_lint :
       
 17525     {
       
 17526         symbol_c *last_type_symbol = NULL;
       
 17527 
       
 17528         {
       
 17529             symbol_c *IN_type_symbol = param_data_type;
       
 17530             last_type_symbol = param_data_type;
       
 17531             
       
 17532             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17533             {
       
 17534         
       
 17535                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17536                 return return_type_symbol;
       
 17537                 
       
 17538             }
       
 17539             
       
 17540             ERROR;
       
 17541         }
       
 17542         
       
 17543     }/*function_uint_to_lint*/
       
 17544     break;
       
 17545 
       
 17546 /****
       
 17547  *UINT_TO_USINT
       
 17548  */
       
 17549     case function_uint_to_usint :
       
 17550     {
       
 17551         symbol_c *last_type_symbol = NULL;
       
 17552 
       
 17553         {
       
 17554             symbol_c *IN_type_symbol = param_data_type;
       
 17555             last_type_symbol = param_data_type;
       
 17556             
       
 17557             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17558             {
       
 17559         
       
 17560                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 17561                 return return_type_symbol;
       
 17562                 
       
 17563             }
       
 17564             
       
 17565             ERROR;
       
 17566         }
       
 17567         
       
 17568     }/*function_uint_to_usint*/
       
 17569     break;
       
 17570 
       
 17571 /****
       
 17572  *UINT_TO_UDINT
       
 17573  */
       
 17574     case function_uint_to_udint :
       
 17575     {
       
 17576         symbol_c *last_type_symbol = NULL;
       
 17577 
       
 17578         {
       
 17579             symbol_c *IN_type_symbol = param_data_type;
       
 17580             last_type_symbol = param_data_type;
       
 17581             
       
 17582             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17583             {
       
 17584         
       
 17585                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 17586                 return return_type_symbol;
       
 17587                 
       
 17588             }
       
 17589             
       
 17590             ERROR;
       
 17591         }
       
 17592         
       
 17593     }/*function_uint_to_udint*/
       
 17594     break;
       
 17595 
       
 17596 /****
       
 17597  *UINT_TO_ULINT
       
 17598  */
       
 17599     case function_uint_to_ulint :
       
 17600     {
       
 17601         symbol_c *last_type_symbol = NULL;
       
 17602 
       
 17603         {
       
 17604             symbol_c *IN_type_symbol = param_data_type;
       
 17605             last_type_symbol = param_data_type;
       
 17606             
       
 17607             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17608             {
       
 17609         
       
 17610                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 17611                 return return_type_symbol;
       
 17612                 
       
 17613             }
       
 17614             
       
 17615             ERROR;
       
 17616         }
       
 17617         
       
 17618     }/*function_uint_to_ulint*/
       
 17619     break;
       
 17620 
       
 17621 /****
       
 17622  *UINT_TO_REAL
       
 17623  */
       
 17624     case function_uint_to_real :
       
 17625     {
       
 17626         symbol_c *last_type_symbol = NULL;
       
 17627 
       
 17628         {
       
 17629             symbol_c *IN_type_symbol = param_data_type;
       
 17630             last_type_symbol = param_data_type;
       
 17631             
       
 17632             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17633             {
       
 17634         
       
 17635                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 17636                 return return_type_symbol;
       
 17637                 
       
 17638             }
       
 17639             
       
 17640             ERROR;
       
 17641         }
       
 17642         
       
 17643     }/*function_uint_to_real*/
       
 17644     break;
       
 17645 
       
 17646 /****
       
 17647  *UINT_TO_LREAL
       
 17648  */
       
 17649     case function_uint_to_lreal :
       
 17650     {
       
 17651         symbol_c *last_type_symbol = NULL;
       
 17652 
       
 17653         {
       
 17654             symbol_c *IN_type_symbol = param_data_type;
       
 17655             last_type_symbol = param_data_type;
       
 17656             
       
 17657             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17658             {
       
 17659         
       
 17660                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17661                 return return_type_symbol;
       
 17662                 
       
 17663             }
       
 17664             
       
 17665             ERROR;
       
 17666         }
       
 17667         
       
 17668     }/*function_uint_to_lreal*/
       
 17669     break;
       
 17670 
       
 17671 /****
       
 17672  *UINT_TO_TIME
       
 17673  */
       
 17674     case function_uint_to_time :
       
 17675     {
       
 17676         symbol_c *last_type_symbol = NULL;
       
 17677 
       
 17678         {
       
 17679             symbol_c *IN_type_symbol = param_data_type;
       
 17680             last_type_symbol = param_data_type;
       
 17681             
       
 17682             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17683             {
       
 17684         
       
 17685                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17686                 return return_type_symbol;
       
 17687                 
       
 17688             }
       
 17689             
       
 17690             ERROR;
       
 17691         }
       
 17692         
       
 17693     }/*function_uint_to_time*/
       
 17694     break;
       
 17695 
       
 17696 /****
       
 17697  *UINT_TO_DATE
       
 17698  */
       
 17699     case function_uint_to_date :
       
 17700     {
       
 17701         symbol_c *last_type_symbol = NULL;
       
 17702 
       
 17703         {
       
 17704             symbol_c *IN_type_symbol = param_data_type;
       
 17705             last_type_symbol = param_data_type;
       
 17706             
       
 17707             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17708             {
       
 17709         
       
 17710                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 17711                 return return_type_symbol;
       
 17712                 
       
 17713             }
       
 17714             
       
 17715             ERROR;
       
 17716         }
       
 17717         
       
 17718     }/*function_uint_to_date*/
       
 17719     break;
       
 17720 
       
 17721 /****
       
 17722  *UINT_TO_TOD
       
 17723  */
       
 17724     case function_uint_to_tod :
       
 17725     {
       
 17726         symbol_c *last_type_symbol = NULL;
       
 17727 
       
 17728         {
       
 17729             symbol_c *IN_type_symbol = param_data_type;
       
 17730             last_type_symbol = param_data_type;
       
 17731             
       
 17732             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17733             {
       
 17734         
       
 17735                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17736                 return return_type_symbol;
       
 17737                 
       
 17738             }
       
 17739             
       
 17740             ERROR;
       
 17741         }
       
 17742         
       
 17743     }/*function_uint_to_tod*/
       
 17744     break;
       
 17745 
       
 17746 /****
       
 17747  *UINT_TO_DT
       
 17748  */
       
 17749     case function_uint_to_dt :
       
 17750     {
       
 17751         symbol_c *last_type_symbol = NULL;
       
 17752 
       
 17753         {
       
 17754             symbol_c *IN_type_symbol = param_data_type;
       
 17755             last_type_symbol = param_data_type;
       
 17756             
       
 17757             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17758             {
       
 17759         
       
 17760                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17761                 return return_type_symbol;
       
 17762                 
       
 17763             }
       
 17764             
       
 17765             ERROR;
       
 17766         }
       
 17767         
       
 17768     }/*function_uint_to_dt*/
       
 17769     break;
       
 17770 
       
 17771 /****
       
 17772  *UINT_TO_STRING
       
 17773  */
       
 17774     case function_uint_to_string :
       
 17775     {
       
 17776         symbol_c *last_type_symbol = NULL;
       
 17777 
       
 17778         {
       
 17779             symbol_c *IN_type_symbol = param_data_type;
       
 17780             last_type_symbol = param_data_type;
       
 17781             
       
 17782             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17783             {
       
 17784         
       
 17785                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 17786                 return return_type_symbol;
       
 17787                 
       
 17788             }
       
 17789             
       
 17790             ERROR;
       
 17791         }
       
 17792         
       
 17793     }/*function_uint_to_string*/
       
 17794     break;
       
 17795 
       
 17796 /****
       
 17797  *UINT_TO_BYTE
       
 17798  */
       
 17799     case function_uint_to_byte :
       
 17800     {
       
 17801         symbol_c *last_type_symbol = NULL;
       
 17802 
       
 17803         {
       
 17804             symbol_c *IN_type_symbol = param_data_type;
       
 17805             last_type_symbol = param_data_type;
       
 17806             
       
 17807             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17808             {
       
 17809         
       
 17810                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 17811                 return return_type_symbol;
       
 17812                 
       
 17813             }
       
 17814             
       
 17815             ERROR;
       
 17816         }
       
 17817         
       
 17818     }/*function_uint_to_byte*/
       
 17819     break;
       
 17820 
       
 17821 /****
       
 17822  *UINT_TO_WORD
       
 17823  */
       
 17824     case function_uint_to_word :
       
 17825     {
       
 17826         symbol_c *last_type_symbol = NULL;
       
 17827 
       
 17828         {
       
 17829             symbol_c *IN_type_symbol = param_data_type;
       
 17830             last_type_symbol = param_data_type;
       
 17831             
       
 17832             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17833             {
       
 17834         
       
 17835                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 17836                 return return_type_symbol;
       
 17837                 
       
 17838             }
       
 17839             
       
 17840             ERROR;
       
 17841         }
       
 17842         
       
 17843     }/*function_uint_to_word*/
       
 17844     break;
       
 17845 
       
 17846 /****
       
 17847  *UINT_TO_DWORD
       
 17848  */
       
 17849     case function_uint_to_dword :
       
 17850     {
       
 17851         symbol_c *last_type_symbol = NULL;
       
 17852 
       
 17853         {
       
 17854             symbol_c *IN_type_symbol = param_data_type;
       
 17855             last_type_symbol = param_data_type;
       
 17856             
       
 17857             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17858             {
       
 17859         
       
 17860                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 17861                 return return_type_symbol;
       
 17862                 
       
 17863             }
       
 17864             
       
 17865             ERROR;
       
 17866         }
       
 17867         
       
 17868     }/*function_uint_to_dword*/
       
 17869     break;
       
 17870 
       
 17871 /****
       
 17872  *UINT_TO_LWORD
       
 17873  */
       
 17874     case function_uint_to_lword :
       
 17875     {
       
 17876         symbol_c *last_type_symbol = NULL;
       
 17877 
       
 17878         {
       
 17879             symbol_c *IN_type_symbol = param_data_type;
       
 17880             last_type_symbol = param_data_type;
       
 17881             
       
 17882             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 17883             {
       
 17884         
       
 17885                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17886                 return return_type_symbol;
       
 17887                 
       
 17888             }
       
 17889             
       
 17890             ERROR;
       
 17891         }
       
 17892         
       
 17893     }/*function_uint_to_lword*/
       
 17894     break;
       
 17895 
       
 17896 /****
       
 17897  *UDINT_TO_BOOL
       
 17898  */
       
 17899     case function_udint_to_bool :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 17908             {
       
 17909         
       
 17910                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 17911                 return return_type_symbol;
       
 17912                 
       
 17913             }
       
 17914             
       
 17915             ERROR;
       
 17916         }
       
 17917         
       
 17918     }/*function_udint_to_bool*/
       
 17919     break;
       
 17920 
       
 17921 /****
       
 17922  *UDINT_TO_SINT
       
 17923  */
       
 17924     case function_udint_to_sint :
       
 17925     {
       
 17926         symbol_c *last_type_symbol = NULL;
       
 17927 
       
 17928         {
       
 17929             symbol_c *IN_type_symbol = param_data_type;
       
 17930             last_type_symbol = param_data_type;
       
 17931             
       
 17932             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 17933             {
       
 17934         
       
 17935                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 17936                 return return_type_symbol;
       
 17937                 
       
 17938             }
       
 17939             
       
 17940             ERROR;
       
 17941         }
       
 17942         
       
 17943     }/*function_udint_to_sint*/
       
 17944     break;
       
 17945 
       
 17946 /****
       
 17947  *UDINT_TO_INT
       
 17948  */
       
 17949     case function_udint_to_int :
       
 17950     {
       
 17951         symbol_c *last_type_symbol = NULL;
       
 17952 
       
 17953         {
       
 17954             symbol_c *IN_type_symbol = param_data_type;
       
 17955             last_type_symbol = param_data_type;
       
 17956             
       
 17957             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 17958             {
       
 17959         
       
 17960                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17961                 return return_type_symbol;
       
 17962                 
       
 17963             }
       
 17964             
       
 17965             ERROR;
       
 17966         }
       
 17967         
       
 17968     }/*function_udint_to_int*/
       
 17969     break;
       
 17970 
       
 17971 /****
       
 17972  *UDINT_TO_DINT
       
 17973  */
       
 17974     case function_udint_to_dint :
       
 17975     {
       
 17976         symbol_c *last_type_symbol = NULL;
       
 17977 
       
 17978         {
       
 17979             symbol_c *IN_type_symbol = param_data_type;
       
 17980             last_type_symbol = param_data_type;
       
 17981             
       
 17982             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 17983             {
       
 17984         
       
 17985                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 17986                 return return_type_symbol;
       
 17987                 
       
 17988             }
       
 17989             
       
 17990             ERROR;
       
 17991         }
       
 17992         
       
 17993     }/*function_udint_to_dint*/
       
 17994     break;
       
 17995 
       
 17996 /****
       
 17997  *UDINT_TO_LINT
       
 17998  */
       
 17999     case function_udint_to_lint :
       
 18000     {
       
 18001         symbol_c *last_type_symbol = NULL;
       
 18002 
       
 18003         {
       
 18004             symbol_c *IN_type_symbol = param_data_type;
       
 18005             last_type_symbol = param_data_type;
       
 18006             
       
 18007             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18008             {
       
 18009         
       
 18010                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18011                 return return_type_symbol;
       
 18012                 
       
 18013             }
       
 18014             
       
 18015             ERROR;
       
 18016         }
       
 18017         
       
 18018     }/*function_udint_to_lint*/
       
 18019     break;
       
 18020 
       
 18021 /****
       
 18022  *UDINT_TO_USINT
       
 18023  */
       
 18024     case function_udint_to_usint :
       
 18025     {
       
 18026         symbol_c *last_type_symbol = NULL;
       
 18027 
       
 18028         {
       
 18029             symbol_c *IN_type_symbol = param_data_type;
       
 18030             last_type_symbol = param_data_type;
       
 18031             
       
 18032             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18033             {
       
 18034         
       
 18035                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18036                 return return_type_symbol;
       
 18037                 
       
 18038             }
       
 18039             
       
 18040             ERROR;
       
 18041         }
       
 18042         
       
 18043     }/*function_udint_to_usint*/
       
 18044     break;
       
 18045 
       
 18046 /****
       
 18047  *UDINT_TO_UINT
       
 18048  */
       
 18049     case function_udint_to_uint :
       
 18050     {
       
 18051         symbol_c *last_type_symbol = NULL;
       
 18052 
       
 18053         {
       
 18054             symbol_c *IN_type_symbol = param_data_type;
       
 18055             last_type_symbol = param_data_type;
       
 18056             
       
 18057             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18058             {
       
 18059         
       
 18060                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18061                 return return_type_symbol;
       
 18062                 
       
 18063             }
       
 18064             
       
 18065             ERROR;
       
 18066         }
       
 18067         
       
 18068     }/*function_udint_to_uint*/
       
 18069     break;
       
 18070 
       
 18071 /****
       
 18072  *UDINT_TO_ULINT
       
 18073  */
       
 18074     case function_udint_to_ulint :
       
 18075     {
       
 18076         symbol_c *last_type_symbol = NULL;
       
 18077 
       
 18078         {
       
 18079             symbol_c *IN_type_symbol = param_data_type;
       
 18080             last_type_symbol = param_data_type;
       
 18081             
       
 18082             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18083             {
       
 18084         
       
 18085                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18086                 return return_type_symbol;
       
 18087                 
       
 18088             }
       
 18089             
       
 18090             ERROR;
       
 18091         }
       
 18092         
       
 18093     }/*function_udint_to_ulint*/
       
 18094     break;
       
 18095 
       
 18096 /****
       
 18097  *UDINT_TO_REAL
       
 18098  */
       
 18099     case function_udint_to_real :
       
 18100     {
       
 18101         symbol_c *last_type_symbol = NULL;
       
 18102 
       
 18103         {
       
 18104             symbol_c *IN_type_symbol = param_data_type;
       
 18105             last_type_symbol = param_data_type;
       
 18106             
       
 18107             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18108             {
       
 18109         
       
 18110                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18111                 return return_type_symbol;
       
 18112                 
       
 18113             }
       
 18114             
       
 18115             ERROR;
       
 18116         }
       
 18117         
       
 18118     }/*function_udint_to_real*/
       
 18119     break;
       
 18120 
       
 18121 /****
       
 18122  *UDINT_TO_LREAL
       
 18123  */
       
 18124     case function_udint_to_lreal :
       
 18125     {
       
 18126         symbol_c *last_type_symbol = NULL;
       
 18127 
       
 18128         {
       
 18129             symbol_c *IN_type_symbol = param_data_type;
       
 18130             last_type_symbol = param_data_type;
       
 18131             
       
 18132             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18133             {
       
 18134         
       
 18135                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18136                 return return_type_symbol;
       
 18137                 
       
 18138             }
       
 18139             
       
 18140             ERROR;
       
 18141         }
       
 18142         
       
 18143     }/*function_udint_to_lreal*/
       
 18144     break;
       
 18145 
       
 18146 /****
       
 18147  *UDINT_TO_TIME
       
 18148  */
       
 18149     case function_udint_to_time :
       
 18150     {
       
 18151         symbol_c *last_type_symbol = NULL;
       
 18152 
       
 18153         {
       
 18154             symbol_c *IN_type_symbol = param_data_type;
       
 18155             last_type_symbol = param_data_type;
       
 18156             
       
 18157             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18158             {
       
 18159         
       
 18160                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 18161                 return return_type_symbol;
       
 18162                 
       
 18163             }
       
 18164             
       
 18165             ERROR;
       
 18166         }
       
 18167         
       
 18168     }/*function_udint_to_time*/
       
 18169     break;
       
 18170 
       
 18171 /****
       
 18172  *UDINT_TO_DATE
       
 18173  */
       
 18174     case function_udint_to_date :
       
 18175     {
       
 18176         symbol_c *last_type_symbol = NULL;
       
 18177 
       
 18178         {
       
 18179             symbol_c *IN_type_symbol = param_data_type;
       
 18180             last_type_symbol = param_data_type;
       
 18181             
       
 18182             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18183             {
       
 18184         
       
 18185                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18186                 return return_type_symbol;
       
 18187                 
       
 18188             }
       
 18189             
       
 18190             ERROR;
       
 18191         }
       
 18192         
       
 18193     }/*function_udint_to_date*/
       
 18194     break;
       
 18195 
       
 18196 /****
       
 18197  *UDINT_TO_TOD
       
 18198  */
       
 18199     case function_udint_to_tod :
       
 18200     {
       
 18201         symbol_c *last_type_symbol = NULL;
       
 18202 
       
 18203         {
       
 18204             symbol_c *IN_type_symbol = param_data_type;
       
 18205             last_type_symbol = param_data_type;
       
 18206             
       
 18207             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18208             {
       
 18209         
       
 18210                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18211                 return return_type_symbol;
       
 18212                 
       
 18213             }
       
 18214             
       
 18215             ERROR;
       
 18216         }
       
 18217         
       
 18218     }/*function_udint_to_tod*/
       
 18219     break;
       
 18220 
       
 18221 /****
       
 18222  *UDINT_TO_DT
       
 18223  */
       
 18224     case function_udint_to_dt :
       
 18225     {
       
 18226         symbol_c *last_type_symbol = NULL;
       
 18227 
       
 18228         {
       
 18229             symbol_c *IN_type_symbol = param_data_type;
       
 18230             last_type_symbol = param_data_type;
       
 18231             
       
 18232             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18233             {
       
 18234         
       
 18235                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18236                 return return_type_symbol;
       
 18237                 
       
 18238             }
       
 18239             
       
 18240             ERROR;
       
 18241         }
       
 18242         
       
 18243     }/*function_udint_to_dt*/
       
 18244     break;
       
 18245 
       
 18246 /****
       
 18247  *UDINT_TO_STRING
       
 18248  */
       
 18249     case function_udint_to_string :
       
 18250     {
       
 18251         symbol_c *last_type_symbol = NULL;
       
 18252 
       
 18253         {
       
 18254             symbol_c *IN_type_symbol = param_data_type;
       
 18255             last_type_symbol = param_data_type;
       
 18256             
       
 18257             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18258             {
       
 18259         
       
 18260                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18261                 return return_type_symbol;
       
 18262                 
       
 18263             }
       
 18264             
       
 18265             ERROR;
       
 18266         }
       
 18267         
       
 18268     }/*function_udint_to_string*/
       
 18269     break;
       
 18270 
       
 18271 /****
       
 18272  *UDINT_TO_BYTE
       
 18273  */
       
 18274     case function_udint_to_byte :
       
 18275     {
       
 18276         symbol_c *last_type_symbol = NULL;
       
 18277 
       
 18278         {
       
 18279             symbol_c *IN_type_symbol = param_data_type;
       
 18280             last_type_symbol = param_data_type;
       
 18281             
       
 18282             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18283             {
       
 18284         
       
 18285                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18286                 return return_type_symbol;
       
 18287                 
       
 18288             }
       
 18289             
       
 18290             ERROR;
       
 18291         }
       
 18292         
       
 18293     }/*function_udint_to_byte*/
       
 18294     break;
       
 18295 
       
 18296 /****
       
 18297  *UDINT_TO_WORD
       
 18298  */
       
 18299     case function_udint_to_word :
       
 18300     {
       
 18301         symbol_c *last_type_symbol = NULL;
       
 18302 
       
 18303         {
       
 18304             symbol_c *IN_type_symbol = param_data_type;
       
 18305             last_type_symbol = param_data_type;
       
 18306             
       
 18307             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18308             {
       
 18309         
       
 18310                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18311                 return return_type_symbol;
       
 18312                 
       
 18313             }
       
 18314             
       
 18315             ERROR;
       
 18316         }
       
 18317         
       
 18318     }/*function_udint_to_word*/
       
 18319     break;
       
 18320 
       
 18321 /****
       
 18322  *UDINT_TO_DWORD
       
 18323  */
       
 18324     case function_udint_to_dword :
       
 18325     {
       
 18326         symbol_c *last_type_symbol = NULL;
       
 18327 
       
 18328         {
       
 18329             symbol_c *IN_type_symbol = param_data_type;
       
 18330             last_type_symbol = param_data_type;
       
 18331             
       
 18332             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18333             {
       
 18334         
       
 18335                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18336                 return return_type_symbol;
       
 18337                 
       
 18338             }
       
 18339             
       
 18340             ERROR;
       
 18341         }
       
 18342         
       
 18343     }/*function_udint_to_dword*/
       
 18344     break;
       
 18345 
       
 18346 /****
       
 18347  *UDINT_TO_LWORD
       
 18348  */
       
 18349     case function_udint_to_lword :
       
 18350     {
       
 18351         symbol_c *last_type_symbol = NULL;
       
 18352 
       
 18353         {
       
 18354             symbol_c *IN_type_symbol = param_data_type;
       
 18355             last_type_symbol = param_data_type;
       
 18356             
       
 18357             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18358             {
       
 18359         
       
 18360                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18361                 return return_type_symbol;
       
 18362                 
       
 18363             }
       
 18364             
       
 18365             ERROR;
       
 18366         }
       
 18367         
       
 18368     }/*function_udint_to_lword*/
       
 18369     break;
       
 18370 
       
 18371 /****
       
 18372  *ULINT_TO_BOOL
       
 18373  */
       
 18374     case function_ulint_to_bool :
       
 18375     {
       
 18376         symbol_c *last_type_symbol = NULL;
       
 18377 
       
 18378         {
       
 18379             symbol_c *IN_type_symbol = param_data_type;
       
 18380             last_type_symbol = param_data_type;
       
 18381             
       
 18382             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18383             {
       
 18384         
       
 18385                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18386                 return return_type_symbol;
       
 18387                 
       
 18388             }
       
 18389             
       
 18390             ERROR;
       
 18391         }
       
 18392         
       
 18393     }/*function_ulint_to_bool*/
       
 18394     break;
       
 18395 
       
 18396 /****
       
 18397  *ULINT_TO_SINT
       
 18398  */
       
 18399     case function_ulint_to_sint :
       
 18400     {
       
 18401         symbol_c *last_type_symbol = NULL;
       
 18402 
       
 18403         {
       
 18404             symbol_c *IN_type_symbol = param_data_type;
       
 18405             last_type_symbol = param_data_type;
       
 18406             
       
 18407             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18408             {
       
 18409         
       
 18410                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18411                 return return_type_symbol;
       
 18412                 
       
 18413             }
       
 18414             
       
 18415             ERROR;
       
 18416         }
       
 18417         
       
 18418     }/*function_ulint_to_sint*/
       
 18419     break;
       
 18420 
       
 18421 /****
       
 18422  *ULINT_TO_INT
       
 18423  */
       
 18424     case function_ulint_to_int :
       
 18425     {
       
 18426         symbol_c *last_type_symbol = NULL;
       
 18427 
       
 18428         {
       
 18429             symbol_c *IN_type_symbol = param_data_type;
       
 18430             last_type_symbol = param_data_type;
       
 18431             
       
 18432             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18433             {
       
 18434         
       
 18435                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18436                 return return_type_symbol;
       
 18437                 
       
 18438             }
       
 18439             
       
 18440             ERROR;
       
 18441         }
       
 18442         
       
 18443     }/*function_ulint_to_int*/
       
 18444     break;
       
 18445 
       
 18446 /****
       
 18447  *ULINT_TO_DINT
       
 18448  */
       
 18449     case function_ulint_to_dint :
       
 18450     {
       
 18451         symbol_c *last_type_symbol = NULL;
       
 18452 
       
 18453         {
       
 18454             symbol_c *IN_type_symbol = param_data_type;
       
 18455             last_type_symbol = param_data_type;
       
 18456             
       
 18457             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18458             {
       
 18459         
       
 18460                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18461                 return return_type_symbol;
       
 18462                 
       
 18463             }
       
 18464             
       
 18465             ERROR;
       
 18466         }
       
 18467         
       
 18468     }/*function_ulint_to_dint*/
       
 18469     break;
       
 18470 
       
 18471 /****
       
 18472  *ULINT_TO_LINT
       
 18473  */
       
 18474     case function_ulint_to_lint :
       
 18475     {
       
 18476         symbol_c *last_type_symbol = NULL;
       
 18477 
       
 18478         {
       
 18479             symbol_c *IN_type_symbol = param_data_type;
       
 18480             last_type_symbol = param_data_type;
       
 18481             
       
 18482             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18483             {
       
 18484         
       
 18485                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18486                 return return_type_symbol;
       
 18487                 
       
 18488             }
       
 18489             
       
 18490             ERROR;
       
 18491         }
       
 18492         
       
 18493     }/*function_ulint_to_lint*/
       
 18494     break;
       
 18495 
       
 18496 /****
       
 18497  *ULINT_TO_USINT
       
 18498  */
       
 18499     case function_ulint_to_usint :
       
 18500     {
       
 18501         symbol_c *last_type_symbol = NULL;
       
 18502 
       
 18503         {
       
 18504             symbol_c *IN_type_symbol = param_data_type;
       
 18505             last_type_symbol = param_data_type;
       
 18506             
       
 18507             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18508             {
       
 18509         
       
 18510                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18511                 return return_type_symbol;
       
 18512                 
       
 18513             }
       
 18514             
       
 18515             ERROR;
       
 18516         }
       
 18517         
       
 18518     }/*function_ulint_to_usint*/
       
 18519     break;
       
 18520 
       
 18521 /****
       
 18522  *ULINT_TO_UINT
       
 18523  */
       
 18524     case function_ulint_to_uint :
       
 18525     {
       
 18526         symbol_c *last_type_symbol = NULL;
       
 18527 
       
 18528         {
       
 18529             symbol_c *IN_type_symbol = param_data_type;
       
 18530             last_type_symbol = param_data_type;
       
 18531             
       
 18532             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18533             {
       
 18534         
       
 18535                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18536                 return return_type_symbol;
       
 18537                 
       
 18538             }
       
 18539             
       
 18540             ERROR;
       
 18541         }
       
 18542         
       
 18543     }/*function_ulint_to_uint*/
       
 18544     break;
       
 18545 
       
 18546 /****
       
 18547  *ULINT_TO_UDINT
       
 18548  */
       
 18549     case function_ulint_to_udint :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18558             {
       
 18559         
       
 18560                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 18561                 return return_type_symbol;
       
 18562                 
       
 18563             }
       
 18564             
       
 18565             ERROR;
       
 18566         }
       
 18567         
       
 18568     }/*function_ulint_to_udint*/
       
 18569     break;
       
 18570 
       
 18571 /****
       
 18572  *ULINT_TO_REAL
       
 18573  */
       
 18574     case function_ulint_to_real :
       
 18575     {
       
 18576         symbol_c *last_type_symbol = NULL;
       
 18577 
       
 18578         {
       
 18579             symbol_c *IN_type_symbol = param_data_type;
       
 18580             last_type_symbol = param_data_type;
       
 18581             
       
 18582             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18583             {
       
 18584         
       
 18585                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18586                 return return_type_symbol;
       
 18587                 
       
 18588             }
       
 18589             
       
 18590             ERROR;
       
 18591         }
       
 18592         
       
 18593     }/*function_ulint_to_real*/
       
 18594     break;
       
 18595 
       
 18596 /****
       
 18597  *ULINT_TO_LREAL
       
 18598  */
       
 18599     case function_ulint_to_lreal :
       
 18600     {
       
 18601         symbol_c *last_type_symbol = NULL;
       
 18602 
       
 18603         {
       
 18604             symbol_c *IN_type_symbol = param_data_type;
       
 18605             last_type_symbol = param_data_type;
       
 18606             
       
 18607             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18608             {
       
 18609         
       
 18610                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18611                 return return_type_symbol;
       
 18612                 
       
 18613             }
       
 18614             
       
 18615             ERROR;
       
 18616         }
       
 18617         
       
 18618     }/*function_ulint_to_lreal*/
       
 18619     break;
       
 18620 
       
 18621 /****
       
 18622  *ULINT_TO_TIME
       
 18623  */
       
 18624     case function_ulint_to_time :
       
 18625     {
       
 18626         symbol_c *last_type_symbol = NULL;
       
 18627 
       
 18628         {
       
 18629             symbol_c *IN_type_symbol = param_data_type;
       
 18630             last_type_symbol = param_data_type;
       
 18631             
       
 18632             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18633             {
       
 18634         
       
 18635                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 18636                 return return_type_symbol;
       
 18637                 
       
 18638             }
       
 18639             
       
 18640             ERROR;
       
 18641         }
       
 18642         
       
 18643     }/*function_ulint_to_time*/
       
 18644     break;
       
 18645 
       
 18646 /****
       
 18647  *ULINT_TO_DATE
       
 18648  */
       
 18649     case function_ulint_to_date :
       
 18650     {
       
 18651         symbol_c *last_type_symbol = NULL;
       
 18652 
       
 18653         {
       
 18654             symbol_c *IN_type_symbol = param_data_type;
       
 18655             last_type_symbol = param_data_type;
       
 18656             
       
 18657             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18658             {
       
 18659         
       
 18660                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18661                 return return_type_symbol;
       
 18662                 
       
 18663             }
       
 18664             
       
 18665             ERROR;
       
 18666         }
       
 18667         
       
 18668     }/*function_ulint_to_date*/
       
 18669     break;
       
 18670 
       
 18671 /****
       
 18672  *ULINT_TO_TOD
       
 18673  */
       
 18674     case function_ulint_to_tod :
       
 18675     {
       
 18676         symbol_c *last_type_symbol = NULL;
       
 18677 
       
 18678         {
       
 18679             symbol_c *IN_type_symbol = param_data_type;
       
 18680             last_type_symbol = param_data_type;
       
 18681             
       
 18682             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18683             {
       
 18684         
       
 18685                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18686                 return return_type_symbol;
       
 18687                 
       
 18688             }
       
 18689             
       
 18690             ERROR;
       
 18691         }
       
 18692         
       
 18693     }/*function_ulint_to_tod*/
       
 18694     break;
       
 18695 
       
 18696 /****
       
 18697  *ULINT_TO_DT
       
 18698  */
       
 18699     case function_ulint_to_dt :
       
 18700     {
       
 18701         symbol_c *last_type_symbol = NULL;
       
 18702 
       
 18703         {
       
 18704             symbol_c *IN_type_symbol = param_data_type;
       
 18705             last_type_symbol = param_data_type;
       
 18706             
       
 18707             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18708             {
       
 18709         
       
 18710                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18711                 return return_type_symbol;
       
 18712                 
       
 18713             }
       
 18714             
       
 18715             ERROR;
       
 18716         }
       
 18717         
       
 18718     }/*function_ulint_to_dt*/
       
 18719     break;
       
 18720 
       
 18721 /****
       
 18722  *ULINT_TO_STRING
       
 18723  */
       
 18724     case function_ulint_to_string :
       
 18725     {
       
 18726         symbol_c *last_type_symbol = NULL;
       
 18727 
       
 18728         {
       
 18729             symbol_c *IN_type_symbol = param_data_type;
       
 18730             last_type_symbol = param_data_type;
       
 18731             
       
 18732             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18733             {
       
 18734         
       
 18735                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18736                 return return_type_symbol;
       
 18737                 
       
 18738             }
       
 18739             
       
 18740             ERROR;
       
 18741         }
       
 18742         
       
 18743     }/*function_ulint_to_string*/
       
 18744     break;
       
 18745 
       
 18746 /****
       
 18747  *ULINT_TO_BYTE
       
 18748  */
       
 18749     case function_ulint_to_byte :
       
 18750     {
       
 18751         symbol_c *last_type_symbol = NULL;
       
 18752 
       
 18753         {
       
 18754             symbol_c *IN_type_symbol = param_data_type;
       
 18755             last_type_symbol = param_data_type;
       
 18756             
       
 18757             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18758             {
       
 18759         
       
 18760                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18761                 return return_type_symbol;
       
 18762                 
       
 18763             }
       
 18764             
       
 18765             ERROR;
       
 18766         }
       
 18767         
       
 18768     }/*function_ulint_to_byte*/
       
 18769     break;
       
 18770 
       
 18771 /****
       
 18772  *ULINT_TO_WORD
       
 18773  */
       
 18774     case function_ulint_to_word :
       
 18775     {
       
 18776         symbol_c *last_type_symbol = NULL;
       
 18777 
       
 18778         {
       
 18779             symbol_c *IN_type_symbol = param_data_type;
       
 18780             last_type_symbol = param_data_type;
       
 18781             
       
 18782             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18783             {
       
 18784         
       
 18785                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18786                 return return_type_symbol;
       
 18787                 
       
 18788             }
       
 18789             
       
 18790             ERROR;
       
 18791         }
       
 18792         
       
 18793     }/*function_ulint_to_word*/
       
 18794     break;
       
 18795 
       
 18796 /****
       
 18797  *ULINT_TO_DWORD
       
 18798  */
       
 18799     case function_ulint_to_dword :
       
 18800     {
       
 18801         symbol_c *last_type_symbol = NULL;
       
 18802 
       
 18803         {
       
 18804             symbol_c *IN_type_symbol = param_data_type;
       
 18805             last_type_symbol = param_data_type;
       
 18806             
       
 18807             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18808             {
       
 18809         
       
 18810                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18811                 return return_type_symbol;
       
 18812                 
       
 18813             }
       
 18814             
       
 18815             ERROR;
       
 18816         }
       
 18817         
       
 18818     }/*function_ulint_to_dword*/
       
 18819     break;
       
 18820 
       
 18821 /****
       
 18822  *ULINT_TO_LWORD
       
 18823  */
       
 18824     case function_ulint_to_lword :
       
 18825     {
       
 18826         symbol_c *last_type_symbol = NULL;
       
 18827 
       
 18828         {
       
 18829             symbol_c *IN_type_symbol = param_data_type;
       
 18830             last_type_symbol = param_data_type;
       
 18831             
       
 18832             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 18833             {
       
 18834         
       
 18835                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18836                 return return_type_symbol;
       
 18837                 
       
 18838             }
       
 18839             
       
 18840             ERROR;
       
 18841         }
       
 18842         
       
 18843     }/*function_ulint_to_lword*/
       
 18844     break;
       
 18845 
       
 18846 /****
       
 18847  *REAL_TO_BOOL
       
 18848  */
       
 18849     case function_real_to_bool :
       
 18850     {
       
 18851         symbol_c *last_type_symbol = NULL;
       
 18852 
       
 18853         {
       
 18854             symbol_c *IN_type_symbol = param_data_type;
       
 18855             last_type_symbol = param_data_type;
       
 18856             
       
 18857             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 18858             {
       
 18859         
       
 18860                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 18861                 return return_type_symbol;
       
 18862                 
       
 18863             }
       
 18864             
       
 18865             ERROR;
       
 18866         }
       
 18867         
       
 18868     }/*function_real_to_bool*/
       
 18869     break;
       
 18870 
       
 18871 /****
       
 18872  *REAL_TO_SINT
       
 18873  */
       
 18874     case function_real_to_sint :
       
 18875     {
       
 18876         symbol_c *last_type_symbol = NULL;
       
 18877 
       
 18878         {
       
 18879             symbol_c *IN_type_symbol = param_data_type;
       
 18880             last_type_symbol = param_data_type;
       
 18881             
       
 18882             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 18883             {
       
 18884         
       
 18885                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18886                 return return_type_symbol;
       
 18887                 
       
 18888             }
       
 18889             
       
 18890             ERROR;
       
 18891         }
       
 18892         
       
 18893     }/*function_real_to_sint*/
       
 18894     break;
       
 18895 
       
 18896 /****
       
 18897  *REAL_TO_INT
       
 18898  */
       
 18899     case function_real_to_int :
       
 18900     {
       
 18901         symbol_c *last_type_symbol = NULL;
       
 18902 
       
 18903         {
       
 18904             symbol_c *IN_type_symbol = param_data_type;
       
 18905             last_type_symbol = param_data_type;
       
 18906             
       
 18907             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 18908             {
       
 18909         
       
 18910                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18911                 return return_type_symbol;
       
 18912                 
       
 18913             }
       
 18914             
       
 18915             ERROR;
       
 18916         }
       
 18917         
       
 18918     }/*function_real_to_int*/
       
 18919     break;
       
 18920 
       
 18921 /****
       
 18922  *REAL_TO_DINT
       
 18923  */
       
 18924     case function_real_to_dint :
       
 18925     {
       
 18926         symbol_c *last_type_symbol = NULL;
       
 18927 
       
 18928         {
       
 18929             symbol_c *IN_type_symbol = param_data_type;
       
 18930             last_type_symbol = param_data_type;
       
 18931             
       
 18932             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 18933             {
       
 18934         
       
 18935                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18936                 return return_type_symbol;
       
 18937                 
       
 18938             }
       
 18939             
       
 18940             ERROR;
       
 18941         }
       
 18942         
       
 18943     }/*function_real_to_dint*/
       
 18944     break;
       
 18945 
       
 18946 /****
       
 18947  *REAL_TO_LINT
       
 18948  */
       
 18949     case function_real_to_lint :
       
 18950     {
       
 18951         symbol_c *last_type_symbol = NULL;
       
 18952 
       
 18953         {
       
 18954             symbol_c *IN_type_symbol = param_data_type;
       
 18955             last_type_symbol = param_data_type;
       
 18956             
       
 18957             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 18958             {
       
 18959         
       
 18960                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18961                 return return_type_symbol;
       
 18962                 
       
 18963             }
       
 18964             
       
 18965             ERROR;
       
 18966         }
       
 18967         
       
 18968     }/*function_real_to_lint*/
       
 18969     break;
       
 18970 
       
 18971 /****
       
 18972  *REAL_TO_USINT
       
 18973  */
       
 18974     case function_real_to_usint :
       
 18975     {
       
 18976         symbol_c *last_type_symbol = NULL;
       
 18977 
       
 18978         {
       
 18979             symbol_c *IN_type_symbol = param_data_type;
       
 18980             last_type_symbol = param_data_type;
       
 18981             
       
 18982             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 18983             {
       
 18984         
       
 18985                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18986                 return return_type_symbol;
       
 18987                 
       
 18988             }
       
 18989             
       
 18990             ERROR;
       
 18991         }
       
 18992         
       
 18993     }/*function_real_to_usint*/
       
 18994     break;
       
 18995 
       
 18996 /****
       
 18997  *REAL_TO_UINT
       
 18998  */
       
 18999     case function_real_to_uint :
       
 19000     {
       
 19001         symbol_c *last_type_symbol = NULL;
       
 19002 
       
 19003         {
       
 19004             symbol_c *IN_type_symbol = param_data_type;
       
 19005             last_type_symbol = param_data_type;
       
 19006             
       
 19007             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19008             {
       
 19009         
       
 19010                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19011                 return return_type_symbol;
       
 19012                 
       
 19013             }
       
 19014             
       
 19015             ERROR;
       
 19016         }
       
 19017         
       
 19018     }/*function_real_to_uint*/
       
 19019     break;
       
 19020 
       
 19021 /****
       
 19022  *REAL_TO_UDINT
       
 19023  */
       
 19024     case function_real_to_udint :
       
 19025     {
       
 19026         symbol_c *last_type_symbol = NULL;
       
 19027 
       
 19028         {
       
 19029             symbol_c *IN_type_symbol = param_data_type;
       
 19030             last_type_symbol = param_data_type;
       
 19031             
       
 19032             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19033             {
       
 19034         
       
 19035                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19036                 return return_type_symbol;
       
 19037                 
       
 19038             }
       
 19039             
       
 19040             ERROR;
       
 19041         }
       
 19042         
       
 19043     }/*function_real_to_udint*/
       
 19044     break;
       
 19045 
       
 19046 /****
       
 19047  *REAL_TO_ULINT
       
 19048  */
       
 19049     case function_real_to_ulint :
       
 19050     {
       
 19051         symbol_c *last_type_symbol = NULL;
       
 19052 
       
 19053         {
       
 19054             symbol_c *IN_type_symbol = param_data_type;
       
 19055             last_type_symbol = param_data_type;
       
 19056             
       
 19057             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19058             {
       
 19059         
       
 19060                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19061                 return return_type_symbol;
       
 19062                 
       
 19063             }
       
 19064             
       
 19065             ERROR;
       
 19066         }
       
 19067         
       
 19068     }/*function_real_to_ulint*/
       
 19069     break;
       
 19070 
       
 19071 /****
       
 19072  *REAL_TO_LREAL
       
 19073  */
       
 19074     case function_real_to_lreal :
       
 19075     {
       
 19076         symbol_c *last_type_symbol = NULL;
       
 19077 
       
 19078         {
       
 19079             symbol_c *IN_type_symbol = param_data_type;
       
 19080             last_type_symbol = param_data_type;
       
 19081             
       
 19082             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19083             {
       
 19084         
       
 19085                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19086                 return return_type_symbol;
       
 19087                 
       
 19088             }
       
 19089             
       
 19090             ERROR;
       
 19091         }
       
 19092         
       
 19093     }/*function_real_to_lreal*/
       
 19094     break;
       
 19095 
       
 19096 /****
       
 19097  *REAL_TO_TIME
       
 19098  */
       
 19099     case function_real_to_time :
       
 19100     {
       
 19101         symbol_c *last_type_symbol = NULL;
       
 19102 
       
 19103         {
       
 19104             symbol_c *IN_type_symbol = param_data_type;
       
 19105             last_type_symbol = param_data_type;
       
 19106             
       
 19107             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19108             {
       
 19109         
       
 19110                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 19111                 return return_type_symbol;
       
 19112                 
       
 19113             }
       
 19114             
       
 19115             ERROR;
       
 19116         }
       
 19117         
       
 19118     }/*function_real_to_time*/
       
 19119     break;
       
 19120 
       
 19121 /****
       
 19122  *REAL_TO_DATE
       
 19123  */
       
 19124     case function_real_to_date :
       
 19125     {
       
 19126         symbol_c *last_type_symbol = NULL;
       
 19127 
       
 19128         {
       
 19129             symbol_c *IN_type_symbol = param_data_type;
       
 19130             last_type_symbol = param_data_type;
       
 19131             
       
 19132             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19133             {
       
 19134         
       
 19135                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 19136                 return return_type_symbol;
       
 19137                 
       
 19138             }
       
 19139             
       
 19140             ERROR;
       
 19141         }
       
 19142         
       
 19143     }/*function_real_to_date*/
       
 19144     break;
       
 19145 
       
 19146 /****
       
 19147  *REAL_TO_TOD
       
 19148  */
       
 19149     case function_real_to_tod :
       
 19150     {
       
 19151         symbol_c *last_type_symbol = NULL;
       
 19152 
       
 19153         {
       
 19154             symbol_c *IN_type_symbol = param_data_type;
       
 19155             last_type_symbol = param_data_type;
       
 19156             
       
 19157             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19158             {
       
 19159         
       
 19160                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 19161                 return return_type_symbol;
       
 19162                 
       
 19163             }
       
 19164             
       
 19165             ERROR;
       
 19166         }
       
 19167         
       
 19168     }/*function_real_to_tod*/
       
 19169     break;
       
 19170 
       
 19171 /****
       
 19172  *REAL_TO_DT
       
 19173  */
       
 19174     case function_real_to_dt :
       
 19175     {
       
 19176         symbol_c *last_type_symbol = NULL;
       
 19177 
       
 19178         {
       
 19179             symbol_c *IN_type_symbol = param_data_type;
       
 19180             last_type_symbol = param_data_type;
       
 19181             
       
 19182             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19183             {
       
 19184         
       
 19185                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 19186                 return return_type_symbol;
       
 19187                 
       
 19188             }
       
 19189             
       
 19190             ERROR;
       
 19191         }
       
 19192         
       
 19193     }/*function_real_to_dt*/
       
 19194     break;
       
 19195 
       
 19196 /****
       
 19197  *REAL_TO_STRING
       
 19198  */
       
 19199     case function_real_to_string :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19208             {
       
 19209         
       
 19210                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19211                 return return_type_symbol;
       
 19212                 
       
 19213             }
       
 19214             
       
 19215             ERROR;
       
 19216         }
       
 19217         
       
 19218     }/*function_real_to_string*/
       
 19219     break;
       
 19220 
       
 19221 /****
       
 19222  *REAL_TO_BYTE
       
 19223  */
       
 19224     case function_real_to_byte :
       
 19225     {
       
 19226         symbol_c *last_type_symbol = NULL;
       
 19227 
       
 19228         {
       
 19229             symbol_c *IN_type_symbol = param_data_type;
       
 19230             last_type_symbol = param_data_type;
       
 19231             
       
 19232             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19233             {
       
 19234         
       
 19235                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19236                 return return_type_symbol;
       
 19237                 
       
 19238             }
       
 19239             
       
 19240             ERROR;
       
 19241         }
       
 19242         
       
 19243     }/*function_real_to_byte*/
       
 19244     break;
       
 19245 
       
 19246 /****
       
 19247  *REAL_TO_WORD
       
 19248  */
       
 19249     case function_real_to_word :
       
 19250     {
       
 19251         symbol_c *last_type_symbol = NULL;
       
 19252 
       
 19253         {
       
 19254             symbol_c *IN_type_symbol = param_data_type;
       
 19255             last_type_symbol = param_data_type;
       
 19256             
       
 19257             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19258             {
       
 19259         
       
 19260                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19261                 return return_type_symbol;
       
 19262                 
       
 19263             }
       
 19264             
       
 19265             ERROR;
       
 19266         }
       
 19267         
       
 19268     }/*function_real_to_word*/
       
 19269     break;
       
 19270 
       
 19271 /****
       
 19272  *REAL_TO_DWORD
       
 19273  */
       
 19274     case function_real_to_dword :
       
 19275     {
       
 19276         symbol_c *last_type_symbol = NULL;
       
 19277 
       
 19278         {
       
 19279             symbol_c *IN_type_symbol = param_data_type;
       
 19280             last_type_symbol = param_data_type;
       
 19281             
       
 19282             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19283             {
       
 19284         
       
 19285                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19286                 return return_type_symbol;
       
 19287                 
       
 19288             }
       
 19289             
       
 19290             ERROR;
       
 19291         }
       
 19292         
       
 19293     }/*function_real_to_dword*/
       
 19294     break;
       
 19295 
       
 19296 /****
       
 19297  *REAL_TO_LWORD
       
 19298  */
       
 19299     case function_real_to_lword :
       
 19300     {
       
 19301         symbol_c *last_type_symbol = NULL;
       
 19302 
       
 19303         {
       
 19304             symbol_c *IN_type_symbol = param_data_type;
       
 19305             last_type_symbol = param_data_type;
       
 19306             
       
 19307             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 19308             {
       
 19309         
       
 19310                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19311                 return return_type_symbol;
       
 19312                 
       
 19313             }
       
 19314             
       
 19315             ERROR;
       
 19316         }
       
 19317         
       
 19318     }/*function_real_to_lword*/
       
 19319     break;
       
 19320 
       
 19321 /****
       
 19322  *LREAL_TO_BOOL
       
 19323  */
       
 19324     case function_lreal_to_bool :
       
 19325     {
       
 19326         symbol_c *last_type_symbol = NULL;
       
 19327 
       
 19328         {
       
 19329             symbol_c *IN_type_symbol = param_data_type;
       
 19330             last_type_symbol = param_data_type;
       
 19331             
       
 19332             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19333             {
       
 19334         
       
 19335                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19336                 return return_type_symbol;
       
 19337                 
       
 19338             }
       
 19339             
       
 19340             ERROR;
       
 19341         }
       
 19342         
       
 19343     }/*function_lreal_to_bool*/
       
 19344     break;
       
 19345 
       
 19346 /****
       
 19347  *LREAL_TO_SINT
       
 19348  */
       
 19349     case function_lreal_to_sint :
       
 19350     {
       
 19351         symbol_c *last_type_symbol = NULL;
       
 19352 
       
 19353         {
       
 19354             symbol_c *IN_type_symbol = param_data_type;
       
 19355             last_type_symbol = param_data_type;
       
 19356             
       
 19357             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19358             {
       
 19359         
       
 19360                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19361                 return return_type_symbol;
       
 19362                 
       
 19363             }
       
 19364             
       
 19365             ERROR;
       
 19366         }
       
 19367         
       
 19368     }/*function_lreal_to_sint*/
       
 19369     break;
       
 19370 
       
 19371 /****
       
 19372  *LREAL_TO_INT
       
 19373  */
       
 19374     case function_lreal_to_int :
       
 19375     {
       
 19376         symbol_c *last_type_symbol = NULL;
       
 19377 
       
 19378         {
       
 19379             symbol_c *IN_type_symbol = param_data_type;
       
 19380             last_type_symbol = param_data_type;
       
 19381             
       
 19382             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19383             {
       
 19384         
       
 19385                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19386                 return return_type_symbol;
       
 19387                 
       
 19388             }
       
 19389             
       
 19390             ERROR;
       
 19391         }
       
 19392         
       
 19393     }/*function_lreal_to_int*/
       
 19394     break;
       
 19395 
       
 19396 /****
       
 19397  *LREAL_TO_DINT
       
 19398  */
       
 19399     case function_lreal_to_dint :
       
 19400     {
       
 19401         symbol_c *last_type_symbol = NULL;
       
 19402 
       
 19403         {
       
 19404             symbol_c *IN_type_symbol = param_data_type;
       
 19405             last_type_symbol = param_data_type;
       
 19406             
       
 19407             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19408             {
       
 19409         
       
 19410                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19411                 return return_type_symbol;
       
 19412                 
       
 19413             }
       
 19414             
       
 19415             ERROR;
       
 19416         }
       
 19417         
       
 19418     }/*function_lreal_to_dint*/
       
 19419     break;
       
 19420 
       
 19421 /****
       
 19422  *LREAL_TO_LINT
       
 19423  */
       
 19424     case function_lreal_to_lint :
       
 19425     {
       
 19426         symbol_c *last_type_symbol = NULL;
       
 19427 
       
 19428         {
       
 19429             symbol_c *IN_type_symbol = param_data_type;
       
 19430             last_type_symbol = param_data_type;
       
 19431             
       
 19432             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19433             {
       
 19434         
       
 19435                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19436                 return return_type_symbol;
       
 19437                 
       
 19438             }
       
 19439             
       
 19440             ERROR;
       
 19441         }
       
 19442         
       
 19443     }/*function_lreal_to_lint*/
       
 19444     break;
       
 19445 
       
 19446 /****
       
 19447  *LREAL_TO_USINT
       
 19448  */
       
 19449     case function_lreal_to_usint :
       
 19450     {
       
 19451         symbol_c *last_type_symbol = NULL;
       
 19452 
       
 19453         {
       
 19454             symbol_c *IN_type_symbol = param_data_type;
       
 19455             last_type_symbol = param_data_type;
       
 19456             
       
 19457             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19458             {
       
 19459         
       
 19460                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19461                 return return_type_symbol;
       
 19462                 
       
 19463             }
       
 19464             
       
 19465             ERROR;
       
 19466         }
       
 19467         
       
 19468     }/*function_lreal_to_usint*/
       
 19469     break;
       
 19470 
       
 19471 /****
       
 19472  *LREAL_TO_UINT
       
 19473  */
       
 19474     case function_lreal_to_uint :
       
 19475     {
       
 19476         symbol_c *last_type_symbol = NULL;
       
 19477 
       
 19478         {
       
 19479             symbol_c *IN_type_symbol = param_data_type;
       
 19480             last_type_symbol = param_data_type;
       
 19481             
       
 19482             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19483             {
       
 19484         
       
 19485                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19486                 return return_type_symbol;
       
 19487                 
       
 19488             }
       
 19489             
       
 19490             ERROR;
       
 19491         }
       
 19492         
       
 19493     }/*function_lreal_to_uint*/
       
 19494     break;
       
 19495 
       
 19496 /****
       
 19497  *LREAL_TO_UDINT
       
 19498  */
       
 19499     case function_lreal_to_udint :
       
 19500     {
       
 19501         symbol_c *last_type_symbol = NULL;
       
 19502 
       
 19503         {
       
 19504             symbol_c *IN_type_symbol = param_data_type;
       
 19505             last_type_symbol = param_data_type;
       
 19506             
       
 19507             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19508             {
       
 19509         
       
 19510                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19511                 return return_type_symbol;
       
 19512                 
       
 19513             }
       
 19514             
       
 19515             ERROR;
       
 19516         }
       
 19517         
       
 19518     }/*function_lreal_to_udint*/
       
 19519     break;
       
 19520 
       
 19521 /****
       
 19522  *LREAL_TO_ULINT
       
 19523  */
       
 19524     case function_lreal_to_ulint :
       
 19525     {
       
 19526         symbol_c *last_type_symbol = NULL;
       
 19527 
       
 19528         {
       
 19529             symbol_c *IN_type_symbol = param_data_type;
       
 19530             last_type_symbol = param_data_type;
       
 19531             
       
 19532             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19533             {
       
 19534         
       
 19535                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19536                 return return_type_symbol;
       
 19537                 
       
 19538             }
       
 19539             
       
 19540             ERROR;
       
 19541         }
       
 19542         
       
 19543     }/*function_lreal_to_ulint*/
       
 19544     break;
       
 19545 
       
 19546 /****
       
 19547  *LREAL_TO_REAL
       
 19548  */
       
 19549     case function_lreal_to_real :
       
 19550     {
       
 19551         symbol_c *last_type_symbol = NULL;
       
 19552 
       
 19553         {
       
 19554             symbol_c *IN_type_symbol = param_data_type;
       
 19555             last_type_symbol = param_data_type;
       
 19556             
       
 19557             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19558             {
       
 19559         
       
 19560                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19561                 return return_type_symbol;
       
 19562                 
       
 19563             }
       
 19564             
       
 19565             ERROR;
       
 19566         }
       
 19567         
       
 19568     }/*function_lreal_to_real*/
       
 19569     break;
       
 19570 
       
 19571 /****
       
 19572  *LREAL_TO_TIME
       
 19573  */
       
 19574     case function_lreal_to_time :
       
 19575     {
       
 19576         symbol_c *last_type_symbol = NULL;
       
 19577 
       
 19578         {
       
 19579             symbol_c *IN_type_symbol = param_data_type;
       
 19580             last_type_symbol = param_data_type;
       
 19581             
       
 19582             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19583             {
       
 19584         
       
 19585                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 19586                 return return_type_symbol;
       
 19587                 
       
 19588             }
       
 19589             
       
 19590             ERROR;
       
 19591         }
       
 19592         
       
 19593     }/*function_lreal_to_time*/
       
 19594     break;
       
 19595 
       
 19596 /****
       
 19597  *LREAL_TO_DATE
       
 19598  */
       
 19599     case function_lreal_to_date :
       
 19600     {
       
 19601         symbol_c *last_type_symbol = NULL;
       
 19602 
       
 19603         {
       
 19604             symbol_c *IN_type_symbol = param_data_type;
       
 19605             last_type_symbol = param_data_type;
       
 19606             
       
 19607             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19608             {
       
 19609         
       
 19610                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 19611                 return return_type_symbol;
       
 19612                 
       
 19613             }
       
 19614             
       
 19615             ERROR;
       
 19616         }
       
 19617         
       
 19618     }/*function_lreal_to_date*/
       
 19619     break;
       
 19620 
       
 19621 /****
       
 19622  *LREAL_TO_TOD
       
 19623  */
       
 19624     case function_lreal_to_tod :
       
 19625     {
       
 19626         symbol_c *last_type_symbol = NULL;
       
 19627 
       
 19628         {
       
 19629             symbol_c *IN_type_symbol = param_data_type;
       
 19630             last_type_symbol = param_data_type;
       
 19631             
       
 19632             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19633             {
       
 19634         
       
 19635                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 19636                 return return_type_symbol;
       
 19637                 
       
 19638             }
       
 19639             
       
 19640             ERROR;
       
 19641         }
       
 19642         
       
 19643     }/*function_lreal_to_tod*/
       
 19644     break;
       
 19645 
       
 19646 /****
       
 19647  *LREAL_TO_DT
       
 19648  */
       
 19649     case function_lreal_to_dt :
       
 19650     {
       
 19651         symbol_c *last_type_symbol = NULL;
       
 19652 
       
 19653         {
       
 19654             symbol_c *IN_type_symbol = param_data_type;
       
 19655             last_type_symbol = param_data_type;
       
 19656             
       
 19657             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19658             {
       
 19659         
       
 19660                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 19661                 return return_type_symbol;
       
 19662                 
       
 19663             }
       
 19664             
       
 19665             ERROR;
       
 19666         }
       
 19667         
       
 19668     }/*function_lreal_to_dt*/
       
 19669     break;
       
 19670 
       
 19671 /****
       
 19672  *LREAL_TO_STRING
       
 19673  */
       
 19674     case function_lreal_to_string :
       
 19675     {
       
 19676         symbol_c *last_type_symbol = NULL;
       
 19677 
       
 19678         {
       
 19679             symbol_c *IN_type_symbol = param_data_type;
       
 19680             last_type_symbol = param_data_type;
       
 19681             
       
 19682             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19683             {
       
 19684         
       
 19685                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19686                 return return_type_symbol;
       
 19687                 
       
 19688             }
       
 19689             
       
 19690             ERROR;
       
 19691         }
       
 19692         
       
 19693     }/*function_lreal_to_string*/
       
 19694     break;
       
 19695 
       
 19696 /****
       
 19697  *LREAL_TO_BYTE
       
 19698  */
       
 19699     case function_lreal_to_byte :
       
 19700     {
       
 19701         symbol_c *last_type_symbol = NULL;
       
 19702 
       
 19703         {
       
 19704             symbol_c *IN_type_symbol = param_data_type;
       
 19705             last_type_symbol = param_data_type;
       
 19706             
       
 19707             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19708             {
       
 19709         
       
 19710                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19711                 return return_type_symbol;
       
 19712                 
       
 19713             }
       
 19714             
       
 19715             ERROR;
       
 19716         }
       
 19717         
       
 19718     }/*function_lreal_to_byte*/
       
 19719     break;
       
 19720 
       
 19721 /****
       
 19722  *LREAL_TO_WORD
       
 19723  */
       
 19724     case function_lreal_to_word :
       
 19725     {
       
 19726         symbol_c *last_type_symbol = NULL;
       
 19727 
       
 19728         {
       
 19729             symbol_c *IN_type_symbol = param_data_type;
       
 19730             last_type_symbol = param_data_type;
       
 19731             
       
 19732             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19733             {
       
 19734         
       
 19735                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19736                 return return_type_symbol;
       
 19737                 
       
 19738             }
       
 19739             
       
 19740             ERROR;
       
 19741         }
       
 19742         
       
 19743     }/*function_lreal_to_word*/
       
 19744     break;
       
 19745 
       
 19746 /****
       
 19747  *LREAL_TO_DWORD
       
 19748  */
       
 19749     case function_lreal_to_dword :
       
 19750     {
       
 19751         symbol_c *last_type_symbol = NULL;
       
 19752 
       
 19753         {
       
 19754             symbol_c *IN_type_symbol = param_data_type;
       
 19755             last_type_symbol = param_data_type;
       
 19756             
       
 19757             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19758             {
       
 19759         
       
 19760                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19761                 return return_type_symbol;
       
 19762                 
       
 19763             }
       
 19764             
       
 19765             ERROR;
       
 19766         }
       
 19767         
       
 19768     }/*function_lreal_to_dword*/
       
 19769     break;
       
 19770 
       
 19771 /****
       
 19772  *LREAL_TO_LWORD
       
 19773  */
       
 19774     case function_lreal_to_lword :
       
 19775     {
       
 19776         symbol_c *last_type_symbol = NULL;
       
 19777 
       
 19778         {
       
 19779             symbol_c *IN_type_symbol = param_data_type;
       
 19780             last_type_symbol = param_data_type;
       
 19781             
       
 19782             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 19783             {
       
 19784         
       
 19785                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19786                 return return_type_symbol;
       
 19787                 
       
 19788             }
       
 19789             
       
 19790             ERROR;
       
 19791         }
       
 19792         
       
 19793     }/*function_lreal_to_lword*/
       
 19794     break;
       
 19795 
       
 19796 /****
       
 19797  *TIME_TO_SINT
       
 19798  */
       
 19799     case function_time_to_sint :
       
 19800     {
       
 19801         symbol_c *last_type_symbol = NULL;
       
 19802 
       
 19803         {
       
 19804             symbol_c *IN_type_symbol = param_data_type;
       
 19805             last_type_symbol = param_data_type;
       
 19806             
       
 19807             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19808             {
       
 19809         
       
 19810                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19811                 return return_type_symbol;
       
 19812                 
       
 19813             }
       
 19814             
       
 19815             ERROR;
       
 19816         }
       
 19817         
       
 19818     }/*function_time_to_sint*/
       
 19819     break;
       
 19820 
       
 19821 /****
       
 19822  *TIME_TO_INT
       
 19823  */
       
 19824     case function_time_to_int :
       
 19825     {
       
 19826         symbol_c *last_type_symbol = NULL;
       
 19827 
       
 19828         {
       
 19829             symbol_c *IN_type_symbol = param_data_type;
       
 19830             last_type_symbol = param_data_type;
       
 19831             
       
 19832             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19833             {
       
 19834         
       
 19835                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19836                 return return_type_symbol;
       
 19837                 
       
 19838             }
       
 19839             
       
 19840             ERROR;
       
 19841         }
       
 19842         
       
 19843     }/*function_time_to_int*/
       
 19844     break;
       
 19845 
       
 19846 /****
       
 19847  *TIME_TO_DINT
       
 19848  */
       
 19849     case function_time_to_dint :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19858             {
       
 19859         
       
 19860                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19861                 return return_type_symbol;
       
 19862                 
       
 19863             }
       
 19864             
       
 19865             ERROR;
       
 19866         }
       
 19867         
       
 19868     }/*function_time_to_dint*/
       
 19869     break;
       
 19870 
       
 19871 /****
       
 19872  *TIME_TO_LINT
       
 19873  */
       
 19874     case function_time_to_lint :
       
 19875     {
       
 19876         symbol_c *last_type_symbol = NULL;
       
 19877 
       
 19878         {
       
 19879             symbol_c *IN_type_symbol = param_data_type;
       
 19880             last_type_symbol = param_data_type;
       
 19881             
       
 19882             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19883             {
       
 19884         
       
 19885                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19886                 return return_type_symbol;
       
 19887                 
       
 19888             }
       
 19889             
       
 19890             ERROR;
       
 19891         }
       
 19892         
       
 19893     }/*function_time_to_lint*/
       
 19894     break;
       
 19895 
       
 19896 /****
       
 19897  *TIME_TO_USINT
       
 19898  */
       
 19899     case function_time_to_usint :
       
 19900     {
       
 19901         symbol_c *last_type_symbol = NULL;
       
 19902 
       
 19903         {
       
 19904             symbol_c *IN_type_symbol = param_data_type;
       
 19905             last_type_symbol = param_data_type;
       
 19906             
       
 19907             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19908             {
       
 19909         
       
 19910                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19911                 return return_type_symbol;
       
 19912                 
       
 19913             }
       
 19914             
       
 19915             ERROR;
       
 19916         }
       
 19917         
       
 19918     }/*function_time_to_usint*/
       
 19919     break;
       
 19920 
       
 19921 /****
       
 19922  *TIME_TO_UINT
       
 19923  */
       
 19924     case function_time_to_uint :
       
 19925     {
       
 19926         symbol_c *last_type_symbol = NULL;
       
 19927 
       
 19928         {
       
 19929             symbol_c *IN_type_symbol = param_data_type;
       
 19930             last_type_symbol = param_data_type;
       
 19931             
       
 19932             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19933             {
       
 19934         
       
 19935                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19936                 return return_type_symbol;
       
 19937                 
       
 19938             }
       
 19939             
       
 19940             ERROR;
       
 19941         }
       
 19942         
       
 19943     }/*function_time_to_uint*/
       
 19944     break;
       
 19945 
       
 19946 /****
       
 19947  *TIME_TO_UDINT
       
 19948  */
       
 19949     case function_time_to_udint :
       
 19950     {
       
 19951         symbol_c *last_type_symbol = NULL;
       
 19952 
       
 19953         {
       
 19954             symbol_c *IN_type_symbol = param_data_type;
       
 19955             last_type_symbol = param_data_type;
       
 19956             
       
 19957             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19958             {
       
 19959         
       
 19960                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19961                 return return_type_symbol;
       
 19962                 
       
 19963             }
       
 19964             
       
 19965             ERROR;
       
 19966         }
       
 19967         
       
 19968     }/*function_time_to_udint*/
       
 19969     break;
       
 19970 
       
 19971 /****
       
 19972  *TIME_TO_ULINT
       
 19973  */
       
 19974     case function_time_to_ulint :
       
 19975     {
       
 19976         symbol_c *last_type_symbol = NULL;
       
 19977 
       
 19978         {
       
 19979             symbol_c *IN_type_symbol = param_data_type;
       
 19980             last_type_symbol = param_data_type;
       
 19981             
       
 19982             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19983             {
       
 19984         
       
 19985                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19986                 return return_type_symbol;
       
 19987                 
       
 19988             }
       
 19989             
       
 19990             ERROR;
       
 19991         }
       
 19992         
       
 19993     }/*function_time_to_ulint*/
       
 19994     break;
       
 19995 
       
 19996 /****
       
 19997  *TIME_TO_REAL
       
 19998  */
       
 19999     case function_time_to_real :
       
 20000     {
       
 20001         symbol_c *last_type_symbol = NULL;
       
 20002 
       
 20003         {
       
 20004             symbol_c *IN_type_symbol = param_data_type;
       
 20005             last_type_symbol = param_data_type;
       
 20006             
       
 20007             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20008             {
       
 20009         
       
 20010                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20011                 return return_type_symbol;
       
 20012                 
       
 20013             }
       
 20014             
       
 20015             ERROR;
       
 20016         }
       
 20017         
       
 20018     }/*function_time_to_real*/
       
 20019     break;
       
 20020 
       
 20021 /****
       
 20022  *TIME_TO_LREAL
       
 20023  */
       
 20024     case function_time_to_lreal :
       
 20025     {
       
 20026         symbol_c *last_type_symbol = NULL;
       
 20027 
       
 20028         {
       
 20029             symbol_c *IN_type_symbol = param_data_type;
       
 20030             last_type_symbol = param_data_type;
       
 20031             
       
 20032             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20033             {
       
 20034         
       
 20035                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20036                 return return_type_symbol;
       
 20037                 
       
 20038             }
       
 20039             
       
 20040             ERROR;
       
 20041         }
       
 20042         
       
 20043     }/*function_time_to_lreal*/
       
 20044     break;
       
 20045 
       
 20046 /****
       
 20047  *TIME_TO_STRING
       
 20048  */
       
 20049     case function_time_to_string :
       
 20050     {
       
 20051         symbol_c *last_type_symbol = NULL;
       
 20052 
       
 20053         {
       
 20054             symbol_c *IN_type_symbol = param_data_type;
       
 20055             last_type_symbol = param_data_type;
       
 20056             
       
 20057             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20058             {
       
 20059         
       
 20060                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20061                 return return_type_symbol;
       
 20062                 
       
 20063             }
       
 20064             
       
 20065             ERROR;
       
 20066         }
       
 20067         
       
 20068     }/*function_time_to_string*/
       
 20069     break;
       
 20070 
       
 20071 /****
       
 20072  *TIME_TO_BYTE
       
 20073  */
       
 20074     case function_time_to_byte :
       
 20075     {
       
 20076         symbol_c *last_type_symbol = NULL;
       
 20077 
       
 20078         {
       
 20079             symbol_c *IN_type_symbol = param_data_type;
       
 20080             last_type_symbol = param_data_type;
       
 20081             
       
 20082             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20083             {
       
 20084         
       
 20085                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20086                 return return_type_symbol;
       
 20087                 
       
 20088             }
       
 20089             
       
 20090             ERROR;
       
 20091         }
       
 20092         
       
 20093     }/*function_time_to_byte*/
       
 20094     break;
       
 20095 
       
 20096 /****
       
 20097  *TIME_TO_WORD
       
 20098  */
       
 20099     case function_time_to_word :
       
 20100     {
       
 20101         symbol_c *last_type_symbol = NULL;
       
 20102 
       
 20103         {
       
 20104             symbol_c *IN_type_symbol = param_data_type;
       
 20105             last_type_symbol = param_data_type;
       
 20106             
       
 20107             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20108             {
       
 20109         
       
 20110                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20111                 return return_type_symbol;
       
 20112                 
       
 20113             }
       
 20114             
       
 20115             ERROR;
       
 20116         }
       
 20117         
       
 20118     }/*function_time_to_word*/
       
 20119     break;
       
 20120 
       
 20121 /****
       
 20122  *TIME_TO_DWORD
       
 20123  */
       
 20124     case function_time_to_dword :
       
 20125     {
       
 20126         symbol_c *last_type_symbol = NULL;
       
 20127 
       
 20128         {
       
 20129             symbol_c *IN_type_symbol = param_data_type;
       
 20130             last_type_symbol = param_data_type;
       
 20131             
       
 20132             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20133             {
       
 20134         
       
 20135                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20136                 return return_type_symbol;
       
 20137                 
       
 20138             }
       
 20139             
       
 20140             ERROR;
       
 20141         }
       
 20142         
       
 20143     }/*function_time_to_dword*/
       
 20144     break;
       
 20145 
       
 20146 /****
       
 20147  *TIME_TO_LWORD
       
 20148  */
       
 20149     case function_time_to_lword :
       
 20150     {
       
 20151         symbol_c *last_type_symbol = NULL;
       
 20152 
       
 20153         {
       
 20154             symbol_c *IN_type_symbol = param_data_type;
       
 20155             last_type_symbol = param_data_type;
       
 20156             
       
 20157             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20158             {
       
 20159         
       
 20160                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20161                 return return_type_symbol;
       
 20162                 
       
 20163             }
       
 20164             
       
 20165             ERROR;
       
 20166         }
       
 20167         
       
 20168     }/*function_time_to_lword*/
       
 20169     break;
       
 20170 
       
 20171 /****
       
 20172  *DATE_TO_SINT
       
 20173  */
       
 20174     case function_date_to_sint :
       
 20175     {
       
 20176         symbol_c *last_type_symbol = NULL;
       
 20177 
       
 20178         {
       
 20179             symbol_c *IN_type_symbol = param_data_type;
       
 20180             last_type_symbol = param_data_type;
       
 20181             
       
 20182             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20183             {
       
 20184         
       
 20185                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20186                 return return_type_symbol;
       
 20187                 
       
 20188             }
       
 20189             
       
 20190             ERROR;
       
 20191         }
       
 20192         
       
 20193     }/*function_date_to_sint*/
       
 20194     break;
       
 20195 
       
 20196 /****
       
 20197  *DATE_TO_INT
       
 20198  */
       
 20199     case function_date_to_int :
       
 20200     {
       
 20201         symbol_c *last_type_symbol = NULL;
       
 20202 
       
 20203         {
       
 20204             symbol_c *IN_type_symbol = param_data_type;
       
 20205             last_type_symbol = param_data_type;
       
 20206             
       
 20207             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20208             {
       
 20209         
       
 20210                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20211                 return return_type_symbol;
       
 20212                 
       
 20213             }
       
 20214             
       
 20215             ERROR;
       
 20216         }
       
 20217         
       
 20218     }/*function_date_to_int*/
       
 20219     break;
       
 20220 
       
 20221 /****
       
 20222  *DATE_TO_DINT
       
 20223  */
       
 20224     case function_date_to_dint :
       
 20225     {
       
 20226         symbol_c *last_type_symbol = NULL;
       
 20227 
       
 20228         {
       
 20229             symbol_c *IN_type_symbol = param_data_type;
       
 20230             last_type_symbol = param_data_type;
       
 20231             
       
 20232             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20233             {
       
 20234         
       
 20235                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20236                 return return_type_symbol;
       
 20237                 
       
 20238             }
       
 20239             
       
 20240             ERROR;
       
 20241         }
       
 20242         
       
 20243     }/*function_date_to_dint*/
       
 20244     break;
       
 20245 
       
 20246 /****
       
 20247  *DATE_TO_LINT
       
 20248  */
       
 20249     case function_date_to_lint :
       
 20250     {
       
 20251         symbol_c *last_type_symbol = NULL;
       
 20252 
       
 20253         {
       
 20254             symbol_c *IN_type_symbol = param_data_type;
       
 20255             last_type_symbol = param_data_type;
       
 20256             
       
 20257             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20258             {
       
 20259         
       
 20260                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20261                 return return_type_symbol;
       
 20262                 
       
 20263             }
       
 20264             
       
 20265             ERROR;
       
 20266         }
       
 20267         
       
 20268     }/*function_date_to_lint*/
       
 20269     break;
       
 20270 
       
 20271 /****
       
 20272  *DATE_TO_USINT
       
 20273  */
       
 20274     case function_date_to_usint :
       
 20275     {
       
 20276         symbol_c *last_type_symbol = NULL;
       
 20277 
       
 20278         {
       
 20279             symbol_c *IN_type_symbol = param_data_type;
       
 20280             last_type_symbol = param_data_type;
       
 20281             
       
 20282             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20283             {
       
 20284         
       
 20285                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20286                 return return_type_symbol;
       
 20287                 
       
 20288             }
       
 20289             
       
 20290             ERROR;
       
 20291         }
       
 20292         
       
 20293     }/*function_date_to_usint*/
       
 20294     break;
       
 20295 
       
 20296 /****
       
 20297  *DATE_TO_UINT
       
 20298  */
       
 20299     case function_date_to_uint :
       
 20300     {
       
 20301         symbol_c *last_type_symbol = NULL;
       
 20302 
       
 20303         {
       
 20304             symbol_c *IN_type_symbol = param_data_type;
       
 20305             last_type_symbol = param_data_type;
       
 20306             
       
 20307             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20308             {
       
 20309         
       
 20310                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20311                 return return_type_symbol;
       
 20312                 
       
 20313             }
       
 20314             
       
 20315             ERROR;
       
 20316         }
       
 20317         
       
 20318     }/*function_date_to_uint*/
       
 20319     break;
       
 20320 
       
 20321 /****
       
 20322  *DATE_TO_UDINT
       
 20323  */
       
 20324     case function_date_to_udint :
       
 20325     {
       
 20326         symbol_c *last_type_symbol = NULL;
       
 20327 
       
 20328         {
       
 20329             symbol_c *IN_type_symbol = param_data_type;
       
 20330             last_type_symbol = param_data_type;
       
 20331             
       
 20332             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20333             {
       
 20334         
       
 20335                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20336                 return return_type_symbol;
       
 20337                 
       
 20338             }
       
 20339             
       
 20340             ERROR;
       
 20341         }
       
 20342         
       
 20343     }/*function_date_to_udint*/
       
 20344     break;
       
 20345 
       
 20346 /****
       
 20347  *DATE_TO_ULINT
       
 20348  */
       
 20349     case function_date_to_ulint :
       
 20350     {
       
 20351         symbol_c *last_type_symbol = NULL;
       
 20352 
       
 20353         {
       
 20354             symbol_c *IN_type_symbol = param_data_type;
       
 20355             last_type_symbol = param_data_type;
       
 20356             
       
 20357             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20358             {
       
 20359         
       
 20360                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20361                 return return_type_symbol;
       
 20362                 
       
 20363             }
       
 20364             
       
 20365             ERROR;
       
 20366         }
       
 20367         
       
 20368     }/*function_date_to_ulint*/
       
 20369     break;
       
 20370 
       
 20371 /****
       
 20372  *DATE_TO_REAL
       
 20373  */
       
 20374     case function_date_to_real :
       
 20375     {
       
 20376         symbol_c *last_type_symbol = NULL;
       
 20377 
       
 20378         {
       
 20379             symbol_c *IN_type_symbol = param_data_type;
       
 20380             last_type_symbol = param_data_type;
       
 20381             
       
 20382             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20383             {
       
 20384         
       
 20385                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20386                 return return_type_symbol;
       
 20387                 
       
 20388             }
       
 20389             
       
 20390             ERROR;
       
 20391         }
       
 20392         
       
 20393     }/*function_date_to_real*/
       
 20394     break;
       
 20395 
       
 20396 /****
       
 20397  *DATE_TO_LREAL
       
 20398  */
       
 20399     case function_date_to_lreal :
       
 20400     {
       
 20401         symbol_c *last_type_symbol = NULL;
       
 20402 
       
 20403         {
       
 20404             symbol_c *IN_type_symbol = param_data_type;
       
 20405             last_type_symbol = param_data_type;
       
 20406             
       
 20407             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20408             {
       
 20409         
       
 20410                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20411                 return return_type_symbol;
       
 20412                 
       
 20413             }
       
 20414             
       
 20415             ERROR;
       
 20416         }
       
 20417         
       
 20418     }/*function_date_to_lreal*/
       
 20419     break;
       
 20420 
       
 20421 /****
       
 20422  *DATE_TO_STRING
       
 20423  */
       
 20424     case function_date_to_string :
       
 20425     {
       
 20426         symbol_c *last_type_symbol = NULL;
       
 20427 
       
 20428         {
       
 20429             symbol_c *IN_type_symbol = param_data_type;
       
 20430             last_type_symbol = param_data_type;
       
 20431             
       
 20432             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20433             {
       
 20434         
       
 20435                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20436                 return return_type_symbol;
       
 20437                 
       
 20438             }
       
 20439             
       
 20440             ERROR;
       
 20441         }
       
 20442         
       
 20443     }/*function_date_to_string*/
       
 20444     break;
       
 20445 
       
 20446 /****
       
 20447  *DATE_TO_BYTE
       
 20448  */
       
 20449     case function_date_to_byte :
       
 20450     {
       
 20451         symbol_c *last_type_symbol = NULL;
       
 20452 
       
 20453         {
       
 20454             symbol_c *IN_type_symbol = param_data_type;
       
 20455             last_type_symbol = param_data_type;
       
 20456             
       
 20457             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20458             {
       
 20459         
       
 20460                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20461                 return return_type_symbol;
       
 20462                 
       
 20463             }
       
 20464             
       
 20465             ERROR;
       
 20466         }
       
 20467         
       
 20468     }/*function_date_to_byte*/
       
 20469     break;
       
 20470 
       
 20471 /****
       
 20472  *DATE_TO_WORD
       
 20473  */
       
 20474     case function_date_to_word :
       
 20475     {
       
 20476         symbol_c *last_type_symbol = NULL;
       
 20477 
       
 20478         {
       
 20479             symbol_c *IN_type_symbol = param_data_type;
       
 20480             last_type_symbol = param_data_type;
       
 20481             
       
 20482             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20483             {
       
 20484         
       
 20485                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20486                 return return_type_symbol;
       
 20487                 
       
 20488             }
       
 20489             
       
 20490             ERROR;
       
 20491         }
       
 20492         
       
 20493     }/*function_date_to_word*/
       
 20494     break;
       
 20495 
       
 20496 /****
       
 20497  *DATE_TO_DWORD
       
 20498  */
       
 20499     case function_date_to_dword :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20508             {
       
 20509         
       
 20510                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20511                 return return_type_symbol;
       
 20512                 
       
 20513             }
       
 20514             
       
 20515             ERROR;
       
 20516         }
       
 20517         
       
 20518     }/*function_date_to_dword*/
       
 20519     break;
       
 20520 
       
 20521 /****
       
 20522  *DATE_TO_LWORD
       
 20523  */
       
 20524     case function_date_to_lword :
       
 20525     {
       
 20526         symbol_c *last_type_symbol = NULL;
       
 20527 
       
 20528         {
       
 20529             symbol_c *IN_type_symbol = param_data_type;
       
 20530             last_type_symbol = param_data_type;
       
 20531             
       
 20532             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20533             {
       
 20534         
       
 20535                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20536                 return return_type_symbol;
       
 20537                 
       
 20538             }
       
 20539             
       
 20540             ERROR;
       
 20541         }
       
 20542         
       
 20543     }/*function_date_to_lword*/
       
 20544     break;
       
 20545 
       
 20546 /****
       
 20547  *TOD_TO_SINT
       
 20548  */
       
 20549     case function_tod_to_sint :
       
 20550     {
       
 20551         symbol_c *last_type_symbol = NULL;
       
 20552 
       
 20553         {
       
 20554             symbol_c *IN_type_symbol = param_data_type;
       
 20555             last_type_symbol = param_data_type;
       
 20556             
       
 20557             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20558             {
       
 20559         
       
 20560                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20561                 return return_type_symbol;
       
 20562                 
       
 20563             }
       
 20564             
       
 20565             ERROR;
       
 20566         }
       
 20567         
       
 20568     }/*function_tod_to_sint*/
       
 20569     break;
       
 20570 
       
 20571 /****
       
 20572  *TOD_TO_INT
       
 20573  */
       
 20574     case function_tod_to_int :
       
 20575     {
       
 20576         symbol_c *last_type_symbol = NULL;
       
 20577 
       
 20578         {
       
 20579             symbol_c *IN_type_symbol = param_data_type;
       
 20580             last_type_symbol = param_data_type;
       
 20581             
       
 20582             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20583             {
       
 20584         
       
 20585                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20586                 return return_type_symbol;
       
 20587                 
       
 20588             }
       
 20589             
       
 20590             ERROR;
       
 20591         }
       
 20592         
       
 20593     }/*function_tod_to_int*/
       
 20594     break;
       
 20595 
       
 20596 /****
       
 20597  *TOD_TO_DINT
       
 20598  */
       
 20599     case function_tod_to_dint :
       
 20600     {
       
 20601         symbol_c *last_type_symbol = NULL;
       
 20602 
       
 20603         {
       
 20604             symbol_c *IN_type_symbol = param_data_type;
       
 20605             last_type_symbol = param_data_type;
       
 20606             
       
 20607             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20608             {
       
 20609         
       
 20610                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20611                 return return_type_symbol;
       
 20612                 
       
 20613             }
       
 20614             
       
 20615             ERROR;
       
 20616         }
       
 20617         
       
 20618     }/*function_tod_to_dint*/
       
 20619     break;
       
 20620 
       
 20621 /****
       
 20622  *TOD_TO_LINT
       
 20623  */
       
 20624     case function_tod_to_lint :
       
 20625     {
       
 20626         symbol_c *last_type_symbol = NULL;
       
 20627 
       
 20628         {
       
 20629             symbol_c *IN_type_symbol = param_data_type;
       
 20630             last_type_symbol = param_data_type;
       
 20631             
       
 20632             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20633             {
       
 20634         
       
 20635                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20636                 return return_type_symbol;
       
 20637                 
       
 20638             }
       
 20639             
       
 20640             ERROR;
       
 20641         }
       
 20642         
       
 20643     }/*function_tod_to_lint*/
       
 20644     break;
       
 20645 
       
 20646 /****
       
 20647  *TOD_TO_USINT
       
 20648  */
       
 20649     case function_tod_to_usint :
       
 20650     {
       
 20651         symbol_c *last_type_symbol = NULL;
       
 20652 
       
 20653         {
       
 20654             symbol_c *IN_type_symbol = param_data_type;
       
 20655             last_type_symbol = param_data_type;
       
 20656             
       
 20657             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20658             {
       
 20659         
       
 20660                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20661                 return return_type_symbol;
       
 20662                 
       
 20663             }
       
 20664             
       
 20665             ERROR;
       
 20666         }
       
 20667         
       
 20668     }/*function_tod_to_usint*/
       
 20669     break;
       
 20670 
       
 20671 /****
       
 20672  *TOD_TO_UINT
       
 20673  */
       
 20674     case function_tod_to_uint :
       
 20675     {
       
 20676         symbol_c *last_type_symbol = NULL;
       
 20677 
       
 20678         {
       
 20679             symbol_c *IN_type_symbol = param_data_type;
       
 20680             last_type_symbol = param_data_type;
       
 20681             
       
 20682             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20683             {
       
 20684         
       
 20685                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20686                 return return_type_symbol;
       
 20687                 
       
 20688             }
       
 20689             
       
 20690             ERROR;
       
 20691         }
       
 20692         
       
 20693     }/*function_tod_to_uint*/
       
 20694     break;
       
 20695 
       
 20696 /****
       
 20697  *TOD_TO_UDINT
       
 20698  */
       
 20699     case function_tod_to_udint :
       
 20700     {
       
 20701         symbol_c *last_type_symbol = NULL;
       
 20702 
       
 20703         {
       
 20704             symbol_c *IN_type_symbol = param_data_type;
       
 20705             last_type_symbol = param_data_type;
       
 20706             
       
 20707             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20708             {
       
 20709         
       
 20710                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20711                 return return_type_symbol;
       
 20712                 
       
 20713             }
       
 20714             
       
 20715             ERROR;
       
 20716         }
       
 20717         
       
 20718     }/*function_tod_to_udint*/
       
 20719     break;
       
 20720 
       
 20721 /****
       
 20722  *TOD_TO_ULINT
       
 20723  */
       
 20724     case function_tod_to_ulint :
       
 20725     {
       
 20726         symbol_c *last_type_symbol = NULL;
       
 20727 
       
 20728         {
       
 20729             symbol_c *IN_type_symbol = param_data_type;
       
 20730             last_type_symbol = param_data_type;
       
 20731             
       
 20732             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20733             {
       
 20734         
       
 20735                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20736                 return return_type_symbol;
       
 20737                 
       
 20738             }
       
 20739             
       
 20740             ERROR;
       
 20741         }
       
 20742         
       
 20743     }/*function_tod_to_ulint*/
       
 20744     break;
       
 20745 
       
 20746 /****
       
 20747  *TOD_TO_REAL
       
 20748  */
       
 20749     case function_tod_to_real :
       
 20750     {
       
 20751         symbol_c *last_type_symbol = NULL;
       
 20752 
       
 20753         {
       
 20754             symbol_c *IN_type_symbol = param_data_type;
       
 20755             last_type_symbol = param_data_type;
       
 20756             
       
 20757             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20758             {
       
 20759         
       
 20760                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20761                 return return_type_symbol;
       
 20762                 
       
 20763             }
       
 20764             
       
 20765             ERROR;
       
 20766         }
       
 20767         
       
 20768     }/*function_tod_to_real*/
       
 20769     break;
       
 20770 
       
 20771 /****
       
 20772  *TOD_TO_LREAL
       
 20773  */
       
 20774     case function_tod_to_lreal :
       
 20775     {
       
 20776         symbol_c *last_type_symbol = NULL;
       
 20777 
       
 20778         {
       
 20779             symbol_c *IN_type_symbol = param_data_type;
       
 20780             last_type_symbol = param_data_type;
       
 20781             
       
 20782             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20783             {
       
 20784         
       
 20785                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20786                 return return_type_symbol;
       
 20787                 
       
 20788             }
       
 20789             
       
 20790             ERROR;
       
 20791         }
       
 20792         
       
 20793     }/*function_tod_to_lreal*/
       
 20794     break;
       
 20795 
       
 20796 /****
       
 20797  *TOD_TO_STRING
       
 20798  */
       
 20799     case function_tod_to_string :
       
 20800     {
       
 20801         symbol_c *last_type_symbol = NULL;
       
 20802 
       
 20803         {
       
 20804             symbol_c *IN_type_symbol = param_data_type;
       
 20805             last_type_symbol = param_data_type;
       
 20806             
       
 20807             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20808             {
       
 20809         
       
 20810                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20811                 return return_type_symbol;
       
 20812                 
       
 20813             }
       
 20814             
       
 20815             ERROR;
       
 20816         }
       
 20817         
       
 20818     }/*function_tod_to_string*/
       
 20819     break;
       
 20820 
       
 20821 /****
       
 20822  *TOD_TO_BYTE
       
 20823  */
       
 20824     case function_tod_to_byte :
       
 20825     {
       
 20826         symbol_c *last_type_symbol = NULL;
       
 20827 
       
 20828         {
       
 20829             symbol_c *IN_type_symbol = param_data_type;
       
 20830             last_type_symbol = param_data_type;
       
 20831             
       
 20832             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20833             {
       
 20834         
       
 20835                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20836                 return return_type_symbol;
       
 20837                 
       
 20838             }
       
 20839             
       
 20840             ERROR;
       
 20841         }
       
 20842         
       
 20843     }/*function_tod_to_byte*/
       
 20844     break;
       
 20845 
       
 20846 /****
       
 20847  *TOD_TO_WORD
       
 20848  */
       
 20849     case function_tod_to_word :
       
 20850     {
       
 20851         symbol_c *last_type_symbol = NULL;
       
 20852 
       
 20853         {
       
 20854             symbol_c *IN_type_symbol = param_data_type;
       
 20855             last_type_symbol = param_data_type;
       
 20856             
       
 20857             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20858             {
       
 20859         
       
 20860                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20861                 return return_type_symbol;
       
 20862                 
       
 20863             }
       
 20864             
       
 20865             ERROR;
       
 20866         }
       
 20867         
       
 20868     }/*function_tod_to_word*/
       
 20869     break;
       
 20870 
       
 20871 /****
       
 20872  *TOD_TO_DWORD
       
 20873  */
       
 20874     case function_tod_to_dword :
       
 20875     {
       
 20876         symbol_c *last_type_symbol = NULL;
       
 20877 
       
 20878         {
       
 20879             symbol_c *IN_type_symbol = param_data_type;
       
 20880             last_type_symbol = param_data_type;
       
 20881             
       
 20882             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20883             {
       
 20884         
       
 20885                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20886                 return return_type_symbol;
       
 20887                 
       
 20888             }
       
 20889             
       
 20890             ERROR;
       
 20891         }
       
 20892         
       
 20893     }/*function_tod_to_dword*/
       
 20894     break;
       
 20895 
       
 20896 /****
       
 20897  *TOD_TO_LWORD
       
 20898  */
       
 20899     case function_tod_to_lword :
       
 20900     {
       
 20901         symbol_c *last_type_symbol = NULL;
       
 20902 
       
 20903         {
       
 20904             symbol_c *IN_type_symbol = param_data_type;
       
 20905             last_type_symbol = param_data_type;
       
 20906             
       
 20907             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20908             {
       
 20909         
       
 20910                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20911                 return return_type_symbol;
       
 20912                 
       
 20913             }
       
 20914             
       
 20915             ERROR;
       
 20916         }
       
 20917         
       
 20918     }/*function_tod_to_lword*/
       
 20919     break;
       
 20920 
       
 20921 /****
       
 20922  *DT_TO_SINT
       
 20923  */
       
 20924     case function_dt_to_sint :
       
 20925     {
       
 20926         symbol_c *last_type_symbol = NULL;
       
 20927 
       
 20928         {
       
 20929             symbol_c *IN_type_symbol = param_data_type;
       
 20930             last_type_symbol = param_data_type;
       
 20931             
       
 20932             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 20933             {
       
 20934         
       
 20935                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20936                 return return_type_symbol;
       
 20937                 
       
 20938             }
       
 20939             
       
 20940             ERROR;
       
 20941         }
       
 20942         
       
 20943     }/*function_dt_to_sint*/
       
 20944     break;
       
 20945 
       
 20946 /****
       
 20947  *DT_TO_INT
       
 20948  */
       
 20949     case function_dt_to_int :
       
 20950     {
       
 20951         symbol_c *last_type_symbol = NULL;
       
 20952 
       
 20953         {
       
 20954             symbol_c *IN_type_symbol = param_data_type;
       
 20955             last_type_symbol = param_data_type;
       
 20956             
       
 20957             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 20958             {
       
 20959         
       
 20960                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20961                 return return_type_symbol;
       
 20962                 
       
 20963             }
       
 20964             
       
 20965             ERROR;
       
 20966         }
       
 20967         
       
 20968     }/*function_dt_to_int*/
       
 20969     break;
       
 20970 
       
 20971 /****
       
 20972  *DT_TO_DINT
       
 20973  */
       
 20974     case function_dt_to_dint :
       
 20975     {
       
 20976         symbol_c *last_type_symbol = NULL;
       
 20977 
       
 20978         {
       
 20979             symbol_c *IN_type_symbol = param_data_type;
       
 20980             last_type_symbol = param_data_type;
       
 20981             
       
 20982             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 20983             {
       
 20984         
       
 20985                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20986                 return return_type_symbol;
       
 20987                 
       
 20988             }
       
 20989             
       
 20990             ERROR;
       
 20991         }
       
 20992         
       
 20993     }/*function_dt_to_dint*/
       
 20994     break;
       
 20995 
       
 20996 /****
       
 20997  *DT_TO_LINT
       
 20998  */
       
 20999     case function_dt_to_lint :
       
 21000     {
       
 21001         symbol_c *last_type_symbol = NULL;
       
 21002 
       
 21003         {
       
 21004             symbol_c *IN_type_symbol = param_data_type;
       
 21005             last_type_symbol = param_data_type;
       
 21006             
       
 21007             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21008             {
       
 21009         
       
 21010                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21011                 return return_type_symbol;
       
 21012                 
       
 21013             }
       
 21014             
       
 21015             ERROR;
       
 21016         }
       
 21017         
       
 21018     }/*function_dt_to_lint*/
       
 21019     break;
       
 21020 
       
 21021 /****
       
 21022  *DT_TO_USINT
       
 21023  */
       
 21024     case function_dt_to_usint :
       
 21025     {
       
 21026         symbol_c *last_type_symbol = NULL;
       
 21027 
       
 21028         {
       
 21029             symbol_c *IN_type_symbol = param_data_type;
       
 21030             last_type_symbol = param_data_type;
       
 21031             
       
 21032             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21033             {
       
 21034         
       
 21035                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21036                 return return_type_symbol;
       
 21037                 
       
 21038             }
       
 21039             
       
 21040             ERROR;
       
 21041         }
       
 21042         
       
 21043     }/*function_dt_to_usint*/
       
 21044     break;
       
 21045 
       
 21046 /****
       
 21047  *DT_TO_UINT
       
 21048  */
       
 21049     case function_dt_to_uint :
       
 21050     {
       
 21051         symbol_c *last_type_symbol = NULL;
       
 21052 
       
 21053         {
       
 21054             symbol_c *IN_type_symbol = param_data_type;
       
 21055             last_type_symbol = param_data_type;
       
 21056             
       
 21057             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21058             {
       
 21059         
       
 21060                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21061                 return return_type_symbol;
       
 21062                 
       
 21063             }
       
 21064             
       
 21065             ERROR;
       
 21066         }
       
 21067         
       
 21068     }/*function_dt_to_uint*/
       
 21069     break;
       
 21070 
       
 21071 /****
       
 21072  *DT_TO_UDINT
       
 21073  */
       
 21074     case function_dt_to_udint :
       
 21075     {
       
 21076         symbol_c *last_type_symbol = NULL;
       
 21077 
       
 21078         {
       
 21079             symbol_c *IN_type_symbol = param_data_type;
       
 21080             last_type_symbol = param_data_type;
       
 21081             
       
 21082             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21083             {
       
 21084         
       
 21085                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21086                 return return_type_symbol;
       
 21087                 
       
 21088             }
       
 21089             
       
 21090             ERROR;
       
 21091         }
       
 21092         
       
 21093     }/*function_dt_to_udint*/
       
 21094     break;
       
 21095 
       
 21096 /****
       
 21097  *DT_TO_ULINT
       
 21098  */
       
 21099     case function_dt_to_ulint :
       
 21100     {
       
 21101         symbol_c *last_type_symbol = NULL;
       
 21102 
       
 21103         {
       
 21104             symbol_c *IN_type_symbol = param_data_type;
       
 21105             last_type_symbol = param_data_type;
       
 21106             
       
 21107             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21108             {
       
 21109         
       
 21110                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21111                 return return_type_symbol;
       
 21112                 
       
 21113             }
       
 21114             
       
 21115             ERROR;
       
 21116         }
       
 21117         
       
 21118     }/*function_dt_to_ulint*/
       
 21119     break;
       
 21120 
       
 21121 /****
       
 21122  *DT_TO_REAL
       
 21123  */
       
 21124     case function_dt_to_real :
       
 21125     {
       
 21126         symbol_c *last_type_symbol = NULL;
       
 21127 
       
 21128         {
       
 21129             symbol_c *IN_type_symbol = param_data_type;
       
 21130             last_type_symbol = param_data_type;
       
 21131             
       
 21132             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21133             {
       
 21134         
       
 21135                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21136                 return return_type_symbol;
       
 21137                 
       
 21138             }
       
 21139             
       
 21140             ERROR;
       
 21141         }
       
 21142         
       
 21143     }/*function_dt_to_real*/
       
 21144     break;
       
 21145 
       
 21146 /****
       
 21147  *DT_TO_LREAL
       
 21148  */
       
 21149     case function_dt_to_lreal :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21158             {
       
 21159         
       
 21160                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21161                 return return_type_symbol;
       
 21162                 
       
 21163             }
       
 21164             
       
 21165             ERROR;
       
 21166         }
       
 21167         
       
 21168     }/*function_dt_to_lreal*/
       
 21169     break;
       
 21170 
       
 21171 /****
       
 21172  *DT_TO_STRING
       
 21173  */
       
 21174     case function_dt_to_string :
       
 21175     {
       
 21176         symbol_c *last_type_symbol = NULL;
       
 21177 
       
 21178         {
       
 21179             symbol_c *IN_type_symbol = param_data_type;
       
 21180             last_type_symbol = param_data_type;
       
 21181             
       
 21182             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21183             {
       
 21184         
       
 21185                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21186                 return return_type_symbol;
       
 21187                 
       
 21188             }
       
 21189             
       
 21190             ERROR;
       
 21191         }
       
 21192         
       
 21193     }/*function_dt_to_string*/
       
 21194     break;
       
 21195 
       
 21196 /****
       
 21197  *DT_TO_BYTE
       
 21198  */
       
 21199     case function_dt_to_byte :
       
 21200     {
       
 21201         symbol_c *last_type_symbol = NULL;
       
 21202 
       
 21203         {
       
 21204             symbol_c *IN_type_symbol = param_data_type;
       
 21205             last_type_symbol = param_data_type;
       
 21206             
       
 21207             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21208             {
       
 21209         
       
 21210                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21211                 return return_type_symbol;
       
 21212                 
       
 21213             }
       
 21214             
       
 21215             ERROR;
       
 21216         }
       
 21217         
       
 21218     }/*function_dt_to_byte*/
       
 21219     break;
       
 21220 
       
 21221 /****
       
 21222  *DT_TO_WORD
       
 21223  */
       
 21224     case function_dt_to_word :
       
 21225     {
       
 21226         symbol_c *last_type_symbol = NULL;
       
 21227 
       
 21228         {
       
 21229             symbol_c *IN_type_symbol = param_data_type;
       
 21230             last_type_symbol = param_data_type;
       
 21231             
       
 21232             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21233             {
       
 21234         
       
 21235                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21236                 return return_type_symbol;
       
 21237                 
       
 21238             }
       
 21239             
       
 21240             ERROR;
       
 21241         }
       
 21242         
       
 21243     }/*function_dt_to_word*/
       
 21244     break;
       
 21245 
       
 21246 /****
       
 21247  *DT_TO_DWORD
       
 21248  */
       
 21249     case function_dt_to_dword :
       
 21250     {
       
 21251         symbol_c *last_type_symbol = NULL;
       
 21252 
       
 21253         {
       
 21254             symbol_c *IN_type_symbol = param_data_type;
       
 21255             last_type_symbol = param_data_type;
       
 21256             
       
 21257             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21258             {
       
 21259         
       
 21260                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21261                 return return_type_symbol;
       
 21262                 
       
 21263             }
       
 21264             
       
 21265             ERROR;
       
 21266         }
       
 21267         
       
 21268     }/*function_dt_to_dword*/
       
 21269     break;
       
 21270 
       
 21271 /****
       
 21272  *DT_TO_LWORD
       
 21273  */
       
 21274     case function_dt_to_lword :
       
 21275     {
       
 21276         symbol_c *last_type_symbol = NULL;
       
 21277 
       
 21278         {
       
 21279             symbol_c *IN_type_symbol = param_data_type;
       
 21280             last_type_symbol = param_data_type;
       
 21281             
       
 21282             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21283             {
       
 21284         
       
 21285                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21286                 return return_type_symbol;
       
 21287                 
       
 21288             }
       
 21289             
       
 21290             ERROR;
       
 21291         }
       
 21292         
       
 21293     }/*function_dt_to_lword*/
       
 21294     break;
       
 21295 
       
 21296 /****
       
 21297  *STRING_TO_BOOL
       
 21298  */
       
 21299     case function_string_to_bool :
       
 21300     {
       
 21301         symbol_c *last_type_symbol = NULL;
       
 21302 
       
 21303         {
       
 21304             symbol_c *IN_type_symbol = param_data_type;
       
 21305             last_type_symbol = param_data_type;
       
 21306             
       
 21307             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21308             {
       
 21309         
       
 21310                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21311                 return return_type_symbol;
       
 21312                 
       
 21313             }
       
 21314             
       
 21315             ERROR;
       
 21316         }
       
 21317         
       
 21318     }/*function_string_to_bool*/
       
 21319     break;
       
 21320 
       
 21321 /****
       
 21322  *STRING_TO_SINT
       
 21323  */
       
 21324     case function_string_to_sint :
       
 21325     {
       
 21326         symbol_c *last_type_symbol = NULL;
       
 21327 
       
 21328         {
       
 21329             symbol_c *IN_type_symbol = param_data_type;
       
 21330             last_type_symbol = param_data_type;
       
 21331             
       
 21332             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21333             {
       
 21334         
       
 21335                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21336                 return return_type_symbol;
       
 21337                 
       
 21338             }
       
 21339             
       
 21340             ERROR;
       
 21341         }
       
 21342         
       
 21343     }/*function_string_to_sint*/
       
 21344     break;
       
 21345 
       
 21346 /****
       
 21347  *STRING_TO_INT
       
 21348  */
       
 21349     case function_string_to_int :
       
 21350     {
       
 21351         symbol_c *last_type_symbol = NULL;
       
 21352 
       
 21353         {
       
 21354             symbol_c *IN_type_symbol = param_data_type;
       
 21355             last_type_symbol = param_data_type;
       
 21356             
       
 21357             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21358             {
       
 21359         
       
 21360                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21361                 return return_type_symbol;
       
 21362                 
       
 21363             }
       
 21364             
       
 21365             ERROR;
       
 21366         }
       
 21367         
       
 21368     }/*function_string_to_int*/
       
 21369     break;
       
 21370 
       
 21371 /****
       
 21372  *STRING_TO_DINT
       
 21373  */
       
 21374     case function_string_to_dint :
       
 21375     {
       
 21376         symbol_c *last_type_symbol = NULL;
       
 21377 
       
 21378         {
       
 21379             symbol_c *IN_type_symbol = param_data_type;
       
 21380             last_type_symbol = param_data_type;
       
 21381             
       
 21382             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21383             {
       
 21384         
       
 21385                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21386                 return return_type_symbol;
       
 21387                 
       
 21388             }
       
 21389             
       
 21390             ERROR;
       
 21391         }
       
 21392         
       
 21393     }/*function_string_to_dint*/
       
 21394     break;
       
 21395 
       
 21396 /****
       
 21397  *STRING_TO_LINT
       
 21398  */
       
 21399     case function_string_to_lint :
       
 21400     {
       
 21401         symbol_c *last_type_symbol = NULL;
       
 21402 
       
 21403         {
       
 21404             symbol_c *IN_type_symbol = param_data_type;
       
 21405             last_type_symbol = param_data_type;
       
 21406             
       
 21407             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21408             {
       
 21409         
       
 21410                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21411                 return return_type_symbol;
       
 21412                 
       
 21413             }
       
 21414             
       
 21415             ERROR;
       
 21416         }
       
 21417         
       
 21418     }/*function_string_to_lint*/
       
 21419     break;
       
 21420 
       
 21421 /****
       
 21422  *STRING_TO_USINT
       
 21423  */
       
 21424     case function_string_to_usint :
       
 21425     {
       
 21426         symbol_c *last_type_symbol = NULL;
       
 21427 
       
 21428         {
       
 21429             symbol_c *IN_type_symbol = param_data_type;
       
 21430             last_type_symbol = param_data_type;
       
 21431             
       
 21432             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21433             {
       
 21434         
       
 21435                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21436                 return return_type_symbol;
       
 21437                 
       
 21438             }
       
 21439             
       
 21440             ERROR;
       
 21441         }
       
 21442         
       
 21443     }/*function_string_to_usint*/
       
 21444     break;
       
 21445 
       
 21446 /****
       
 21447  *STRING_TO_UINT
       
 21448  */
       
 21449     case function_string_to_uint :
       
 21450     {
       
 21451         symbol_c *last_type_symbol = NULL;
       
 21452 
       
 21453         {
       
 21454             symbol_c *IN_type_symbol = param_data_type;
       
 21455             last_type_symbol = param_data_type;
       
 21456             
       
 21457             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21458             {
       
 21459         
       
 21460                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21461                 return return_type_symbol;
       
 21462                 
       
 21463             }
       
 21464             
       
 21465             ERROR;
       
 21466         }
       
 21467         
       
 21468     }/*function_string_to_uint*/
       
 21469     break;
       
 21470 
       
 21471 /****
       
 21472  *STRING_TO_UDINT
       
 21473  */
       
 21474     case function_string_to_udint :
       
 21475     {
       
 21476         symbol_c *last_type_symbol = NULL;
       
 21477 
       
 21478         {
       
 21479             symbol_c *IN_type_symbol = param_data_type;
       
 21480             last_type_symbol = param_data_type;
       
 21481             
       
 21482             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21483             {
       
 21484         
       
 21485                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21486                 return return_type_symbol;
       
 21487                 
       
 21488             }
       
 21489             
       
 21490             ERROR;
       
 21491         }
       
 21492         
       
 21493     }/*function_string_to_udint*/
       
 21494     break;
       
 21495 
       
 21496 /****
       
 21497  *STRING_TO_ULINT
       
 21498  */
       
 21499     case function_string_to_ulint :
       
 21500     {
       
 21501         symbol_c *last_type_symbol = NULL;
       
 21502 
       
 21503         {
       
 21504             symbol_c *IN_type_symbol = param_data_type;
       
 21505             last_type_symbol = param_data_type;
       
 21506             
       
 21507             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21508             {
       
 21509         
       
 21510                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21511                 return return_type_symbol;
       
 21512                 
       
 21513             }
       
 21514             
       
 21515             ERROR;
       
 21516         }
       
 21517         
       
 21518     }/*function_string_to_ulint*/
       
 21519     break;
       
 21520 
       
 21521 /****
       
 21522  *STRING_TO_REAL
       
 21523  */
       
 21524     case function_string_to_real :
       
 21525     {
       
 21526         symbol_c *last_type_symbol = NULL;
       
 21527 
       
 21528         {
       
 21529             symbol_c *IN_type_symbol = param_data_type;
       
 21530             last_type_symbol = param_data_type;
       
 21531             
       
 21532             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21533             {
       
 21534         
       
 21535                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21536                 return return_type_symbol;
       
 21537                 
       
 21538             }
       
 21539             
       
 21540             ERROR;
       
 21541         }
       
 21542         
       
 21543     }/*function_string_to_real*/
       
 21544     break;
       
 21545 
       
 21546 /****
       
 21547  *STRING_TO_LREAL
       
 21548  */
       
 21549     case function_string_to_lreal :
       
 21550     {
       
 21551         symbol_c *last_type_symbol = NULL;
       
 21552 
       
 21553         {
       
 21554             symbol_c *IN_type_symbol = param_data_type;
       
 21555             last_type_symbol = param_data_type;
       
 21556             
       
 21557             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21558             {
       
 21559         
       
 21560                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21561                 return return_type_symbol;
       
 21562                 
       
 21563             }
       
 21564             
       
 21565             ERROR;
       
 21566         }
       
 21567         
       
 21568     }/*function_string_to_lreal*/
       
 21569     break;
       
 21570 
       
 21571 /****
       
 21572  *STRING_TO_TIME
       
 21573  */
       
 21574     case function_string_to_time :
       
 21575     {
       
 21576         symbol_c *last_type_symbol = NULL;
       
 21577 
       
 21578         {
       
 21579             symbol_c *IN_type_symbol = param_data_type;
       
 21580             last_type_symbol = param_data_type;
       
 21581             
       
 21582             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21583             {
       
 21584         
       
 21585                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21586                 return return_type_symbol;
       
 21587                 
       
 21588             }
       
 21589             
       
 21590             ERROR;
       
 21591         }
       
 21592         
       
 21593     }/*function_string_to_time*/
       
 21594     break;
       
 21595 
       
 21596 /****
       
 21597  *STRING_TO_DATE
       
 21598  */
       
 21599     case function_string_to_date :
       
 21600     {
       
 21601         symbol_c *last_type_symbol = NULL;
       
 21602 
       
 21603         {
       
 21604             symbol_c *IN_type_symbol = param_data_type;
       
 21605             last_type_symbol = param_data_type;
       
 21606             
       
 21607             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21608             {
       
 21609         
       
 21610                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21611                 return return_type_symbol;
       
 21612                 
       
 21613             }
       
 21614             
       
 21615             ERROR;
       
 21616         }
       
 21617         
       
 21618     }/*function_string_to_date*/
       
 21619     break;
       
 21620 
       
 21621 /****
       
 21622  *STRING_TO_TOD
       
 21623  */
       
 21624     case function_string_to_tod :
       
 21625     {
       
 21626         symbol_c *last_type_symbol = NULL;
       
 21627 
       
 21628         {
       
 21629             symbol_c *IN_type_symbol = param_data_type;
       
 21630             last_type_symbol = param_data_type;
       
 21631             
       
 21632             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21633             {
       
 21634         
       
 21635                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21636                 return return_type_symbol;
       
 21637                 
       
 21638             }
       
 21639             
       
 21640             ERROR;
       
 21641         }
       
 21642         
       
 21643     }/*function_string_to_tod*/
       
 21644     break;
       
 21645 
       
 21646 /****
       
 21647  *STRING_TO_DT
       
 21648  */
       
 21649     case function_string_to_dt :
       
 21650     {
       
 21651         symbol_c *last_type_symbol = NULL;
       
 21652 
       
 21653         {
       
 21654             symbol_c *IN_type_symbol = param_data_type;
       
 21655             last_type_symbol = param_data_type;
       
 21656             
       
 21657             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21658             {
       
 21659         
       
 21660                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21661                 return return_type_symbol;
       
 21662                 
       
 21663             }
       
 21664             
       
 21665             ERROR;
       
 21666         }
       
 21667         
       
 21668     }/*function_string_to_dt*/
       
 21669     break;
       
 21670 
       
 21671 /****
       
 21672  *STRING_TO_BYTE
       
 21673  */
       
 21674     case function_string_to_byte :
       
 21675     {
       
 21676         symbol_c *last_type_symbol = NULL;
       
 21677 
       
 21678         {
       
 21679             symbol_c *IN_type_symbol = param_data_type;
       
 21680             last_type_symbol = param_data_type;
       
 21681             
       
 21682             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21683             {
       
 21684         
       
 21685                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21686                 return return_type_symbol;
       
 21687                 
       
 21688             }
       
 21689             
       
 21690             ERROR;
       
 21691         }
       
 21692         
       
 21693     }/*function_string_to_byte*/
       
 21694     break;
       
 21695 
       
 21696 /****
       
 21697  *STRING_TO_WORD
       
 21698  */
       
 21699     case function_string_to_word :
       
 21700     {
       
 21701         symbol_c *last_type_symbol = NULL;
       
 21702 
       
 21703         {
       
 21704             symbol_c *IN_type_symbol = param_data_type;
       
 21705             last_type_symbol = param_data_type;
       
 21706             
       
 21707             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21708             {
       
 21709         
       
 21710                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21711                 return return_type_symbol;
       
 21712                 
       
 21713             }
       
 21714             
       
 21715             ERROR;
       
 21716         }
       
 21717         
       
 21718     }/*function_string_to_word*/
       
 21719     break;
       
 21720 
       
 21721 /****
       
 21722  *STRING_TO_DWORD
       
 21723  */
       
 21724     case function_string_to_dword :
       
 21725     {
       
 21726         symbol_c *last_type_symbol = NULL;
       
 21727 
       
 21728         {
       
 21729             symbol_c *IN_type_symbol = param_data_type;
       
 21730             last_type_symbol = param_data_type;
       
 21731             
       
 21732             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21733             {
       
 21734         
       
 21735                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21736                 return return_type_symbol;
       
 21737                 
       
 21738             }
       
 21739             
       
 21740             ERROR;
       
 21741         }
       
 21742         
       
 21743     }/*function_string_to_dword*/
       
 21744     break;
       
 21745 
       
 21746 /****
       
 21747  *STRING_TO_LWORD
       
 21748  */
       
 21749     case function_string_to_lword :
       
 21750     {
       
 21751         symbol_c *last_type_symbol = NULL;
       
 21752 
       
 21753         {
       
 21754             symbol_c *IN_type_symbol = param_data_type;
       
 21755             last_type_symbol = param_data_type;
       
 21756             
       
 21757             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21758             {
       
 21759         
       
 21760                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21761                 return return_type_symbol;
       
 21762                 
       
 21763             }
       
 21764             
       
 21765             ERROR;
       
 21766         }
       
 21767         
       
 21768     }/*function_string_to_lword*/
       
 21769     break;
       
 21770 
       
 21771 /****
       
 21772  *BYTE_TO_BOOL
       
 21773  */
       
 21774     case function_byte_to_bool :
       
 21775     {
       
 21776         symbol_c *last_type_symbol = NULL;
       
 21777 
       
 21778         {
       
 21779             symbol_c *IN_type_symbol = param_data_type;
       
 21780             last_type_symbol = param_data_type;
       
 21781             
       
 21782             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21783             {
       
 21784         
       
 21785                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21786                 return return_type_symbol;
       
 21787                 
       
 21788             }
       
 21789             
       
 21790             ERROR;
       
 21791         }
       
 21792         
       
 21793     }/*function_byte_to_bool*/
       
 21794     break;
       
 21795 
       
 21796 /****
       
 21797  *BYTE_TO_SINT
       
 21798  */
       
 21799     case function_byte_to_sint :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21808             {
       
 21809         
       
 21810                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21811                 return return_type_symbol;
       
 21812                 
       
 21813             }
       
 21814             
       
 21815             ERROR;
       
 21816         }
       
 21817         
       
 21818     }/*function_byte_to_sint*/
       
 21819     break;
       
 21820 
       
 21821 /****
       
 21822  *BYTE_TO_INT
       
 21823  */
       
 21824     case function_byte_to_int :
       
 21825     {
       
 21826         symbol_c *last_type_symbol = NULL;
       
 21827 
       
 21828         {
       
 21829             symbol_c *IN_type_symbol = param_data_type;
       
 21830             last_type_symbol = param_data_type;
       
 21831             
       
 21832             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21833             {
       
 21834         
       
 21835                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21836                 return return_type_symbol;
       
 21837                 
       
 21838             }
       
 21839             
       
 21840             ERROR;
       
 21841         }
       
 21842         
       
 21843     }/*function_byte_to_int*/
       
 21844     break;
       
 21845 
       
 21846 /****
       
 21847  *BYTE_TO_DINT
       
 21848  */
       
 21849     case function_byte_to_dint :
       
 21850     {
       
 21851         symbol_c *last_type_symbol = NULL;
       
 21852 
       
 21853         {
       
 21854             symbol_c *IN_type_symbol = param_data_type;
       
 21855             last_type_symbol = param_data_type;
       
 21856             
       
 21857             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21858             {
       
 21859         
       
 21860                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21861                 return return_type_symbol;
       
 21862                 
       
 21863             }
       
 21864             
       
 21865             ERROR;
       
 21866         }
       
 21867         
       
 21868     }/*function_byte_to_dint*/
       
 21869     break;
       
 21870 
       
 21871 /****
       
 21872  *BYTE_TO_LINT
       
 21873  */
       
 21874     case function_byte_to_lint :
       
 21875     {
       
 21876         symbol_c *last_type_symbol = NULL;
       
 21877 
       
 21878         {
       
 21879             symbol_c *IN_type_symbol = param_data_type;
       
 21880             last_type_symbol = param_data_type;
       
 21881             
       
 21882             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21883             {
       
 21884         
       
 21885                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21886                 return return_type_symbol;
       
 21887                 
       
 21888             }
       
 21889             
       
 21890             ERROR;
       
 21891         }
       
 21892         
       
 21893     }/*function_byte_to_lint*/
       
 21894     break;
       
 21895 
       
 21896 /****
       
 21897  *BYTE_TO_USINT
       
 21898  */
       
 21899     case function_byte_to_usint :
       
 21900     {
       
 21901         symbol_c *last_type_symbol = NULL;
       
 21902 
       
 21903         {
       
 21904             symbol_c *IN_type_symbol = param_data_type;
       
 21905             last_type_symbol = param_data_type;
       
 21906             
       
 21907             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21908             {
       
 21909         
       
 21910                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21911                 return return_type_symbol;
       
 21912                 
       
 21913             }
       
 21914             
       
 21915             ERROR;
       
 21916         }
       
 21917         
       
 21918     }/*function_byte_to_usint*/
       
 21919     break;
       
 21920 
       
 21921 /****
       
 21922  *BYTE_TO_UINT
       
 21923  */
       
 21924     case function_byte_to_uint :
       
 21925     {
       
 21926         symbol_c *last_type_symbol = NULL;
       
 21927 
       
 21928         {
       
 21929             symbol_c *IN_type_symbol = param_data_type;
       
 21930             last_type_symbol = param_data_type;
       
 21931             
       
 21932             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21933             {
       
 21934         
       
 21935                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21936                 return return_type_symbol;
       
 21937                 
       
 21938             }
       
 21939             
       
 21940             ERROR;
       
 21941         }
       
 21942         
       
 21943     }/*function_byte_to_uint*/
       
 21944     break;
       
 21945 
       
 21946 /****
       
 21947  *BYTE_TO_UDINT
       
 21948  */
       
 21949     case function_byte_to_udint :
       
 21950     {
       
 21951         symbol_c *last_type_symbol = NULL;
       
 21952 
       
 21953         {
       
 21954             symbol_c *IN_type_symbol = param_data_type;
       
 21955             last_type_symbol = param_data_type;
       
 21956             
       
 21957             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21958             {
       
 21959         
       
 21960                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21961                 return return_type_symbol;
       
 21962                 
       
 21963             }
       
 21964             
       
 21965             ERROR;
       
 21966         }
       
 21967         
       
 21968     }/*function_byte_to_udint*/
       
 21969     break;
       
 21970 
       
 21971 /****
       
 21972  *BYTE_TO_ULINT
       
 21973  */
       
 21974     case function_byte_to_ulint :
       
 21975     {
       
 21976         symbol_c *last_type_symbol = NULL;
       
 21977 
       
 21978         {
       
 21979             symbol_c *IN_type_symbol = param_data_type;
       
 21980             last_type_symbol = param_data_type;
       
 21981             
       
 21982             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21983             {
       
 21984         
       
 21985                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21986                 return return_type_symbol;
       
 21987                 
       
 21988             }
       
 21989             
       
 21990             ERROR;
       
 21991         }
       
 21992         
       
 21993     }/*function_byte_to_ulint*/
       
 21994     break;
       
 21995 
       
 21996 /****
       
 21997  *BYTE_TO_REAL
       
 21998  */
       
 21999     case function_byte_to_real :
       
 22000     {
       
 22001         symbol_c *last_type_symbol = NULL;
       
 22002 
       
 22003         {
       
 22004             symbol_c *IN_type_symbol = param_data_type;
       
 22005             last_type_symbol = param_data_type;
       
 22006             
       
 22007             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22008             {
       
 22009         
       
 22010                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22011                 return return_type_symbol;
       
 22012                 
       
 22013             }
       
 22014             
       
 22015             ERROR;
       
 22016         }
       
 22017         
       
 22018     }/*function_byte_to_real*/
       
 22019     break;
       
 22020 
       
 22021 /****
       
 22022  *BYTE_TO_LREAL
       
 22023  */
       
 22024     case function_byte_to_lreal :
       
 22025     {
       
 22026         symbol_c *last_type_symbol = NULL;
       
 22027 
       
 22028         {
       
 22029             symbol_c *IN_type_symbol = param_data_type;
       
 22030             last_type_symbol = param_data_type;
       
 22031             
       
 22032             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22033             {
       
 22034         
       
 22035                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22036                 return return_type_symbol;
       
 22037                 
       
 22038             }
       
 22039             
       
 22040             ERROR;
       
 22041         }
       
 22042         
       
 22043     }/*function_byte_to_lreal*/
       
 22044     break;
       
 22045 
       
 22046 /****
       
 22047  *BYTE_TO_TIME
       
 22048  */
       
 22049     case function_byte_to_time :
       
 22050     {
       
 22051         symbol_c *last_type_symbol = NULL;
       
 22052 
       
 22053         {
       
 22054             symbol_c *IN_type_symbol = param_data_type;
       
 22055             last_type_symbol = param_data_type;
       
 22056             
       
 22057             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22058             {
       
 22059         
       
 22060                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22061                 return return_type_symbol;
       
 22062                 
       
 22063             }
       
 22064             
       
 22065             ERROR;
       
 22066         }
       
 22067         
       
 22068     }/*function_byte_to_time*/
       
 22069     break;
       
 22070 
       
 22071 /****
       
 22072  *BYTE_TO_DATE
       
 22073  */
       
 22074     case function_byte_to_date :
       
 22075     {
       
 22076         symbol_c *last_type_symbol = NULL;
       
 22077 
       
 22078         {
       
 22079             symbol_c *IN_type_symbol = param_data_type;
       
 22080             last_type_symbol = param_data_type;
       
 22081             
       
 22082             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22083             {
       
 22084         
       
 22085                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22086                 return return_type_symbol;
       
 22087                 
       
 22088             }
       
 22089             
       
 22090             ERROR;
       
 22091         }
       
 22092         
       
 22093     }/*function_byte_to_date*/
       
 22094     break;
       
 22095 
       
 22096 /****
       
 22097  *BYTE_TO_TOD
       
 22098  */
       
 22099     case function_byte_to_tod :
       
 22100     {
       
 22101         symbol_c *last_type_symbol = NULL;
       
 22102 
       
 22103         {
       
 22104             symbol_c *IN_type_symbol = param_data_type;
       
 22105             last_type_symbol = param_data_type;
       
 22106             
       
 22107             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22108             {
       
 22109         
       
 22110                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22111                 return return_type_symbol;
       
 22112                 
       
 22113             }
       
 22114             
       
 22115             ERROR;
       
 22116         }
       
 22117         
       
 22118     }/*function_byte_to_tod*/
       
 22119     break;
       
 22120 
       
 22121 /****
       
 22122  *BYTE_TO_DT
       
 22123  */
       
 22124     case function_byte_to_dt :
       
 22125     {
       
 22126         symbol_c *last_type_symbol = NULL;
       
 22127 
       
 22128         {
       
 22129             symbol_c *IN_type_symbol = param_data_type;
       
 22130             last_type_symbol = param_data_type;
       
 22131             
       
 22132             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22133             {
       
 22134         
       
 22135                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22136                 return return_type_symbol;
       
 22137                 
       
 22138             }
       
 22139             
       
 22140             ERROR;
       
 22141         }
       
 22142         
       
 22143     }/*function_byte_to_dt*/
       
 22144     break;
       
 22145 
       
 22146 /****
       
 22147  *BYTE_TO_STRING
       
 22148  */
       
 22149     case function_byte_to_string :
       
 22150     {
       
 22151         symbol_c *last_type_symbol = NULL;
       
 22152 
       
 22153         {
       
 22154             symbol_c *IN_type_symbol = param_data_type;
       
 22155             last_type_symbol = param_data_type;
       
 22156             
       
 22157             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22158             {
       
 22159         
       
 22160                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22161                 return return_type_symbol;
       
 22162                 
       
 22163             }
       
 22164             
       
 22165             ERROR;
       
 22166         }
       
 22167         
       
 22168     }/*function_byte_to_string*/
       
 22169     break;
       
 22170 
       
 22171 /****
       
 22172  *BYTE_TO_WORD
       
 22173  */
       
 22174     case function_byte_to_word :
       
 22175     {
       
 22176         symbol_c *last_type_symbol = NULL;
       
 22177 
       
 22178         {
       
 22179             symbol_c *IN_type_symbol = param_data_type;
       
 22180             last_type_symbol = param_data_type;
       
 22181             
       
 22182             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22183             {
       
 22184         
       
 22185                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22186                 return return_type_symbol;
       
 22187                 
       
 22188             }
       
 22189             
       
 22190             ERROR;
       
 22191         }
       
 22192         
       
 22193     }/*function_byte_to_word*/
       
 22194     break;
       
 22195 
       
 22196 /****
       
 22197  *BYTE_TO_DWORD
       
 22198  */
       
 22199     case function_byte_to_dword :
       
 22200     {
       
 22201         symbol_c *last_type_symbol = NULL;
       
 22202 
       
 22203         {
       
 22204             symbol_c *IN_type_symbol = param_data_type;
       
 22205             last_type_symbol = param_data_type;
       
 22206             
       
 22207             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22208             {
       
 22209         
       
 22210                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22211                 return return_type_symbol;
       
 22212                 
       
 22213             }
       
 22214             
       
 22215             ERROR;
       
 22216         }
       
 22217         
       
 22218     }/*function_byte_to_dword*/
       
 22219     break;
       
 22220 
       
 22221 /****
       
 22222  *BYTE_TO_LWORD
       
 22223  */
       
 22224     case function_byte_to_lword :
       
 22225     {
       
 22226         symbol_c *last_type_symbol = NULL;
       
 22227 
       
 22228         {
       
 22229             symbol_c *IN_type_symbol = param_data_type;
       
 22230             last_type_symbol = param_data_type;
       
 22231             
       
 22232             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22233             {
       
 22234         
       
 22235                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22236                 return return_type_symbol;
       
 22237                 
       
 22238             }
       
 22239             
       
 22240             ERROR;
       
 22241         }
       
 22242         
       
 22243     }/*function_byte_to_lword*/
       
 22244     break;
       
 22245 
       
 22246 /****
       
 22247  *WORD_TO_BOOL
       
 22248  */
       
 22249     case function_word_to_bool :
       
 22250     {
       
 22251         symbol_c *last_type_symbol = NULL;
       
 22252 
       
 22253         {
       
 22254             symbol_c *IN_type_symbol = param_data_type;
       
 22255             last_type_symbol = param_data_type;
       
 22256             
       
 22257             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22258             {
       
 22259         
       
 22260                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22261                 return return_type_symbol;
       
 22262                 
       
 22263             }
       
 22264             
       
 22265             ERROR;
       
 22266         }
       
 22267         
       
 22268     }/*function_word_to_bool*/
       
 22269     break;
       
 22270 
       
 22271 /****
       
 22272  *WORD_TO_SINT
       
 22273  */
       
 22274     case function_word_to_sint :
       
 22275     {
       
 22276         symbol_c *last_type_symbol = NULL;
       
 22277 
       
 22278         {
       
 22279             symbol_c *IN_type_symbol = param_data_type;
       
 22280             last_type_symbol = param_data_type;
       
 22281             
       
 22282             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22283             {
       
 22284         
       
 22285                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22286                 return return_type_symbol;
       
 22287                 
       
 22288             }
       
 22289             
       
 22290             ERROR;
       
 22291         }
       
 22292         
       
 22293     }/*function_word_to_sint*/
       
 22294     break;
       
 22295 
       
 22296 /****
       
 22297  *WORD_TO_INT
       
 22298  */
       
 22299     case function_word_to_int :
       
 22300     {
       
 22301         symbol_c *last_type_symbol = NULL;
       
 22302 
       
 22303         {
       
 22304             symbol_c *IN_type_symbol = param_data_type;
       
 22305             last_type_symbol = param_data_type;
       
 22306             
       
 22307             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22308             {
       
 22309         
       
 22310                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22311                 return return_type_symbol;
       
 22312                 
       
 22313             }
       
 22314             
       
 22315             ERROR;
       
 22316         }
       
 22317         
       
 22318     }/*function_word_to_int*/
       
 22319     break;
       
 22320 
       
 22321 /****
       
 22322  *WORD_TO_DINT
       
 22323  */
       
 22324     case function_word_to_dint :
       
 22325     {
       
 22326         symbol_c *last_type_symbol = NULL;
       
 22327 
       
 22328         {
       
 22329             symbol_c *IN_type_symbol = param_data_type;
       
 22330             last_type_symbol = param_data_type;
       
 22331             
       
 22332             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22333             {
       
 22334         
       
 22335                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22336                 return return_type_symbol;
       
 22337                 
       
 22338             }
       
 22339             
       
 22340             ERROR;
       
 22341         }
       
 22342         
       
 22343     }/*function_word_to_dint*/
       
 22344     break;
       
 22345 
       
 22346 /****
       
 22347  *WORD_TO_LINT
       
 22348  */
       
 22349     case function_word_to_lint :
       
 22350     {
       
 22351         symbol_c *last_type_symbol = NULL;
       
 22352 
       
 22353         {
       
 22354             symbol_c *IN_type_symbol = param_data_type;
       
 22355             last_type_symbol = param_data_type;
       
 22356             
       
 22357             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22358             {
       
 22359         
       
 22360                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22361                 return return_type_symbol;
       
 22362                 
       
 22363             }
       
 22364             
       
 22365             ERROR;
       
 22366         }
       
 22367         
       
 22368     }/*function_word_to_lint*/
       
 22369     break;
       
 22370 
       
 22371 /****
       
 22372  *WORD_TO_USINT
       
 22373  */
       
 22374     case function_word_to_usint :
       
 22375     {
       
 22376         symbol_c *last_type_symbol = NULL;
       
 22377 
       
 22378         {
       
 22379             symbol_c *IN_type_symbol = param_data_type;
       
 22380             last_type_symbol = param_data_type;
       
 22381             
       
 22382             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22383             {
       
 22384         
       
 22385                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22386                 return return_type_symbol;
       
 22387                 
       
 22388             }
       
 22389             
       
 22390             ERROR;
       
 22391         }
       
 22392         
       
 22393     }/*function_word_to_usint*/
       
 22394     break;
       
 22395 
       
 22396 /****
       
 22397  *WORD_TO_UINT
       
 22398  */
       
 22399     case function_word_to_uint :
       
 22400     {
       
 22401         symbol_c *last_type_symbol = NULL;
       
 22402 
       
 22403         {
       
 22404             symbol_c *IN_type_symbol = param_data_type;
       
 22405             last_type_symbol = param_data_type;
       
 22406             
       
 22407             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22408             {
       
 22409         
       
 22410                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22411                 return return_type_symbol;
       
 22412                 
       
 22413             }
       
 22414             
       
 22415             ERROR;
       
 22416         }
       
 22417         
       
 22418     }/*function_word_to_uint*/
       
 22419     break;
       
 22420 
       
 22421 /****
       
 22422  *WORD_TO_UDINT
       
 22423  */
       
 22424     case function_word_to_udint :
       
 22425     {
       
 22426         symbol_c *last_type_symbol = NULL;
       
 22427 
       
 22428         {
       
 22429             symbol_c *IN_type_symbol = param_data_type;
       
 22430             last_type_symbol = param_data_type;
       
 22431             
       
 22432             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22433             {
       
 22434         
       
 22435                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22436                 return return_type_symbol;
       
 22437                 
       
 22438             }
       
 22439             
       
 22440             ERROR;
       
 22441         }
       
 22442         
       
 22443     }/*function_word_to_udint*/
       
 22444     break;
       
 22445 
       
 22446 /****
       
 22447  *WORD_TO_ULINT
       
 22448  */
       
 22449     case function_word_to_ulint :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22458             {
       
 22459         
       
 22460                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22461                 return return_type_symbol;
       
 22462                 
       
 22463             }
       
 22464             
       
 22465             ERROR;
       
 22466         }
       
 22467         
       
 22468     }/*function_word_to_ulint*/
       
 22469     break;
       
 22470 
       
 22471 /****
       
 22472  *WORD_TO_REAL
       
 22473  */
       
 22474     case function_word_to_real :
       
 22475     {
       
 22476         symbol_c *last_type_symbol = NULL;
       
 22477 
       
 22478         {
       
 22479             symbol_c *IN_type_symbol = param_data_type;
       
 22480             last_type_symbol = param_data_type;
       
 22481             
       
 22482             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22483             {
       
 22484         
       
 22485                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22486                 return return_type_symbol;
       
 22487                 
       
 22488             }
       
 22489             
       
 22490             ERROR;
       
 22491         }
       
 22492         
       
 22493     }/*function_word_to_real*/
       
 22494     break;
       
 22495 
       
 22496 /****
       
 22497  *WORD_TO_LREAL
       
 22498  */
       
 22499     case function_word_to_lreal :
       
 22500     {
       
 22501         symbol_c *last_type_symbol = NULL;
       
 22502 
       
 22503         {
       
 22504             symbol_c *IN_type_symbol = param_data_type;
       
 22505             last_type_symbol = param_data_type;
       
 22506             
       
 22507             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22508             {
       
 22509         
       
 22510                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22511                 return return_type_symbol;
       
 22512                 
       
 22513             }
       
 22514             
       
 22515             ERROR;
       
 22516         }
       
 22517         
       
 22518     }/*function_word_to_lreal*/
       
 22519     break;
       
 22520 
       
 22521 /****
       
 22522  *WORD_TO_TIME
       
 22523  */
       
 22524     case function_word_to_time :
       
 22525     {
       
 22526         symbol_c *last_type_symbol = NULL;
       
 22527 
       
 22528         {
       
 22529             symbol_c *IN_type_symbol = param_data_type;
       
 22530             last_type_symbol = param_data_type;
       
 22531             
       
 22532             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22533             {
       
 22534         
       
 22535                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22536                 return return_type_symbol;
       
 22537                 
       
 22538             }
       
 22539             
       
 22540             ERROR;
       
 22541         }
       
 22542         
       
 22543     }/*function_word_to_time*/
       
 22544     break;
       
 22545 
       
 22546 /****
       
 22547  *WORD_TO_DATE
       
 22548  */
       
 22549     case function_word_to_date :
       
 22550     {
       
 22551         symbol_c *last_type_symbol = NULL;
       
 22552 
       
 22553         {
       
 22554             symbol_c *IN_type_symbol = param_data_type;
       
 22555             last_type_symbol = param_data_type;
       
 22556             
       
 22557             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22558             {
       
 22559         
       
 22560                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22561                 return return_type_symbol;
       
 22562                 
       
 22563             }
       
 22564             
       
 22565             ERROR;
       
 22566         }
       
 22567         
       
 22568     }/*function_word_to_date*/
       
 22569     break;
       
 22570 
       
 22571 /****
       
 22572  *WORD_TO_TOD
       
 22573  */
       
 22574     case function_word_to_tod :
       
 22575     {
       
 22576         symbol_c *last_type_symbol = NULL;
       
 22577 
       
 22578         {
       
 22579             symbol_c *IN_type_symbol = param_data_type;
       
 22580             last_type_symbol = param_data_type;
       
 22581             
       
 22582             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22583             {
       
 22584         
       
 22585                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22586                 return return_type_symbol;
       
 22587                 
       
 22588             }
       
 22589             
       
 22590             ERROR;
       
 22591         }
       
 22592         
       
 22593     }/*function_word_to_tod*/
       
 22594     break;
       
 22595 
       
 22596 /****
       
 22597  *WORD_TO_DT
       
 22598  */
       
 22599     case function_word_to_dt :
       
 22600     {
       
 22601         symbol_c *last_type_symbol = NULL;
       
 22602 
       
 22603         {
       
 22604             symbol_c *IN_type_symbol = param_data_type;
       
 22605             last_type_symbol = param_data_type;
       
 22606             
       
 22607             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22608             {
       
 22609         
       
 22610                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22611                 return return_type_symbol;
       
 22612                 
       
 22613             }
       
 22614             
       
 22615             ERROR;
       
 22616         }
       
 22617         
       
 22618     }/*function_word_to_dt*/
       
 22619     break;
       
 22620 
       
 22621 /****
       
 22622  *WORD_TO_STRING
       
 22623  */
       
 22624     case function_word_to_string :
       
 22625     {
       
 22626         symbol_c *last_type_symbol = NULL;
       
 22627 
       
 22628         {
       
 22629             symbol_c *IN_type_symbol = param_data_type;
       
 22630             last_type_symbol = param_data_type;
       
 22631             
       
 22632             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22633             {
       
 22634         
       
 22635                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22636                 return return_type_symbol;
       
 22637                 
       
 22638             }
       
 22639             
       
 22640             ERROR;
       
 22641         }
       
 22642         
       
 22643     }/*function_word_to_string*/
       
 22644     break;
       
 22645 
       
 22646 /****
       
 22647  *WORD_TO_BYTE
       
 22648  */
       
 22649     case function_word_to_byte :
       
 22650     {
       
 22651         symbol_c *last_type_symbol = NULL;
       
 22652 
       
 22653         {
       
 22654             symbol_c *IN_type_symbol = param_data_type;
       
 22655             last_type_symbol = param_data_type;
       
 22656             
       
 22657             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22658             {
       
 22659         
       
 22660                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22661                 return return_type_symbol;
       
 22662                 
       
 22663             }
       
 22664             
       
 22665             ERROR;
       
 22666         }
       
 22667         
       
 22668     }/*function_word_to_byte*/
       
 22669     break;
       
 22670 
       
 22671 /****
       
 22672  *WORD_TO_DWORD
       
 22673  */
       
 22674     case function_word_to_dword :
       
 22675     {
       
 22676         symbol_c *last_type_symbol = NULL;
       
 22677 
       
 22678         {
       
 22679             symbol_c *IN_type_symbol = param_data_type;
       
 22680             last_type_symbol = param_data_type;
       
 22681             
       
 22682             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22683             {
       
 22684         
       
 22685                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22686                 return return_type_symbol;
       
 22687                 
       
 22688             }
       
 22689             
       
 22690             ERROR;
       
 22691         }
       
 22692         
       
 22693     }/*function_word_to_dword*/
       
 22694     break;
       
 22695 
       
 22696 /****
       
 22697  *WORD_TO_LWORD
       
 22698  */
       
 22699     case function_word_to_lword :
       
 22700     {
       
 22701         symbol_c *last_type_symbol = NULL;
       
 22702 
       
 22703         {
       
 22704             symbol_c *IN_type_symbol = param_data_type;
       
 22705             last_type_symbol = param_data_type;
       
 22706             
       
 22707             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22708             {
       
 22709         
       
 22710                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22711                 return return_type_symbol;
       
 22712                 
       
 22713             }
       
 22714             
       
 22715             ERROR;
       
 22716         }
       
 22717         
       
 22718     }/*function_word_to_lword*/
       
 22719     break;
       
 22720 
       
 22721 /****
       
 22722  *DWORD_TO_BOOL
       
 22723  */
       
 22724     case function_dword_to_bool :
       
 22725     {
       
 22726         symbol_c *last_type_symbol = NULL;
       
 22727 
       
 22728         {
       
 22729             symbol_c *IN_type_symbol = param_data_type;
       
 22730             last_type_symbol = param_data_type;
       
 22731             
       
 22732             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22733             {
       
 22734         
       
 22735                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22736                 return return_type_symbol;
       
 22737                 
       
 22738             }
       
 22739             
       
 22740             ERROR;
       
 22741         }
       
 22742         
       
 22743     }/*function_dword_to_bool*/
       
 22744     break;
       
 22745 
       
 22746 /****
       
 22747  *DWORD_TO_SINT
       
 22748  */
       
 22749     case function_dword_to_sint :
       
 22750     {
       
 22751         symbol_c *last_type_symbol = NULL;
       
 22752 
       
 22753         {
       
 22754             symbol_c *IN_type_symbol = param_data_type;
       
 22755             last_type_symbol = param_data_type;
       
 22756             
       
 22757             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22758             {
       
 22759         
       
 22760                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22761                 return return_type_symbol;
       
 22762                 
       
 22763             }
       
 22764             
       
 22765             ERROR;
       
 22766         }
       
 22767         
       
 22768     }/*function_dword_to_sint*/
       
 22769     break;
       
 22770 
       
 22771 /****
       
 22772  *DWORD_TO_INT
       
 22773  */
       
 22774     case function_dword_to_int :
       
 22775     {
       
 22776         symbol_c *last_type_symbol = NULL;
       
 22777 
       
 22778         {
       
 22779             symbol_c *IN_type_symbol = param_data_type;
       
 22780             last_type_symbol = param_data_type;
       
 22781             
       
 22782             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22783             {
       
 22784         
       
 22785                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22786                 return return_type_symbol;
       
 22787                 
       
 22788             }
       
 22789             
       
 22790             ERROR;
       
 22791         }
       
 22792         
       
 22793     }/*function_dword_to_int*/
       
 22794     break;
       
 22795 
       
 22796 /****
       
 22797  *DWORD_TO_DINT
       
 22798  */
       
 22799     case function_dword_to_dint :
       
 22800     {
       
 22801         symbol_c *last_type_symbol = NULL;
       
 22802 
       
 22803         {
       
 22804             symbol_c *IN_type_symbol = param_data_type;
       
 22805             last_type_symbol = param_data_type;
       
 22806             
       
 22807             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22808             {
       
 22809         
       
 22810                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22811                 return return_type_symbol;
       
 22812                 
       
 22813             }
       
 22814             
       
 22815             ERROR;
       
 22816         }
       
 22817         
       
 22818     }/*function_dword_to_dint*/
       
 22819     break;
       
 22820 
       
 22821 /****
       
 22822  *DWORD_TO_LINT
       
 22823  */
       
 22824     case function_dword_to_lint :
       
 22825     {
       
 22826         symbol_c *last_type_symbol = NULL;
       
 22827 
       
 22828         {
       
 22829             symbol_c *IN_type_symbol = param_data_type;
       
 22830             last_type_symbol = param_data_type;
       
 22831             
       
 22832             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22833             {
       
 22834         
       
 22835                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22836                 return return_type_symbol;
       
 22837                 
       
 22838             }
       
 22839             
       
 22840             ERROR;
       
 22841         }
       
 22842         
       
 22843     }/*function_dword_to_lint*/
       
 22844     break;
       
 22845 
       
 22846 /****
       
 22847  *DWORD_TO_USINT
       
 22848  */
       
 22849     case function_dword_to_usint :
       
 22850     {
       
 22851         symbol_c *last_type_symbol = NULL;
       
 22852 
       
 22853         {
       
 22854             symbol_c *IN_type_symbol = param_data_type;
       
 22855             last_type_symbol = param_data_type;
       
 22856             
       
 22857             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22858             {
       
 22859         
       
 22860                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22861                 return return_type_symbol;
       
 22862                 
       
 22863             }
       
 22864             
       
 22865             ERROR;
       
 22866         }
       
 22867         
       
 22868     }/*function_dword_to_usint*/
       
 22869     break;
       
 22870 
       
 22871 /****
       
 22872  *DWORD_TO_UINT
       
 22873  */
       
 22874     case function_dword_to_uint :
       
 22875     {
       
 22876         symbol_c *last_type_symbol = NULL;
       
 22877 
       
 22878         {
       
 22879             symbol_c *IN_type_symbol = param_data_type;
       
 22880             last_type_symbol = param_data_type;
       
 22881             
       
 22882             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22883             {
       
 22884         
       
 22885                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22886                 return return_type_symbol;
       
 22887                 
       
 22888             }
       
 22889             
       
 22890             ERROR;
       
 22891         }
       
 22892         
       
 22893     }/*function_dword_to_uint*/
       
 22894     break;
       
 22895 
       
 22896 /****
       
 22897  *DWORD_TO_UDINT
       
 22898  */
       
 22899     case function_dword_to_udint :
       
 22900     {
       
 22901         symbol_c *last_type_symbol = NULL;
       
 22902 
       
 22903         {
       
 22904             symbol_c *IN_type_symbol = param_data_type;
       
 22905             last_type_symbol = param_data_type;
       
 22906             
       
 22907             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22908             {
       
 22909         
       
 22910                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22911                 return return_type_symbol;
       
 22912                 
       
 22913             }
       
 22914             
       
 22915             ERROR;
       
 22916         }
       
 22917         
       
 22918     }/*function_dword_to_udint*/
       
 22919     break;
       
 22920 
       
 22921 /****
       
 22922  *DWORD_TO_ULINT
       
 22923  */
       
 22924     case function_dword_to_ulint :
       
 22925     {
       
 22926         symbol_c *last_type_symbol = NULL;
       
 22927 
       
 22928         {
       
 22929             symbol_c *IN_type_symbol = param_data_type;
       
 22930             last_type_symbol = param_data_type;
       
 22931             
       
 22932             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22933             {
       
 22934         
       
 22935                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22936                 return return_type_symbol;
       
 22937                 
       
 22938             }
       
 22939             
       
 22940             ERROR;
       
 22941         }
       
 22942         
       
 22943     }/*function_dword_to_ulint*/
       
 22944     break;
       
 22945 
       
 22946 /****
       
 22947  *DWORD_TO_REAL
       
 22948  */
       
 22949     case function_dword_to_real :
       
 22950     {
       
 22951         symbol_c *last_type_symbol = NULL;
       
 22952 
       
 22953         {
       
 22954             symbol_c *IN_type_symbol = param_data_type;
       
 22955             last_type_symbol = param_data_type;
       
 22956             
       
 22957             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22958             {
       
 22959         
       
 22960                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22961                 return return_type_symbol;
       
 22962                 
       
 22963             }
       
 22964             
       
 22965             ERROR;
       
 22966         }
       
 22967         
       
 22968     }/*function_dword_to_real*/
       
 22969     break;
       
 22970 
       
 22971 /****
       
 22972  *DWORD_TO_LREAL
       
 22973  */
       
 22974     case function_dword_to_lreal :
       
 22975     {
       
 22976         symbol_c *last_type_symbol = NULL;
       
 22977 
       
 22978         {
       
 22979             symbol_c *IN_type_symbol = param_data_type;
       
 22980             last_type_symbol = param_data_type;
       
 22981             
       
 22982             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22983             {
       
 22984         
       
 22985                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22986                 return return_type_symbol;
       
 22987                 
       
 22988             }
       
 22989             
       
 22990             ERROR;
       
 22991         }
       
 22992         
       
 22993     }/*function_dword_to_lreal*/
       
 22994     break;
       
 22995 
       
 22996 /****
       
 22997  *DWORD_TO_TIME
       
 22998  */
       
 22999     case function_dword_to_time :
       
 23000     {
       
 23001         symbol_c *last_type_symbol = NULL;
       
 23002 
       
 23003         {
       
 23004             symbol_c *IN_type_symbol = param_data_type;
       
 23005             last_type_symbol = param_data_type;
       
 23006             
       
 23007             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23008             {
       
 23009         
       
 23010                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23011                 return return_type_symbol;
       
 23012                 
       
 23013             }
       
 23014             
       
 23015             ERROR;
       
 23016         }
       
 23017         
       
 23018     }/*function_dword_to_time*/
       
 23019     break;
       
 23020 
       
 23021 /****
       
 23022  *DWORD_TO_DATE
       
 23023  */
       
 23024     case function_dword_to_date :
       
 23025     {
       
 23026         symbol_c *last_type_symbol = NULL;
       
 23027 
       
 23028         {
       
 23029             symbol_c *IN_type_symbol = param_data_type;
       
 23030             last_type_symbol = param_data_type;
       
 23031             
       
 23032             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23033             {
       
 23034         
       
 23035                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23036                 return return_type_symbol;
       
 23037                 
       
 23038             }
       
 23039             
       
 23040             ERROR;
       
 23041         }
       
 23042         
       
 23043     }/*function_dword_to_date*/
       
 23044     break;
       
 23045 
       
 23046 /****
       
 23047  *DWORD_TO_TOD
       
 23048  */
       
 23049     case function_dword_to_tod :
       
 23050     {
       
 23051         symbol_c *last_type_symbol = NULL;
       
 23052 
       
 23053         {
       
 23054             symbol_c *IN_type_symbol = param_data_type;
       
 23055             last_type_symbol = param_data_type;
       
 23056             
       
 23057             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23058             {
       
 23059         
       
 23060                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23061                 return return_type_symbol;
       
 23062                 
       
 23063             }
       
 23064             
       
 23065             ERROR;
       
 23066         }
       
 23067         
       
 23068     }/*function_dword_to_tod*/
       
 23069     break;
       
 23070 
       
 23071 /****
       
 23072  *DWORD_TO_DT
       
 23073  */
       
 23074     case function_dword_to_dt :
       
 23075     {
       
 23076         symbol_c *last_type_symbol = NULL;
       
 23077 
       
 23078         {
       
 23079             symbol_c *IN_type_symbol = param_data_type;
       
 23080             last_type_symbol = param_data_type;
       
 23081             
       
 23082             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23083             {
       
 23084         
       
 23085                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23086                 return return_type_symbol;
       
 23087                 
       
 23088             }
       
 23089             
       
 23090             ERROR;
       
 23091         }
       
 23092         
       
 23093     }/*function_dword_to_dt*/
       
 23094     break;
       
 23095 
       
 23096 /****
       
 23097  *DWORD_TO_STRING
       
 23098  */
       
 23099     case function_dword_to_string :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23108             {
       
 23109         
       
 23110                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23111                 return return_type_symbol;
       
 23112                 
       
 23113             }
       
 23114             
       
 23115             ERROR;
       
 23116         }
       
 23117         
       
 23118     }/*function_dword_to_string*/
       
 23119     break;
       
 23120 
       
 23121 /****
       
 23122  *DWORD_TO_BYTE
       
 23123  */
       
 23124     case function_dword_to_byte :
       
 23125     {
       
 23126         symbol_c *last_type_symbol = NULL;
       
 23127 
       
 23128         {
       
 23129             symbol_c *IN_type_symbol = param_data_type;
       
 23130             last_type_symbol = param_data_type;
       
 23131             
       
 23132             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23133             {
       
 23134         
       
 23135                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23136                 return return_type_symbol;
       
 23137                 
       
 23138             }
       
 23139             
       
 23140             ERROR;
       
 23141         }
       
 23142         
       
 23143     }/*function_dword_to_byte*/
       
 23144     break;
       
 23145 
       
 23146 /****
       
 23147  *DWORD_TO_WORD
       
 23148  */
       
 23149     case function_dword_to_word :
       
 23150     {
       
 23151         symbol_c *last_type_symbol = NULL;
       
 23152 
       
 23153         {
       
 23154             symbol_c *IN_type_symbol = param_data_type;
       
 23155             last_type_symbol = param_data_type;
       
 23156             
       
 23157             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23158             {
       
 23159         
       
 23160                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23161                 return return_type_symbol;
       
 23162                 
       
 23163             }
       
 23164             
       
 23165             ERROR;
       
 23166         }
       
 23167         
       
 23168     }/*function_dword_to_word*/
       
 23169     break;
       
 23170 
       
 23171 /****
       
 23172  *DWORD_TO_LWORD
       
 23173  */
       
 23174     case function_dword_to_lword :
       
 23175     {
       
 23176         symbol_c *last_type_symbol = NULL;
       
 23177 
       
 23178         {
       
 23179             symbol_c *IN_type_symbol = param_data_type;
       
 23180             last_type_symbol = param_data_type;
       
 23181             
       
 23182             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23183             {
       
 23184         
       
 23185                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23186                 return return_type_symbol;
       
 23187                 
       
 23188             }
       
 23189             
       
 23190             ERROR;
       
 23191         }
       
 23192         
       
 23193     }/*function_dword_to_lword*/
       
 23194     break;
       
 23195 
       
 23196 /****
       
 23197  *LWORD_TO_BOOL
       
 23198  */
       
 23199     case function_lword_to_bool :
       
 23200     {
       
 23201         symbol_c *last_type_symbol = NULL;
       
 23202 
       
 23203         {
       
 23204             symbol_c *IN_type_symbol = param_data_type;
       
 23205             last_type_symbol = param_data_type;
       
 23206             
       
 23207             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23208             {
       
 23209         
       
 23210                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23211                 return return_type_symbol;
       
 23212                 
       
 23213             }
       
 23214             
       
 23215             ERROR;
       
 23216         }
       
 23217         
       
 23218     }/*function_lword_to_bool*/
       
 23219     break;
       
 23220 
       
 23221 /****
       
 23222  *LWORD_TO_SINT
       
 23223  */
       
 23224     case function_lword_to_sint :
       
 23225     {
       
 23226         symbol_c *last_type_symbol = NULL;
       
 23227 
       
 23228         {
       
 23229             symbol_c *IN_type_symbol = param_data_type;
       
 23230             last_type_symbol = param_data_type;
       
 23231             
       
 23232             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23233             {
       
 23234         
       
 23235                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23236                 return return_type_symbol;
       
 23237                 
       
 23238             }
       
 23239             
       
 23240             ERROR;
       
 23241         }
       
 23242         
       
 23243     }/*function_lword_to_sint*/
       
 23244     break;
       
 23245 
       
 23246 /****
       
 23247  *LWORD_TO_INT
       
 23248  */
       
 23249     case function_lword_to_int :
       
 23250     {
       
 23251         symbol_c *last_type_symbol = NULL;
       
 23252 
       
 23253         {
       
 23254             symbol_c *IN_type_symbol = param_data_type;
       
 23255             last_type_symbol = param_data_type;
       
 23256             
       
 23257             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23258             {
       
 23259         
       
 23260                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23261                 return return_type_symbol;
       
 23262                 
       
 23263             }
       
 23264             
       
 23265             ERROR;
       
 23266         }
       
 23267         
       
 23268     }/*function_lword_to_int*/
       
 23269     break;
       
 23270 
       
 23271 /****
       
 23272  *LWORD_TO_DINT
       
 23273  */
       
 23274     case function_lword_to_dint :
       
 23275     {
       
 23276         symbol_c *last_type_symbol = NULL;
       
 23277 
       
 23278         {
       
 23279             symbol_c *IN_type_symbol = param_data_type;
       
 23280             last_type_symbol = param_data_type;
       
 23281             
       
 23282             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23283             {
       
 23284         
       
 23285                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23286                 return return_type_symbol;
       
 23287                 
       
 23288             }
       
 23289             
       
 23290             ERROR;
       
 23291         }
       
 23292         
       
 23293     }/*function_lword_to_dint*/
       
 23294     break;
       
 23295 
       
 23296 /****
       
 23297  *LWORD_TO_LINT
       
 23298  */
       
 23299     case function_lword_to_lint :
       
 23300     {
       
 23301         symbol_c *last_type_symbol = NULL;
       
 23302 
       
 23303         {
       
 23304             symbol_c *IN_type_symbol = param_data_type;
       
 23305             last_type_symbol = param_data_type;
       
 23306             
       
 23307             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23308             {
       
 23309         
       
 23310                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23311                 return return_type_symbol;
       
 23312                 
       
 23313             }
       
 23314             
       
 23315             ERROR;
       
 23316         }
       
 23317         
       
 23318     }/*function_lword_to_lint*/
       
 23319     break;
       
 23320 
       
 23321 /****
       
 23322  *LWORD_TO_USINT
       
 23323  */
       
 23324     case function_lword_to_usint :
       
 23325     {
       
 23326         symbol_c *last_type_symbol = NULL;
       
 23327 
       
 23328         {
       
 23329             symbol_c *IN_type_symbol = param_data_type;
       
 23330             last_type_symbol = param_data_type;
       
 23331             
       
 23332             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23333             {
       
 23334         
       
 23335                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23336                 return return_type_symbol;
       
 23337                 
       
 23338             }
       
 23339             
       
 23340             ERROR;
       
 23341         }
       
 23342         
       
 23343     }/*function_lword_to_usint*/
       
 23344     break;
       
 23345 
       
 23346 /****
       
 23347  *LWORD_TO_UINT
       
 23348  */
       
 23349     case function_lword_to_uint :
       
 23350     {
       
 23351         symbol_c *last_type_symbol = NULL;
       
 23352 
       
 23353         {
       
 23354             symbol_c *IN_type_symbol = param_data_type;
       
 23355             last_type_symbol = param_data_type;
       
 23356             
       
 23357             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23358             {
       
 23359         
       
 23360                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23361                 return return_type_symbol;
       
 23362                 
       
 23363             }
       
 23364             
       
 23365             ERROR;
       
 23366         }
       
 23367         
       
 23368     }/*function_lword_to_uint*/
       
 23369     break;
       
 23370 
       
 23371 /****
       
 23372  *LWORD_TO_UDINT
       
 23373  */
       
 23374     case function_lword_to_udint :
       
 23375     {
       
 23376         symbol_c *last_type_symbol = NULL;
       
 23377 
       
 23378         {
       
 23379             symbol_c *IN_type_symbol = param_data_type;
       
 23380             last_type_symbol = param_data_type;
       
 23381             
       
 23382             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23383             {
       
 23384         
       
 23385                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23386                 return return_type_symbol;
       
 23387                 
       
 23388             }
       
 23389             
       
 23390             ERROR;
       
 23391         }
       
 23392         
       
 23393     }/*function_lword_to_udint*/
       
 23394     break;
       
 23395 
       
 23396 /****
       
 23397  *LWORD_TO_ULINT
       
 23398  */
       
 23399     case function_lword_to_ulint :
       
 23400     {
       
 23401         symbol_c *last_type_symbol = NULL;
       
 23402 
       
 23403         {
       
 23404             symbol_c *IN_type_symbol = param_data_type;
       
 23405             last_type_symbol = param_data_type;
       
 23406             
       
 23407             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23408             {
       
 23409         
       
 23410                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23411                 return return_type_symbol;
       
 23412                 
       
 23413             }
       
 23414             
       
 23415             ERROR;
       
 23416         }
       
 23417         
       
 23418     }/*function_lword_to_ulint*/
       
 23419     break;
       
 23420 
       
 23421 /****
       
 23422  *LWORD_TO_REAL
       
 23423  */
       
 23424     case function_lword_to_real :
       
 23425     {
       
 23426         symbol_c *last_type_symbol = NULL;
       
 23427 
       
 23428         {
       
 23429             symbol_c *IN_type_symbol = param_data_type;
       
 23430             last_type_symbol = param_data_type;
       
 23431             
       
 23432             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23433             {
       
 23434         
       
 23435                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23436                 return return_type_symbol;
       
 23437                 
       
 23438             }
       
 23439             
       
 23440             ERROR;
       
 23441         }
       
 23442         
       
 23443     }/*function_lword_to_real*/
       
 23444     break;
       
 23445 
       
 23446 /****
       
 23447  *LWORD_TO_LREAL
       
 23448  */
       
 23449     case function_lword_to_lreal :
       
 23450     {
       
 23451         symbol_c *last_type_symbol = NULL;
       
 23452 
       
 23453         {
       
 23454             symbol_c *IN_type_symbol = param_data_type;
       
 23455             last_type_symbol = param_data_type;
       
 23456             
       
 23457             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23458             {
       
 23459         
       
 23460                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23461                 return return_type_symbol;
       
 23462                 
       
 23463             }
       
 23464             
       
 23465             ERROR;
       
 23466         }
       
 23467         
       
 23468     }/*function_lword_to_lreal*/
       
 23469     break;
       
 23470 
       
 23471 /****
       
 23472  *LWORD_TO_TIME
       
 23473  */
       
 23474     case function_lword_to_time :
       
 23475     {
       
 23476         symbol_c *last_type_symbol = NULL;
       
 23477 
       
 23478         {
       
 23479             symbol_c *IN_type_symbol = param_data_type;
       
 23480             last_type_symbol = param_data_type;
       
 23481             
       
 23482             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23483             {
       
 23484         
       
 23485                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23486                 return return_type_symbol;
       
 23487                 
       
 23488             }
       
 23489             
       
 23490             ERROR;
       
 23491         }
       
 23492         
       
 23493     }/*function_lword_to_time*/
       
 23494     break;
       
 23495 
       
 23496 /****
       
 23497  *LWORD_TO_DATE
       
 23498  */
       
 23499     case function_lword_to_date :
       
 23500     {
       
 23501         symbol_c *last_type_symbol = NULL;
       
 23502 
       
 23503         {
       
 23504             symbol_c *IN_type_symbol = param_data_type;
       
 23505             last_type_symbol = param_data_type;
       
 23506             
       
 23507             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23508             {
       
 23509         
       
 23510                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23511                 return return_type_symbol;
       
 23512                 
       
 23513             }
       
 23514             
       
 23515             ERROR;
       
 23516         }
       
 23517         
       
 23518     }/*function_lword_to_date*/
       
 23519     break;
       
 23520 
       
 23521 /****
       
 23522  *LWORD_TO_TOD
       
 23523  */
       
 23524     case function_lword_to_tod :
       
 23525     {
       
 23526         symbol_c *last_type_symbol = NULL;
       
 23527 
       
 23528         {
       
 23529             symbol_c *IN_type_symbol = param_data_type;
       
 23530             last_type_symbol = param_data_type;
       
 23531             
       
 23532             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23533             {
       
 23534         
       
 23535                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23536                 return return_type_symbol;
       
 23537                 
       
 23538             }
       
 23539             
       
 23540             ERROR;
       
 23541         }
       
 23542         
       
 23543     }/*function_lword_to_tod*/
       
 23544     break;
       
 23545 
       
 23546 /****
       
 23547  *LWORD_TO_DT
       
 23548  */
       
 23549     case function_lword_to_dt :
       
 23550     {
       
 23551         symbol_c *last_type_symbol = NULL;
       
 23552 
       
 23553         {
       
 23554             symbol_c *IN_type_symbol = param_data_type;
       
 23555             last_type_symbol = param_data_type;
       
 23556             
       
 23557             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23558             {
       
 23559         
       
 23560                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23561                 return return_type_symbol;
       
 23562                 
       
 23563             }
       
 23564             
       
 23565             ERROR;
       
 23566         }
       
 23567         
       
 23568     }/*function_lword_to_dt*/
       
 23569     break;
       
 23570 
       
 23571 /****
       
 23572  *LWORD_TO_STRING
       
 23573  */
       
 23574     case function_lword_to_string :
       
 23575     {
       
 23576         symbol_c *last_type_symbol = NULL;
       
 23577 
       
 23578         {
       
 23579             symbol_c *IN_type_symbol = param_data_type;
       
 23580             last_type_symbol = param_data_type;
       
 23581             
       
 23582             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23583             {
       
 23584         
       
 23585                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23586                 return return_type_symbol;
       
 23587                 
       
 23588             }
       
 23589             
       
 23590             ERROR;
       
 23591         }
       
 23592         
       
 23593     }/*function_lword_to_string*/
       
 23594     break;
       
 23595 
       
 23596 /****
       
 23597  *LWORD_TO_BYTE
       
 23598  */
       
 23599     case function_lword_to_byte :
       
 23600     {
       
 23601         symbol_c *last_type_symbol = NULL;
       
 23602 
       
 23603         {
       
 23604             symbol_c *IN_type_symbol = param_data_type;
       
 23605             last_type_symbol = param_data_type;
       
 23606             
       
 23607             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23608             {
       
 23609         
       
 23610                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23611                 return return_type_symbol;
       
 23612                 
       
 23613             }
       
 23614             
       
 23615             ERROR;
       
 23616         }
       
 23617         
       
 23618     }/*function_lword_to_byte*/
       
 23619     break;
       
 23620 
       
 23621 /****
       
 23622  *LWORD_TO_WORD
       
 23623  */
       
 23624     case function_lword_to_word :
       
 23625     {
       
 23626         symbol_c *last_type_symbol = NULL;
       
 23627 
       
 23628         {
       
 23629             symbol_c *IN_type_symbol = param_data_type;
       
 23630             last_type_symbol = param_data_type;
       
 23631             
       
 23632             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23633             {
       
 23634         
       
 23635                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23636                 return return_type_symbol;
       
 23637                 
       
 23638             }
       
 23639             
       
 23640             ERROR;
       
 23641         }
       
 23642         
       
 23643     }/*function_lword_to_word*/
       
 23644     break;
       
 23645 
       
 23646 /****
       
 23647  *LWORD_TO_DWORD
       
 23648  */
       
 23649     case function_lword_to_dword :
       
 23650     {
       
 23651         symbol_c *last_type_symbol = NULL;
       
 23652 
       
 23653         {
       
 23654             symbol_c *IN_type_symbol = param_data_type;
       
 23655             last_type_symbol = param_data_type;
       
 23656             
       
 23657             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23658             {
       
 23659         
       
 23660                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 23661                 return return_type_symbol;
       
 23662                 
       
 23663             }
       
 23664             
       
 23665             ERROR;
       
 23666         }
       
 23667         
       
 23668     }/*function_lword_to_dword*/
       
 23669     break;
       
 23670 
       
 23671 /****
       
 23672  *TRUNC
       
 23673  */
       
 23674     case function_trunc :
       
 23675     {
       
 23676         symbol_c *last_type_symbol = NULL;
       
 23677 
       
 23678         {
       
 23679             symbol_c *IN_type_symbol = param_data_type;
       
 23680             last_type_symbol = param_data_type;
       
 23681             
       
 23682             if(search_expression_type->is_real_type(IN_type_symbol))
       
 23683             {
       
 23684         
       
 23685                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 23686                 return return_type_symbol;
       
 23687                 
       
 23688             }
       
 23689             
       
 23690             ERROR;
       
 23691         }
       
 23692         
       
 23693     }/*function_trunc*/
       
 23694     break;
       
 23695 
       
 23696 /****
       
 23697  *BCD_TO_USINT
       
 23698  */
       
 23699     case function_bcd_to_usint :
       
 23700     {
       
 23701         symbol_c *last_type_symbol = NULL;
       
 23702 
       
 23703         {
       
 23704             symbol_c *IN_type_symbol = param_data_type;
       
 23705             last_type_symbol = param_data_type;
       
 23706             
       
 23707             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 23708             {
       
 23709         
       
 23710                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23711                 return return_type_symbol;
       
 23712                 
       
 23713             }
       
 23714             
       
 23715             ERROR;
       
 23716         }
       
 23717         
       
 23718     }/*function_bcd_to_usint*/
       
 23719     break;
       
 23720 
       
 23721 /****
       
 23722  *BCD_TO_UINT
       
 23723  */
       
 23724     case function_bcd_to_uint :
       
 23725     {
       
 23726         symbol_c *last_type_symbol = NULL;
       
 23727 
       
 23728         {
       
 23729             symbol_c *IN_type_symbol = param_data_type;
       
 23730             last_type_symbol = param_data_type;
       
 23731             
       
 23732             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 23733             {
       
 23734         
       
 23735                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23736                 return return_type_symbol;
       
 23737                 
       
 23738             }
       
 23739             
       
 23740             ERROR;
       
 23741         }
       
 23742         
       
 23743     }/*function_bcd_to_uint*/
       
 23744     break;
       
 23745 
       
 23746 /****
       
 23747  *BCD_TO_UDINT
       
 23748  */
       
 23749     case function_bcd_to_udint :
       
 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(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23758             {
       
 23759         
       
 23760                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23761                 return return_type_symbol;
       
 23762                 
       
 23763             }
       
 23764             
       
 23765             ERROR;
       
 23766         }
       
 23767         
       
 23768     }/*function_bcd_to_udint*/
       
 23769     break;
       
 23770 
       
 23771 /****
       
 23772  *BCD_TO_ULINT
       
 23773  */
       
 23774     case function_bcd_to_ulint :
       
 23775     {
       
 23776         symbol_c *last_type_symbol = NULL;
       
 23777 
       
 23778         {
       
 23779             symbol_c *IN_type_symbol = param_data_type;
       
 23780             last_type_symbol = param_data_type;
       
 23781             
       
 23782             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23783             {
       
 23784         
       
 23785                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23786                 return return_type_symbol;
       
 23787                 
       
 23788             }
       
 23789             
       
 23790             ERROR;
       
 23791         }
       
 23792         
       
 23793     }/*function_bcd_to_ulint*/
       
 23794     break;
       
 23795 
       
 23796 /****
       
 23797  *USINT_TO_BCD
       
 23798  */
       
 23799     case function_usint_to_bcd :
       
 23800     {
       
 23801         symbol_c *last_type_symbol = NULL;
       
 23802 
       
 23803         {
       
 23804             symbol_c *IN_type_symbol = param_data_type;
       
 23805             last_type_symbol = param_data_type;
       
 23806             
       
 23807             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 23808             {
       
 23809         
       
 23810                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 23811                 return return_type_symbol;
       
 23812                 
       
 23813             }
       
 23814             
       
 23815             ERROR;
       
 23816         }
       
 23817         
       
 23818     }/*function_usint_to_bcd*/
       
 23819     break;
       
 23820 
       
 23821 /****
       
 23822  *UINT_TO_BCD
       
 23823  */
       
 23824     case function_uint_to_bcd :
       
 23825     {
       
 23826         symbol_c *last_type_symbol = NULL;
       
 23827 
       
 23828         {
       
 23829             symbol_c *IN_type_symbol = param_data_type;
       
 23830             last_type_symbol = param_data_type;
       
 23831             
       
 23832             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 23833             {
       
 23834         
       
 23835                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 23836                 return return_type_symbol;
       
 23837                 
       
 23838             }
       
 23839             
       
 23840             ERROR;
       
 23841         }
       
 23842         
       
 23843     }/*function_uint_to_bcd*/
       
 23844     break;
       
 23845 
       
 23846 /****
       
 23847  *UDINT_TO_BCD
       
 23848  */
       
 23849     case function_udint_to_bcd :
       
 23850     {
       
 23851         symbol_c *last_type_symbol = NULL;
       
 23852 
       
 23853         {
       
 23854             symbol_c *IN_type_symbol = param_data_type;
       
 23855             last_type_symbol = param_data_type;
       
 23856             
       
 23857             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 23858             {
       
 23859         
       
 23860                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 23861                 return return_type_symbol;
       
 23862                 
       
 23863             }
       
 23864             
       
 23865             ERROR;
       
 23866         }
       
 23867         
       
 23868     }/*function_udint_to_bcd*/
       
 23869     break;
       
 23870 
       
 23871 /****
       
 23872  *ULINT_TO_BCD
       
 23873  */
       
 23874     case function_ulint_to_bcd :
       
 23875     {
       
 23876         symbol_c *last_type_symbol = NULL;
       
 23877 
       
 23878         {
       
 23879             symbol_c *IN_type_symbol = param_data_type;
       
 23880             last_type_symbol = param_data_type;
       
 23881             
       
 23882             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 23883             {
       
 23884         
       
 23885                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 23886                 return return_type_symbol;
       
 23887                 
       
 23888             }
       
 23889             
       
 23890             ERROR;
       
 23891         }
       
 23892         
       
 23893     }/*function_ulint_to_bcd*/
       
 23894     break;
       
 23895 
       
 23896 /****
       
 23897  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 23898  */
       
 23899     case function_date_and_time_to_time_of_day :
       
 23900     {
       
 23901         symbol_c *last_type_symbol = NULL;
       
 23902 
       
 23903         {
       
 23904             symbol_c *IN_type_symbol = param_data_type;
       
 23905             last_type_symbol = param_data_type;
       
 23906             
       
 23907             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 23908             {
       
 23909         
       
 23910                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23911                 return return_type_symbol;
       
 23912                 
       
 23913             }
       
 23914             
       
 23915             ERROR;
       
 23916         }
       
 23917         
       
 23918     }/*function_date_and_time_to_time_of_day*/
       
 23919     break;
       
 23920 
       
 23921 /****
       
 23922  *DATE_AND_TIME_TO_DATE
       
 23923  */
       
 23924     case function_date_and_time_to_date :
       
 23925     {
       
 23926         symbol_c *last_type_symbol = NULL;
       
 23927 
       
 23928         {
       
 23929             symbol_c *IN_type_symbol = param_data_type;
       
 23930             last_type_symbol = param_data_type;
       
 23931             
       
 23932             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 23933             {
       
 23934         
       
 23935                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23936                 return return_type_symbol;
       
 23937                 
       
 23938             }
       
 23939             
       
 23940             ERROR;
       
 23941         }
       
 23942         
       
 23943     }/*function_date_and_time_to_date*/
       
 23944     break;
       
 23945 
       
 23946 /****
       
 23947  *ABS
       
 23948  */
       
 23949     case function_abs :
       
 23950     {
       
 23951         symbol_c *last_type_symbol = NULL;
       
 23952 
       
 23953         {
       
 23954             symbol_c *IN_type_symbol = param_data_type;
       
 23955             last_type_symbol = param_data_type;
       
 23956             
       
 23957             if(search_expression_type->is_num_type(IN_type_symbol))
       
 23958             {
       
 23959         
       
 23960                 symbol_c * return_type_symbol = IN_type_symbol;
       
 23961                 return return_type_symbol;
       
 23962                 
       
 23963             }
       
 23964             
       
 23965             ERROR;
       
 23966         }
       
 23967         
       
 23968     }/*function_abs*/
       
 23969     break;
       
 23970 
       
 23971 /****
       
 23972  *SQRT
       
 23973  */
       
 23974     case function_sqrt :
       
 23975     {
       
 23976         symbol_c *last_type_symbol = NULL;
       
 23977 
       
 23978         {
       
 23979             symbol_c *IN_type_symbol = param_data_type;
       
 23980             last_type_symbol = param_data_type;
       
 23981             
       
 23982             if(search_expression_type->is_real_type(IN_type_symbol))
       
 23983             {
       
 23984         
       
 23985                 symbol_c * return_type_symbol = IN_type_symbol;
       
 23986                 return return_type_symbol;
       
 23987                 
       
 23988             }
       
 23989             
       
 23990             ERROR;
       
 23991         }
       
 23992         
       
 23993     }/*function_sqrt*/
       
 23994     break;
       
 23995 
       
 23996 /****
       
 23997  *LN
       
 23998  */
       
 23999     case function_ln :
       
 24000     {
       
 24001         symbol_c *last_type_symbol = NULL;
       
 24002 
       
 24003         {
       
 24004             symbol_c *IN_type_symbol = param_data_type;
       
 24005             last_type_symbol = param_data_type;
       
 24006             
       
 24007             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24008             {
       
 24009         
       
 24010                 symbol_c * return_type_symbol = IN_type_symbol;
       
 24011                 return return_type_symbol;
       
 24012                 
       
 24013             }
       
 24014             
       
 24015             ERROR;
       
 24016         }
       
 24017         
       
 24018     }/*function_ln*/
       
 24019     break;
       
 24020 
       
 24021 /****
       
 24022  *LOG
       
 24023  */
       
 24024     case function_log :
       
 24025     {
       
 24026         symbol_c *last_type_symbol = NULL;
       
 24027 
       
 24028         {
       
 24029             symbol_c *IN_type_symbol = param_data_type;
       
 24030             last_type_symbol = param_data_type;
       
 24031             
       
 24032             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24033             {
       
 24034         
       
 24035                 symbol_c * return_type_symbol = IN_type_symbol;
       
 24036                 return return_type_symbol;
       
 24037                 
       
 24038             }
       
 24039             
       
 24040             ERROR;
       
 24041         }
       
 24042         
       
 24043     }/*function_log*/
       
 24044     break;
       
 24045 
       
 24046 /****
       
 24047  *EXP
       
 24048  */
       
 24049     case function_exp :
       
 24050     {
       
 24051         symbol_c *last_type_symbol = NULL;
       
 24052 
       
 24053         {
       
 24054             symbol_c *IN_type_symbol = param_data_type;
       
 24055             last_type_symbol = param_data_type;
       
 24056             
       
 24057             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24058             {
       
 24059         
       
 24060                 symbol_c * return_type_symbol = IN_type_symbol;
       
 24061                 return return_type_symbol;
       
 24062                 
       
 24063             }
       
 24064             
       
 24065             ERROR;
       
 24066         }
       
 24067         
       
 24068     }/*function_exp*/
       
 24069     break;
       
 24070 
       
 24071 /****
       
 24072  *SIN
       
 24073  */
       
 24074     case function_sin :
       
 24075     {
       
 24076         symbol_c *last_type_symbol = NULL;
       
 24077 
       
 24078         {
       
 24079             symbol_c *IN_type_symbol = param_data_type;
       
 24080             last_type_symbol = param_data_type;
       
 24081             
       
 24082             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24083             {
       
 24084         
       
 24085                 symbol_c * return_type_symbol = IN_type_symbol;
       
 24086                 return return_type_symbol;
       
 24087                 
       
 24088             }
       
 24089             
       
 24090             ERROR;
       
 24091         }
       
 24092         
       
 24093     }/*function_sin*/
       
 24094     break;
       
 24095 
       
 24096 /****
       
 24097  *COS
       
 24098  */
       
 24099     case function_cos :
       
 24100     {
       
 24101         symbol_c *last_type_symbol = NULL;
       
 24102 
       
 24103         {
       
 24104             symbol_c *IN_type_symbol = param_data_type;
       
 24105             last_type_symbol = param_data_type;
       
 24106             
       
 24107             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24108             {
       
 24109         
       
 24110                 symbol_c * return_type_symbol = IN_type_symbol;
       
 24111                 return return_type_symbol;
       
 24112                 
       
 24113             }
       
 24114             
       
 24115             ERROR;
       
 24116         }
       
 24117         
       
 24118     }/*function_cos*/
       
 24119     break;
       
 24120 
       
 24121 /****
       
 24122  *TAN
       
 24123  */
       
 24124     case function_tan :
       
 24125     {
       
 24126         symbol_c *last_type_symbol = NULL;
       
 24127 
       
 24128         {
       
 24129             symbol_c *IN_type_symbol = param_data_type;
       
 24130             last_type_symbol = param_data_type;
       
 24131             
       
 24132             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24133             {
       
 24134         
       
 24135                 symbol_c * return_type_symbol = IN_type_symbol;
       
 24136                 return return_type_symbol;
       
 24137                 
       
 24138             }
       
 24139             
       
 24140             ERROR;
       
 24141         }
       
 24142         
       
 24143     }/*function_tan*/
       
 24144     break;
       
 24145 
       
 24146 /****
       
 24147  *ASIN
       
 24148  */
       
 24149     case function_asin :
       
 24150     {
       
 24151         symbol_c *last_type_symbol = NULL;
       
 24152 
       
 24153         {
       
 24154             symbol_c *IN_type_symbol = param_data_type;
       
 24155             last_type_symbol = param_data_type;
       
 24156             
       
 24157             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24158             {
       
 24159         
       
 24160                 symbol_c * return_type_symbol = IN_type_symbol;
       
 24161                 return return_type_symbol;
       
 24162                 
       
 24163             }
       
 24164             
       
 24165             ERROR;
       
 24166         }
       
 24167         
       
 24168     }/*function_asin*/
       
 24169     break;
       
 24170 
       
 24171 /****
       
 24172  *ACOS
       
 24173  */
       
 24174     case function_acos :
       
 24175     {
       
 24176         symbol_c *last_type_symbol = NULL;
       
 24177 
       
 24178         {
       
 24179             symbol_c *IN_type_symbol = param_data_type;
       
 24180             last_type_symbol = param_data_type;
       
 24181             
       
 24182             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24183             {
       
 24184         
       
 24185                 symbol_c * return_type_symbol = IN_type_symbol;
       
 24186                 return return_type_symbol;
       
 24187                 
       
 24188             }
       
 24189             
       
 24190             ERROR;
       
 24191         }
       
 24192         
       
 24193     }/*function_acos*/
       
 24194     break;
       
 24195 
       
 24196 /****
       
 24197  *ATAN
       
 24198  */
       
 24199     case function_atan :
       
 24200     {
       
 24201         symbol_c *last_type_symbol = NULL;
       
 24202 
       
 24203         {
       
 24204             symbol_c *IN_type_symbol = param_data_type;
       
 24205             last_type_symbol = param_data_type;
       
 24206             
       
 24207             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24208             {
       
 24209         
       
 24210                 symbol_c * return_type_symbol = IN_type_symbol;
       
 24211                 return return_type_symbol;
       
 24212                 
       
 24213             }
       
 24214             
       
 24215             ERROR;
       
 24216         }
       
 24217         
       
 24218     }/*function_atan*/
       
 24219     break;
       
 24220 
       
 24221 /****
       
 24222  *ADD
       
 24223  */
       
 24224     case function_add :
       
 24225     {
       
 24226         symbol_c *last_type_symbol = NULL;
       
 24227 
       
 24228         {
       
 24229             symbol_c *IN1_type_symbol = param_data_type;
       
 24230             last_type_symbol = param_data_type;
       
 24231             
       
 24232             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 24233             {
       
 24234         
       
 24235                 {
       
 24236                     identifier_c param_name("IN2");
       
 24237                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24238                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24239                     
       
 24240                     /* Get the value from a foo(<param_value>) style call */
       
 24241                     if (IN2_param_value == NULL)
       
 24242                       IN2_param_value = function_call_param_iterator.next();
       
 24243                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24244                     last_type_symbol = last_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 ;
       
 24245                     
       
 24246                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 24247                     {
       
 24248                 
       
 24249                         symbol_c * return_type_symbol = last_type_symbol;
       
 24250                         return return_type_symbol;
       
 24251                         
       
 24252                     }
       
 24253                     
       
 24254                     ERROR;
       
 24255                 }
       
 24256                 
       
 24257             }
       
 24258             
       
 24259             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 24260             {
       
 24261         
       
 24262                 {
       
 24263                     identifier_c param_name("IN2");
       
 24264                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24265                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24266                     
       
 24267                     /* Get the value from a foo(<param_value>) style call */
       
 24268                     if (IN2_param_value == NULL)
       
 24269                       IN2_param_value = function_call_param_iterator.next();
       
 24270                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24271                     last_type_symbol = last_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 ;
       
 24272                     
       
 24273                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24274                     {
       
 24275                 
       
 24276                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 24277                         return return_type_symbol;
       
 24278                         
       
 24279                     }
       
 24280                     
       
 24281                     ERROR;
       
 24282                 }
       
 24283                 
       
 24284             }
       
 24285             
       
 24286             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 24287             {
       
 24288         
       
 24289                 {
       
 24290                     identifier_c param_name("IN2");
       
 24291                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24292                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24293                     
       
 24294                     /* Get the value from a foo(<param_value>) style call */
       
 24295                     if (IN2_param_value == NULL)
       
 24296                       IN2_param_value = function_call_param_iterator.next();
       
 24297                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24298                     last_type_symbol = last_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 ;
       
 24299                     
       
 24300                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24301                     {
       
 24302                 
       
 24303                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24304                         return return_type_symbol;
       
 24305                         
       
 24306                     }
       
 24307                     
       
 24308                     ERROR;
       
 24309                 }
       
 24310                 
       
 24311             }
       
 24312             
       
 24313             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24314             {
       
 24315         
       
 24316                 {
       
 24317                     identifier_c param_name("IN2");
       
 24318                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24319                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24320                     
       
 24321                     /* Get the value from a foo(<param_value>) style call */
       
 24322                     if (IN2_param_value == NULL)
       
 24323                       IN2_param_value = function_call_param_iterator.next();
       
 24324                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24325                     last_type_symbol = last_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 ;
       
 24326                     
       
 24327                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24328                     {
       
 24329                 
       
 24330                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24331                         return return_type_symbol;
       
 24332                         
       
 24333                     }
       
 24334                     
       
 24335                     ERROR;
       
 24336                 }
       
 24337                 
       
 24338             }
       
 24339             
       
 24340             ERROR;
       
 24341         }
       
 24342         
       
 24343     }/*function_add*/
       
 24344     break;
       
 24345 
       
 24346 /****
       
 24347  *MUL
       
 24348  */
       
 24349     case function_mul :
       
 24350     {
       
 24351         symbol_c *last_type_symbol = NULL;
       
 24352 
       
 24353         {
       
 24354             symbol_c *IN1_type_symbol = param_data_type;
       
 24355             last_type_symbol = param_data_type;
       
 24356             
       
 24357             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 24358             {
       
 24359         
       
 24360                 {
       
 24361                     identifier_c param_name("IN2");
       
 24362                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24363                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24364                     
       
 24365                     /* Get the value from a foo(<param_value>) style call */
       
 24366                     if (IN2_param_value == NULL)
       
 24367                       IN2_param_value = function_call_param_iterator.next();
       
 24368                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24369                     last_type_symbol = last_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 ;
       
 24370                     
       
 24371                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 24372                     {
       
 24373                 
       
 24374                         symbol_c * return_type_symbol = last_type_symbol;
       
 24375                         return return_type_symbol;
       
 24376                         
       
 24377                     }
       
 24378                     
       
 24379                     ERROR;
       
 24380                 }
       
 24381                 
       
 24382             }
       
 24383             
       
 24384             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24385             {
       
 24386         
       
 24387                 {
       
 24388                     identifier_c param_name("IN2");
       
 24389                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24390                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24391                     
       
 24392                     /* Get the value from a foo(<param_value>) style call */
       
 24393                     if (IN2_param_value == NULL)
       
 24394                       IN2_param_value = function_call_param_iterator.next();
       
 24395                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24396                     last_type_symbol = last_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 ;
       
 24397                     
       
 24398                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 24399                     {
       
 24400                 
       
 24401                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24402                         return return_type_symbol;
       
 24403                         
       
 24404                     }
       
 24405                     
       
 24406                     ERROR;
       
 24407                 }
       
 24408                 
       
 24409             }
       
 24410             
       
 24411             ERROR;
       
 24412         }
       
 24413         
       
 24414     }/*function_mul*/
       
 24415     break;
       
 24416 
       
 24417 /****
       
 24418  *SUB
       
 24419  */
       
 24420     case function_sub :
       
 24421     {
       
 24422         symbol_c *last_type_symbol = NULL;
       
 24423 
       
 24424         {
       
 24425             symbol_c *IN1_type_symbol = param_data_type;
       
 24426             last_type_symbol = param_data_type;
       
 24427             
       
 24428             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 24429             {
       
 24430         
       
 24431                 {
       
 24432                     identifier_c param_name("IN2");
       
 24433                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24434                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24435                     
       
 24436                     /* Get the value from a foo(<param_value>) style call */
       
 24437                     if (IN2_param_value == NULL)
       
 24438                       IN2_param_value = function_call_param_iterator.next();
       
 24439                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24440                     last_type_symbol = last_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 ;
       
 24441                     
       
 24442                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 24443                     {
       
 24444                 
       
 24445                         symbol_c * return_type_symbol = last_type_symbol;
       
 24446                         return return_type_symbol;
       
 24447                         
       
 24448                     }
       
 24449                     
       
 24450                     ERROR;
       
 24451                 }
       
 24452                 
       
 24453             }
       
 24454             
       
 24455             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 24456             {
       
 24457         
       
 24458                 {
       
 24459                     identifier_c param_name("IN2");
       
 24460                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24461                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24462                     
       
 24463                     /* Get the value from a foo(<param_value>) style call */
       
 24464                     if (IN2_param_value == NULL)
       
 24465                       IN2_param_value = function_call_param_iterator.next();
       
 24466                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24467                     last_type_symbol = last_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 ;
       
 24468                     
       
 24469                     if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 24470                     {
       
 24471                 
       
 24472                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24473                         return return_type_symbol;
       
 24474                         
       
 24475                     }
       
 24476                     
       
 24477                     ERROR;
       
 24478                 }
       
 24479                 
       
 24480             }
       
 24481             
       
 24482             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 24483             {
       
 24484         
       
 24485                 {
       
 24486                     identifier_c param_name("IN2");
       
 24487                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24488                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24489                     
       
 24490                     /* Get the value from a foo(<param_value>) style call */
       
 24491                     if (IN2_param_value == NULL)
       
 24492                       IN2_param_value = function_call_param_iterator.next();
       
 24493                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24494                     last_type_symbol = last_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 ;
       
 24495                     
       
 24496                     if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 24497                     {
       
 24498                 
       
 24499                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24500                         return return_type_symbol;
       
 24501                         
       
 24502                     }
       
 24503                     
       
 24504                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24505                     {
       
 24506                 
       
 24507                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 24508                         return return_type_symbol;
       
 24509                         
       
 24510                     }
       
 24511                     
       
 24512                     ERROR;
       
 24513                 }
       
 24514                 
       
 24515             }
       
 24516             
       
 24517             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 24518             {
       
 24519         
       
 24520                 {
       
 24521                     identifier_c param_name("IN2");
       
 24522                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24523                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24524                     
       
 24525                     /* Get the value from a foo(<param_value>) style call */
       
 24526                     if (IN2_param_value == NULL)
       
 24527                       IN2_param_value = function_call_param_iterator.next();
       
 24528                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24529                     last_type_symbol = last_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 ;
       
 24530                     
       
 24531                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 24532                     {
       
 24533                 
       
 24534                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24535                         return return_type_symbol;
       
 24536                         
       
 24537                     }
       
 24538                     
       
 24539                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24540                     {
       
 24541                 
       
 24542                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24543                         return return_type_symbol;
       
 24544                         
       
 24545                     }
       
 24546                     
       
 24547                     ERROR;
       
 24548                 }
       
 24549                 
       
 24550             }
       
 24551             
       
 24552             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24553             {
       
 24554         
       
 24555                 {
       
 24556                     identifier_c param_name("IN2");
       
 24557                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24558                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24559                     
       
 24560                     /* Get the value from a foo(<param_value>) style call */
       
 24561                     if (IN2_param_value == NULL)
       
 24562                       IN2_param_value = function_call_param_iterator.next();
       
 24563                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24564                     last_type_symbol = last_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 ;
       
 24565                     
       
 24566                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24567                     {
       
 24568                 
       
 24569                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24570                         return return_type_symbol;
       
 24571                         
       
 24572                     }
       
 24573                     
       
 24574                     ERROR;
       
 24575                 }
       
 24576                 
       
 24577             }
       
 24578             
       
 24579             ERROR;
       
 24580         }
       
 24581         
       
 24582     }/*function_sub*/
       
 24583     break;
       
 24584 
       
 24585 /****
       
 24586  *DIV
       
 24587  */
       
 24588     case function_div :
       
 24589     {
       
 24590         symbol_c *last_type_symbol = NULL;
       
 24591 
       
 24592         {
       
 24593             symbol_c *IN1_type_symbol = param_data_type;
       
 24594             last_type_symbol = param_data_type;
       
 24595             
       
 24596             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 24597             {
       
 24598         
       
 24599                 {
       
 24600                     identifier_c param_name("IN2");
       
 24601                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24602                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24603                     
       
 24604                     /* Get the value from a foo(<param_value>) style call */
       
 24605                     if (IN2_param_value == NULL)
       
 24606                       IN2_param_value = function_call_param_iterator.next();
       
 24607                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24608                     last_type_symbol = last_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 ;
       
 24609                     
       
 24610                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 24611                     {
       
 24612                 
       
 24613                         symbol_c * return_type_symbol = last_type_symbol;
       
 24614                         return return_type_symbol;
       
 24615                         
       
 24616                     }
       
 24617                     
       
 24618                     ERROR;
       
 24619                 }
       
 24620                 
       
 24621             }
       
 24622             
       
 24623             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24624             {
       
 24625         
       
 24626                 {
       
 24627                     identifier_c param_name("IN2");
       
 24628                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24629                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24630                     
       
 24631                     /* Get the value from a foo(<param_value>) style call */
       
 24632                     if (IN2_param_value == NULL)
       
 24633                       IN2_param_value = function_call_param_iterator.next();
       
 24634                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24635                     last_type_symbol = last_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 ;
       
 24636                     
       
 24637                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 24638                     {
       
 24639                 
       
 24640                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24641                         return return_type_symbol;
       
 24642                         
       
 24643                     }
       
 24644                     
       
 24645                     ERROR;
       
 24646                 }
       
 24647                 
       
 24648             }
       
 24649             
       
 24650             ERROR;
       
 24651         }
       
 24652         
       
 24653     }/*function_div*/
       
 24654     break;
       
 24655 
       
 24656 /****
       
 24657  *MOD
       
 24658  */
       
 24659     case function_mod :
       
 24660     {
       
 24661         symbol_c *last_type_symbol = NULL;
       
 24662 
       
 24663         {
       
 24664             symbol_c *IN1_type_symbol = param_data_type;
       
 24665             last_type_symbol = param_data_type;
       
 24666             
       
 24667             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 24668             {
       
 24669         
       
 24670                 {
       
 24671                     identifier_c param_name("IN2");
       
 24672                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24673                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24674                     
       
 24675                     /* Get the value from a foo(<param_value>) style call */
       
 24676                     if (IN2_param_value == NULL)
       
 24677                       IN2_param_value = function_call_param_iterator.next();
       
 24678                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24679                     last_type_symbol = last_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 ;
       
 24680                     
       
 24681                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 24682                     {
       
 24683                 
       
 24684                         symbol_c * return_type_symbol = last_type_symbol;
       
 24685                         return return_type_symbol;
       
 24686                         
       
 24687                     }
       
 24688                     
       
 24689                     ERROR;
       
 24690                 }
       
 24691                 
       
 24692             }
       
 24693             
       
 24694             ERROR;
       
 24695         }
       
 24696         
       
 24697     }/*function_mod*/
       
 24698     break;
       
 24699 
       
 24700 /****
       
 24701  *EXPT
       
 24702  */
       
 24703     case function_expt :
       
 24704     {
       
 24705         symbol_c *last_type_symbol = NULL;
       
 24706 
       
 24707         {
       
 24708             symbol_c *IN1_type_symbol = param_data_type;
       
 24709             last_type_symbol = param_data_type;
       
 24710             
       
 24711             if(search_expression_type->is_num_type(IN1_type_symbol))
       
 24712             {
       
 24713         
       
 24714                 {
       
 24715                     identifier_c param_name("IN2");
       
 24716                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24717                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24718                     
       
 24719                     /* Get the value from a foo(<param_value>) style call */
       
 24720                     if (IN2_param_value == NULL)
       
 24721                       IN2_param_value = function_call_param_iterator.next();
       
 24722                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24723                     last_type_symbol = last_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 ;
       
 24724                     
       
 24725                     if(search_expression_type->is_num_type(IN2_type_symbol))
       
 24726                     {
       
 24727                 
       
 24728                         symbol_c * return_type_symbol = last_type_symbol;
       
 24729                         return return_type_symbol;
       
 24730                         
       
 24731                     }
       
 24732                     
       
 24733                     ERROR;
       
 24734                 }
       
 24735                 
       
 24736             }
       
 24737             
       
 24738             ERROR;
       
 24739         }
       
 24740         
       
 24741     }/*function_expt*/
       
 24742     break;
       
 24743 
       
 24744 /****
       
 24745  *MOVE
       
 24746  */
       
 24747     case function_move :
       
 24748     {
       
 24749         symbol_c *last_type_symbol = NULL;
       
 24750 
       
 24751         {
       
 24752             symbol_c *IN_type_symbol = param_data_type;
       
 24753             last_type_symbol = param_data_type;
       
 24754             
       
 24755             if(search_expression_type->is_num_type(IN_type_symbol))
       
 24756             {
       
 24757         
       
 24758                 symbol_c * return_type_symbol = last_type_symbol;
       
 24759                 return return_type_symbol;
       
 24760                 
       
 24761             }
       
 24762             
       
 24763             ERROR;
       
 24764         }
       
 24765         
       
 24766     }/*function_move*/
       
 24767     break;
       
 24768 
       
 24769 /****
       
 24770  *SHL
       
 24771  */
       
 24772     case function_shl :
       
 24773     {
       
 24774         symbol_c *last_type_symbol = NULL;
       
 24775 
       
 24776         {
       
 24777             symbol_c *IN_type_symbol = param_data_type;
       
 24778             last_type_symbol = param_data_type;
       
 24779             
       
 24780             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 24781             {
       
 24782         
       
 24783                 {
       
 24784                     identifier_c param_name("N");
       
 24785                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24786                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 24787                     
       
 24788                     /* Get the value from a foo(<param_value>) style call */
       
 24789                     if (N_param_value == NULL)
       
 24790                       N_param_value = function_call_param_iterator.next();
       
 24791                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 24792                     last_type_symbol = last_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 ;
       
 24793                     
       
 24794                     if(search_expression_type->is_integer_type(N_type_symbol))
       
 24795                     {
       
 24796                 
       
 24797                         symbol_c * return_type_symbol = IN_type_symbol;
       
 24798                         return return_type_symbol;
       
 24799                         
       
 24800                     }
       
 24801                     
       
 24802                     ERROR;
       
 24803                 }
       
 24804                 
       
 24805             }
       
 24806             
       
 24807             ERROR;
       
 24808         }
       
 24809         
       
 24810     }/*function_shl*/
       
 24811     break;
       
 24812 
       
 24813 /****
       
 24814  *SHR
       
 24815  */
       
 24816     case function_shr :
       
 24817     {
       
 24818         symbol_c *last_type_symbol = NULL;
       
 24819 
       
 24820         {
       
 24821             symbol_c *IN_type_symbol = param_data_type;
       
 24822             last_type_symbol = param_data_type;
       
 24823             
       
 24824             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 24825             {
       
 24826         
       
 24827                 {
       
 24828                     identifier_c param_name("N");
       
 24829                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24830                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 24831                     
       
 24832                     /* Get the value from a foo(<param_value>) style call */
       
 24833                     if (N_param_value == NULL)
       
 24834                       N_param_value = function_call_param_iterator.next();
       
 24835                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 24836                     last_type_symbol = last_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 ;
       
 24837                     
       
 24838                     if(search_expression_type->is_integer_type(N_type_symbol))
       
 24839                     {
       
 24840                 
       
 24841                         symbol_c * return_type_symbol = IN_type_symbol;
       
 24842                         return return_type_symbol;
       
 24843                         
       
 24844                     }
       
 24845                     
       
 24846                     ERROR;
       
 24847                 }
       
 24848                 
       
 24849             }
       
 24850             
       
 24851             ERROR;
       
 24852         }
       
 24853         
       
 24854     }/*function_shr*/
       
 24855     break;
       
 24856 
       
 24857 /****
       
 24858  *ROR
       
 24859  */
       
 24860     case function_ror :
       
 24861     {
       
 24862         symbol_c *last_type_symbol = NULL;
       
 24863 
       
 24864         {
       
 24865             symbol_c *IN_type_symbol = param_data_type;
       
 24866             last_type_symbol = param_data_type;
       
 24867             
       
 24868             if(search_expression_type->is_nbinary_type(IN_type_symbol))
       
 24869             {
       
 24870         
       
 24871                 {
       
 24872                     identifier_c param_name("N");
       
 24873                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24874                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 24875                     
       
 24876                     /* Get the value from a foo(<param_value>) style call */
       
 24877                     if (N_param_value == NULL)
       
 24878                       N_param_value = function_call_param_iterator.next();
       
 24879                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 24880                     last_type_symbol = last_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 ;
       
 24881                     
       
 24882                     if(search_expression_type->is_integer_type(N_type_symbol))
       
 24883                     {
       
 24884                 
       
 24885                         symbol_c * return_type_symbol = IN_type_symbol;
       
 24886                         return return_type_symbol;
       
 24887                         
       
 24888                     }
       
 24889                     
       
 24890                     ERROR;
       
 24891                 }
       
 24892                 
       
 24893             }
       
 24894             
       
 24895             ERROR;
       
 24896         }
       
 24897         
       
 24898     }/*function_ror*/
       
 24899     break;
       
 24900 
       
 24901 /****
       
 24902  *ROL
       
 24903  */
       
 24904     case function_rol :
       
 24905     {
       
 24906         symbol_c *last_type_symbol = NULL;
       
 24907 
       
 24908         {
       
 24909             symbol_c *IN_type_symbol = param_data_type;
       
 24910             last_type_symbol = param_data_type;
       
 24911             
       
 24912             if(search_expression_type->is_nbinary_type(IN_type_symbol))
       
 24913             {
       
 24914         
       
 24915                 {
       
 24916                     identifier_c param_name("N");
       
 24917                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24918                     symbol_c *N_param_value = function_call_param_iterator.search(&param_name);
       
 24919                     
       
 24920                     /* Get the value from a foo(<param_value>) style call */
       
 24921                     if (N_param_value == NULL)
       
 24922                       N_param_value = function_call_param_iterator.next();
       
 24923                     symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value);
       
 24924                     last_type_symbol = last_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 ;
       
 24925                     
       
 24926                     if(search_expression_type->is_integer_type(N_type_symbol))
       
 24927                     {
       
 24928                 
       
 24929                         symbol_c * return_type_symbol = IN_type_symbol;
       
 24930                         return return_type_symbol;
       
 24931                         
       
 24932                     }
       
 24933                     
       
 24934                     ERROR;
       
 24935                 }
       
 24936                 
       
 24937             }
       
 24938             
       
 24939             ERROR;
       
 24940         }
       
 24941         
       
 24942     }/*function_rol*/
       
 24943     break;
       
 24944 
       
 24945 /****
       
 24946  *AND
       
 24947  */
       
 24948     case function_and :
       
 24949     {
       
 24950         symbol_c *last_type_symbol = NULL;
       
 24951 
       
 24952         {
       
 24953             symbol_c *IN1_type_symbol = param_data_type;
       
 24954             last_type_symbol = param_data_type;
       
 24955             
       
 24956             if(search_expression_type->is_binary_type(IN1_type_symbol))
       
 24957             {
       
 24958         
       
 24959                 {
       
 24960                     identifier_c param_name("IN2");
       
 24961                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 24962                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 24963                     
       
 24964                     /* Get the value from a foo(<param_value>) style call */
       
 24965                     if (IN2_param_value == NULL)
       
 24966                       IN2_param_value = function_call_param_iterator.next();
       
 24967                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 24968                     last_type_symbol = last_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 ;
       
 24969                     
       
 24970                     if(search_expression_type->is_binary_type(IN2_type_symbol))
       
 24971                     {
       
 24972                 
       
 24973                         symbol_c * return_type_symbol = last_type_symbol;
       
 24974                         return return_type_symbol;
       
 24975                         
       
 24976                     }
       
 24977                     
       
 24978                     ERROR;
       
 24979                 }
       
 24980                 
       
 24981             }
       
 24982             
       
 24983             ERROR;
       
 24984         }
       
 24985         
       
 24986     }/*function_and*/
       
 24987     break;
       
 24988 
       
 24989 /****
       
 24990  *OR
       
 24991  */
       
 24992     case function_or :
       
 24993     {
       
 24994         symbol_c *last_type_symbol = NULL;
       
 24995 
       
 24996         {
       
 24997             symbol_c *IN1_type_symbol = param_data_type;
       
 24998             last_type_symbol = param_data_type;
       
 24999             
       
 25000             if(search_expression_type->is_binary_type(IN1_type_symbol))
       
 25001             {
       
 25002         
       
 25003                 {
       
 25004                     identifier_c param_name("IN2");
       
 25005                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25006                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25007                     
       
 25008                     /* Get the value from a foo(<param_value>) style call */
       
 25009                     if (IN2_param_value == NULL)
       
 25010                       IN2_param_value = function_call_param_iterator.next();
       
 25011                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25012                     last_type_symbol = last_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 ;
       
 25013                     
       
 25014                     if(search_expression_type->is_binary_type(IN2_type_symbol))
       
 25015                     {
       
 25016                 
       
 25017                         symbol_c * return_type_symbol = last_type_symbol;
       
 25018                         return return_type_symbol;
       
 25019                         
       
 25020                     }
       
 25021                     
       
 25022                     ERROR;
       
 25023                 }
       
 25024                 
       
 25025             }
       
 25026             
       
 25027             ERROR;
       
 25028         }
       
 25029         
       
 25030     }/*function_or*/
       
 25031     break;
       
 25032 
       
 25033 /****
       
 25034  *XOR
       
 25035  */
       
 25036     case function_xor :
       
 25037     {
       
 25038         symbol_c *last_type_symbol = NULL;
       
 25039 
       
 25040         {
       
 25041             symbol_c *IN1_type_symbol = param_data_type;
       
 25042             last_type_symbol = param_data_type;
       
 25043             
       
 25044             if(search_expression_type->is_binary_type(IN1_type_symbol))
       
 25045             {
       
 25046         
       
 25047                 {
       
 25048                     identifier_c param_name("IN2");
       
 25049                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25050                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25051                     
       
 25052                     /* Get the value from a foo(<param_value>) style call */
       
 25053                     if (IN2_param_value == NULL)
       
 25054                       IN2_param_value = function_call_param_iterator.next();
       
 25055                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25056                     last_type_symbol = last_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 ;
       
 25057                     
       
 25058                     if(search_expression_type->is_binary_type(IN2_type_symbol))
       
 25059                     {
       
 25060                 
       
 25061                         symbol_c * return_type_symbol = last_type_symbol;
       
 25062                         return return_type_symbol;
       
 25063                         
       
 25064                     }
       
 25065                     
       
 25066                     ERROR;
       
 25067                 }
       
 25068                 
       
 25069             }
       
 25070             
       
 25071             ERROR;
       
 25072         }
       
 25073         
       
 25074     }/*function_xor*/
       
 25075     break;
       
 25076 
       
 25077 /****
       
 25078  *NOT
       
 25079  */
       
 25080     case function_not :
       
 25081     {
       
 25082         symbol_c *last_type_symbol = NULL;
       
 25083 
       
 25084         {
       
 25085             symbol_c *IN_type_symbol = param_data_type;
       
 25086             last_type_symbol = param_data_type;
       
 25087             
       
 25088             if(search_expression_type->is_binary_type(IN_type_symbol))
       
 25089             {
       
 25090         
       
 25091                 symbol_c * return_type_symbol = IN_type_symbol;
       
 25092                 return return_type_symbol;
       
 25093                 
       
 25094             }
       
 25095             
       
 25096             ERROR;
       
 25097         }
       
 25098         
       
 25099     }/*function_not*/
       
 25100     break;
       
 25101 
       
 25102 /****
       
 25103  *SEL
       
 25104  */
       
 25105     case function_sel :
       
 25106     {
       
 25107         symbol_c *last_type_symbol = NULL;
       
 25108 
       
 25109         {
       
 25110             symbol_c *G_type_symbol = param_data_type;
       
 25111             last_type_symbol = param_data_type;
       
 25112             
       
 25113             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 25114             {
       
 25115         
       
 25116                 {
       
 25117                     identifier_c param_name("IN0");
       
 25118                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25119                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 25120                     
       
 25121                     /* Get the value from a foo(<param_value>) style call */
       
 25122                     if (IN0_param_value == NULL)
       
 25123                       IN0_param_value = function_call_param_iterator.next();
       
 25124                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 25125                     last_type_symbol = last_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 ;
       
 25126                     
       
 25127                     
       
 25128                     {
       
 25129                 
       
 25130                         {
       
 25131                             identifier_c param_name("IN1");
       
 25132                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25133                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 25134                             
       
 25135                             /* Get the value from a foo(<param_value>) style call */
       
 25136                             if (IN1_param_value == NULL)
       
 25137                               IN1_param_value = function_call_param_iterator.next();
       
 25138                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 25139                             last_type_symbol = last_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 ;
       
 25140                             
       
 25141                             
       
 25142                             {
       
 25143                         
       
 25144                                 symbol_c * return_type_symbol = last_type_symbol;
       
 25145                                 return return_type_symbol;
       
 25146                                 
       
 25147                             }
       
 25148                             
       
 25149                             ERROR;
       
 25150                         }
       
 25151                         
       
 25152                     }
       
 25153                     
       
 25154                     ERROR;
       
 25155                 }
       
 25156                 
       
 25157             }
       
 25158             
       
 25159             ERROR;
       
 25160         }
       
 25161         
       
 25162     }/*function_sel*/
       
 25163     break;
       
 25164 
       
 25165 /****
       
 25166  *MAX
       
 25167  */
       
 25168     case function_max :
       
 25169     {
       
 25170         symbol_c *last_type_symbol = NULL;
       
 25171 
       
 25172         {
       
 25173             symbol_c *IN1_type_symbol = param_data_type;
       
 25174             last_type_symbol = param_data_type;
       
 25175             
       
 25176             
       
 25177             {
       
 25178         
       
 25179                 {
       
 25180                     identifier_c param_name("IN2");
       
 25181                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25182                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25183                     
       
 25184                     /* Get the value from a foo(<param_value>) style call */
       
 25185                     if (IN2_param_value == NULL)
       
 25186                       IN2_param_value = function_call_param_iterator.next();
       
 25187                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25188                     last_type_symbol = last_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 ;
       
 25189                     
       
 25190                     
       
 25191                     {
       
 25192                 
       
 25193                         symbol_c * return_type_symbol = last_type_symbol;
       
 25194                         return return_type_symbol;
       
 25195                         
       
 25196                     }
       
 25197                     
       
 25198                     ERROR;
       
 25199                 }
       
 25200                 
       
 25201             }
       
 25202             
       
 25203             ERROR;
       
 25204         }
       
 25205         
       
 25206     }/*function_max*/
       
 25207     break;
       
 25208 
       
 25209 /****
       
 25210  *MIN
       
 25211  */
       
 25212     case function_min :
       
 25213     {
       
 25214         symbol_c *last_type_symbol = NULL;
       
 25215 
       
 25216         {
       
 25217             symbol_c *IN1_type_symbol = param_data_type;
       
 25218             last_type_symbol = param_data_type;
       
 25219             
       
 25220             
       
 25221             {
       
 25222         
       
 25223                 {
       
 25224                     identifier_c param_name("IN2");
       
 25225                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25226                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25227                     
       
 25228                     /* Get the value from a foo(<param_value>) style call */
       
 25229                     if (IN2_param_value == NULL)
       
 25230                       IN2_param_value = function_call_param_iterator.next();
       
 25231                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25232                     last_type_symbol = last_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 ;
       
 25233                     
       
 25234                     
       
 25235                     {
       
 25236                 
       
 25237                         symbol_c * return_type_symbol = last_type_symbol;
       
 25238                         return return_type_symbol;
       
 25239                         
       
 25240                     }
       
 25241                     
       
 25242                     ERROR;
       
 25243                 }
       
 25244                 
       
 25245             }
       
 25246             
       
 25247             ERROR;
       
 25248         }
       
 25249         
       
 25250     }/*function_min*/
       
 25251     break;
       
 25252 
       
 25253 /****
       
 25254  *LIMIT
       
 25255  */
       
 25256     case function_limit :
       
 25257     {
       
 25258         symbol_c *last_type_symbol = NULL;
       
 25259 
       
 25260         {
       
 25261             symbol_c *MN_type_symbol = param_data_type;
       
 25262             last_type_symbol = param_data_type;
       
 25263             
       
 25264             
       
 25265             {
       
 25266         
       
 25267                 {
       
 25268                     identifier_c param_name("IN");
       
 25269                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25270                     symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 25271                     
       
 25272                     /* Get the value from a foo(<param_value>) style call */
       
 25273                     if (IN_param_value == NULL)
       
 25274                       IN_param_value = function_call_param_iterator.next();
       
 25275                     symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 25276                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 25277                     
       
 25278                     
       
 25279                     {
       
 25280                 
       
 25281                         {
       
 25282                             identifier_c param_name("MX");
       
 25283                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25284                             symbol_c *MX_param_value = function_call_param_iterator.search(&param_name);
       
 25285                             
       
 25286                             /* Get the value from a foo(<param_value>) style call */
       
 25287                             if (MX_param_value == NULL)
       
 25288                               MX_param_value = function_call_param_iterator.next();
       
 25289                             symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value);
       
 25290                             last_type_symbol = last_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 ;
       
 25291                             
       
 25292                             
       
 25293                             {
       
 25294                         
       
 25295                                 symbol_c * return_type_symbol = IN_type_symbol;
       
 25296                                 return return_type_symbol;
       
 25297                                 
       
 25298                             }
       
 25299                             
       
 25300                             ERROR;
       
 25301                         }
       
 25302                         
       
 25303                     }
       
 25304                     
       
 25305                     ERROR;
       
 25306                 }
       
 25307                 
       
 25308             }
       
 25309             
       
 25310             ERROR;
       
 25311         }
       
 25312         
       
 25313     }/*function_limit*/
       
 25314     break;
       
 25315 
       
 25316 /****
       
 25317  *MUX
       
 25318  */
       
 25319     case function_mux :
       
 25320     {
       
 25321         symbol_c *last_type_symbol = NULL;
       
 25322 
       
 25323         {
       
 25324             symbol_c *K_type_symbol = param_data_type;
       
 25325             last_type_symbol = param_data_type;
       
 25326             
       
 25327             if(search_expression_type->is_integer_type(K_type_symbol))
       
 25328             {
       
 25329         
       
 25330                 {
       
 25331                     identifier_c param_name("IN0");
       
 25332                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25333                     symbol_c *IN0_param_value = function_call_param_iterator.search(&param_name);
       
 25334                     
       
 25335                     /* Get the value from a foo(<param_value>) style call */
       
 25336                     if (IN0_param_value == NULL)
       
 25337                       IN0_param_value = function_call_param_iterator.next();
       
 25338                     symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value);
       
 25339                     last_type_symbol = last_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 ;
       
 25340                     
       
 25341                     
       
 25342                     {
       
 25343                 
       
 25344                         {
       
 25345                             identifier_c param_name("IN1");
       
 25346                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25347                             symbol_c *IN1_param_value = function_call_param_iterator.search(&param_name);
       
 25348                             
       
 25349                             /* Get the value from a foo(<param_value>) style call */
       
 25350                             if (IN1_param_value == NULL)
       
 25351                               IN1_param_value = function_call_param_iterator.next();
       
 25352                             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
       
 25353                             last_type_symbol = last_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 ;
       
 25354                             
       
 25355                             
       
 25356                             {
       
 25357                         
       
 25358                                 symbol_c * return_type_symbol = last_type_symbol;
       
 25359                                 return return_type_symbol;
       
 25360                                 
       
 25361                             }
       
 25362                             
       
 25363                             ERROR;
       
 25364                         }
       
 25365                         
       
 25366                     }
       
 25367                     
       
 25368                     ERROR;
       
 25369                 }
       
 25370                 
       
 25371             }
       
 25372             
       
 25373             ERROR;
       
 25374         }
       
 25375         
       
 25376     }/*function_mux*/
       
 25377     break;
       
 25378 
       
 25379 /****
       
 25380  *GT
       
 25381  */
       
 25382     case function_gt :
       
 25383     {
       
 25384         symbol_c *last_type_symbol = NULL;
       
 25385 
       
 25386         {
       
 25387             symbol_c *IN1_type_symbol = param_data_type;
       
 25388             last_type_symbol = param_data_type;
       
 25389             
       
 25390             
       
 25391             {
       
 25392         
       
 25393                 {
       
 25394                     identifier_c param_name("IN2");
       
 25395                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25396                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25397                     
       
 25398                     /* Get the value from a foo(<param_value>) style call */
       
 25399                     if (IN2_param_value == NULL)
       
 25400                       IN2_param_value = function_call_param_iterator.next();
       
 25401                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25402                     last_type_symbol = last_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 ;
       
 25403                     
       
 25404                     
       
 25405                     {
       
 25406                 
       
 25407                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25408                         return return_type_symbol;
       
 25409                         
       
 25410                     }
       
 25411                     
       
 25412                     ERROR;
       
 25413                 }
       
 25414                 
       
 25415             }
       
 25416             
       
 25417             ERROR;
       
 25418         }
       
 25419         
       
 25420     }/*function_gt*/
       
 25421     break;
       
 25422 
       
 25423 /****
       
 25424  *GE
       
 25425  */
       
 25426     case function_ge :
       
 25427     {
       
 25428         symbol_c *last_type_symbol = NULL;
       
 25429 
       
 25430         {
       
 25431             symbol_c *IN1_type_symbol = param_data_type;
       
 25432             last_type_symbol = param_data_type;
       
 25433             
       
 25434             
       
 25435             {
       
 25436         
       
 25437                 {
       
 25438                     identifier_c param_name("IN2");
       
 25439                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25440                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25441                     
       
 25442                     /* Get the value from a foo(<param_value>) style call */
       
 25443                     if (IN2_param_value == NULL)
       
 25444                       IN2_param_value = function_call_param_iterator.next();
       
 25445                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25446                     last_type_symbol = last_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 ;
       
 25447                     
       
 25448                     
       
 25449                     {
       
 25450                 
       
 25451                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25452                         return return_type_symbol;
       
 25453                         
       
 25454                     }
       
 25455                     
       
 25456                     ERROR;
       
 25457                 }
       
 25458                 
       
 25459             }
       
 25460             
       
 25461             ERROR;
       
 25462         }
       
 25463         
       
 25464     }/*function_ge*/
       
 25465     break;
       
 25466 
       
 25467 /****
       
 25468  *EQ
       
 25469  */
       
 25470     case function_eq :
       
 25471     {
       
 25472         symbol_c *last_type_symbol = NULL;
       
 25473 
       
 25474         {
       
 25475             symbol_c *IN1_type_symbol = param_data_type;
       
 25476             last_type_symbol = param_data_type;
       
 25477             
       
 25478             
       
 25479             {
       
 25480         
       
 25481                 {
       
 25482                     identifier_c param_name("IN2");
       
 25483                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25484                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25485                     
       
 25486                     /* Get the value from a foo(<param_value>) style call */
       
 25487                     if (IN2_param_value == NULL)
       
 25488                       IN2_param_value = function_call_param_iterator.next();
       
 25489                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25490                     last_type_symbol = last_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 ;
       
 25491                     
       
 25492                     
       
 25493                     {
       
 25494                 
       
 25495                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25496                         return return_type_symbol;
       
 25497                         
       
 25498                     }
       
 25499                     
       
 25500                     ERROR;
       
 25501                 }
       
 25502                 
       
 25503             }
       
 25504             
       
 25505             ERROR;
       
 25506         }
       
 25507         
       
 25508     }/*function_eq*/
       
 25509     break;
       
 25510 
       
 25511 /****
       
 25512  *LT
       
 25513  */
       
 25514     case function_lt :
       
 25515     {
       
 25516         symbol_c *last_type_symbol = NULL;
       
 25517 
       
 25518         {
       
 25519             symbol_c *IN1_type_symbol = param_data_type;
       
 25520             last_type_symbol = param_data_type;
       
 25521             
       
 25522             
       
 25523             {
       
 25524         
       
 25525                 {
       
 25526                     identifier_c param_name("IN2");
       
 25527                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25528                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25529                     
       
 25530                     /* Get the value from a foo(<param_value>) style call */
       
 25531                     if (IN2_param_value == NULL)
       
 25532                       IN2_param_value = function_call_param_iterator.next();
       
 25533                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25534                     last_type_symbol = last_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 ;
       
 25535                     
       
 25536                     
       
 25537                     {
       
 25538                 
       
 25539                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25540                         return return_type_symbol;
       
 25541                         
       
 25542                     }
       
 25543                     
       
 25544                     ERROR;
       
 25545                 }
       
 25546                 
       
 25547             }
       
 25548             
       
 25549             ERROR;
       
 25550         }
       
 25551         
       
 25552     }/*function_lt*/
       
 25553     break;
       
 25554 
       
 25555 /****
       
 25556  *LE
       
 25557  */
       
 25558     case function_le :
       
 25559     {
       
 25560         symbol_c *last_type_symbol = NULL;
       
 25561 
       
 25562         {
       
 25563             symbol_c *IN1_type_symbol = param_data_type;
       
 25564             last_type_symbol = param_data_type;
       
 25565             
       
 25566             
       
 25567             {
       
 25568         
       
 25569                 {
       
 25570                     identifier_c param_name("IN2");
       
 25571                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25572                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25573                     
       
 25574                     /* Get the value from a foo(<param_value>) style call */
       
 25575                     if (IN2_param_value == NULL)
       
 25576                       IN2_param_value = function_call_param_iterator.next();
       
 25577                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25578                     last_type_symbol = last_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 ;
       
 25579                     
       
 25580                     
       
 25581                     {
       
 25582                 
       
 25583                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25584                         return return_type_symbol;
       
 25585                         
       
 25586                     }
       
 25587                     
       
 25588                     ERROR;
       
 25589                 }
       
 25590                 
       
 25591             }
       
 25592             
       
 25593             ERROR;
       
 25594         }
       
 25595         
       
 25596     }/*function_le*/
       
 25597     break;
       
 25598 
       
 25599 /****
       
 25600  *NE
       
 25601  */
       
 25602     case function_ne :
       
 25603     {
       
 25604         symbol_c *last_type_symbol = NULL;
       
 25605 
       
 25606         {
       
 25607             symbol_c *IN1_type_symbol = param_data_type;
       
 25608             last_type_symbol = param_data_type;
       
 25609             
       
 25610             
       
 25611             {
       
 25612         
       
 25613                 {
       
 25614                     identifier_c param_name("IN2");
       
 25615                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25616                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25617                     
       
 25618                     /* Get the value from a foo(<param_value>) style call */
       
 25619                     if (IN2_param_value == NULL)
       
 25620                       IN2_param_value = function_call_param_iterator.next();
       
 25621                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25622                     last_type_symbol = last_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 ;
       
 25623                     
       
 25624                     
       
 25625                     {
       
 25626                 
       
 25627                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 25628                         return return_type_symbol;
       
 25629                         
       
 25630                     }
       
 25631                     
       
 25632                     ERROR;
       
 25633                 }
       
 25634                 
       
 25635             }
       
 25636             
       
 25637             ERROR;
       
 25638         }
       
 25639         
       
 25640     }/*function_ne*/
       
 25641     break;
       
 25642 
       
 25643 /****
       
 25644  *LEN
       
 25645  */
       
 25646     case function_len :
       
 25647     {
       
 25648         symbol_c *last_type_symbol = NULL;
       
 25649 
       
 25650         {
       
 25651             symbol_c *IN_type_symbol = param_data_type;
       
 25652             last_type_symbol = param_data_type;
       
 25653             
       
 25654             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 25655             {
       
 25656         
       
 25657                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 25658                 return return_type_symbol;
       
 25659                 
       
 25660             }
       
 25661             
       
 25662             ERROR;
       
 25663         }
       
 25664         
       
 25665     }/*function_len*/
       
 25666     break;
       
 25667 
       
 25668 /****
       
 25669  *LEFT
       
 25670  */
       
 25671     case function_left :
       
 25672     {
       
 25673         symbol_c *last_type_symbol = NULL;
       
 25674 
       
 25675         {
       
 25676             symbol_c *IN_type_symbol = param_data_type;
       
 25677             last_type_symbol = param_data_type;
       
 25678             
       
 25679             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 25680             {
       
 25681         
       
 25682                 {
       
 25683                     identifier_c param_name("L");
       
 25684                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25685                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 25686                     
       
 25687                     /* Get the value from a foo(<param_value>) style call */
       
 25688                     if (L_param_value == NULL)
       
 25689                       L_param_value = function_call_param_iterator.next();
       
 25690                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 25691                     last_type_symbol = last_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 ;
       
 25692                     
       
 25693                     if(search_expression_type->is_integer_type(L_type_symbol))
       
 25694                     {
       
 25695                 
       
 25696                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25697                         return return_type_symbol;
       
 25698                         
       
 25699                     }
       
 25700                     
       
 25701                     ERROR;
       
 25702                 }
       
 25703                 
       
 25704             }
       
 25705             
       
 25706             ERROR;
       
 25707         }
       
 25708         
       
 25709     }/*function_left*/
       
 25710     break;
       
 25711 
       
 25712 /****
       
 25713  *RIGHT
       
 25714  */
       
 25715     case function_right :
       
 25716     {
       
 25717         symbol_c *last_type_symbol = NULL;
       
 25718 
       
 25719         {
       
 25720             symbol_c *IN_type_symbol = param_data_type;
       
 25721             last_type_symbol = param_data_type;
       
 25722             
       
 25723             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 25724             {
       
 25725         
       
 25726                 {
       
 25727                     identifier_c param_name("L");
       
 25728                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25729                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 25730                     
       
 25731                     /* Get the value from a foo(<param_value>) style call */
       
 25732                     if (L_param_value == NULL)
       
 25733                       L_param_value = function_call_param_iterator.next();
       
 25734                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 25735                     last_type_symbol = last_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 ;
       
 25736                     
       
 25737                     if(search_expression_type->is_integer_type(L_type_symbol))
       
 25738                     {
       
 25739                 
       
 25740                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25741                         return return_type_symbol;
       
 25742                         
       
 25743                     }
       
 25744                     
       
 25745                     ERROR;
       
 25746                 }
       
 25747                 
       
 25748             }
       
 25749             
       
 25750             ERROR;
       
 25751         }
       
 25752         
       
 25753     }/*function_right*/
       
 25754     break;
       
 25755 
       
 25756 /****
       
 25757  *MID
       
 25758  */
       
 25759     case function_mid :
       
 25760     {
       
 25761         symbol_c *last_type_symbol = NULL;
       
 25762 
       
 25763         {
       
 25764             symbol_c *IN_type_symbol = param_data_type;
       
 25765             last_type_symbol = param_data_type;
       
 25766             
       
 25767             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 25768             {
       
 25769         
       
 25770                 {
       
 25771                     identifier_c param_name("L");
       
 25772                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25773                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 25774                     
       
 25775                     /* Get the value from a foo(<param_value>) style call */
       
 25776                     if (L_param_value == NULL)
       
 25777                       L_param_value = function_call_param_iterator.next();
       
 25778                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 25779                     last_type_symbol = last_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 ;
       
 25780                     
       
 25781                     if(search_expression_type->is_integer_type(L_type_symbol))
       
 25782                     {
       
 25783                 
       
 25784                         {
       
 25785                             identifier_c param_name("P");
       
 25786                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25787                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 25788                             
       
 25789                             /* Get the value from a foo(<param_value>) style call */
       
 25790                             if (P_param_value == NULL)
       
 25791                               P_param_value = function_call_param_iterator.next();
       
 25792                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 25793                             last_type_symbol = last_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 ;
       
 25794                             
       
 25795                             if(search_expression_type->is_integer_type(P_type_symbol))
       
 25796                             {
       
 25797                         
       
 25798                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25799                                 return return_type_symbol;
       
 25800                                 
       
 25801                             }
       
 25802                             
       
 25803                             ERROR;
       
 25804                         }
       
 25805                         
       
 25806                     }
       
 25807                     
       
 25808                     ERROR;
       
 25809                 }
       
 25810                 
       
 25811             }
       
 25812             
       
 25813             ERROR;
       
 25814         }
       
 25815         
       
 25816     }/*function_mid*/
       
 25817     break;
       
 25818 
       
 25819 /****
       
 25820  *CONCAT
       
 25821  */
       
 25822     case function_concat :
       
 25823     {
       
 25824         symbol_c *last_type_symbol = NULL;
       
 25825 
       
 25826         {
       
 25827             symbol_c *IN1_type_symbol = param_data_type;
       
 25828             last_type_symbol = param_data_type;
       
 25829             
       
 25830             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 25831             {
       
 25832         
       
 25833                 {
       
 25834                     identifier_c param_name("IN2");
       
 25835                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25836                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25837                     
       
 25838                     /* Get the value from a foo(<param_value>) style call */
       
 25839                     if (IN2_param_value == NULL)
       
 25840                       IN2_param_value = function_call_param_iterator.next();
       
 25841                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25842                     last_type_symbol = last_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 ;
       
 25843                     
       
 25844                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 25845                     {
       
 25846                 
       
 25847                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 25848                         return return_type_symbol;
       
 25849                         
       
 25850                     }
       
 25851                     
       
 25852                     ERROR;
       
 25853                 }
       
 25854                 
       
 25855             }
       
 25856             
       
 25857             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 25858             {
       
 25859         
       
 25860                 {
       
 25861                     identifier_c param_name("IN2");
       
 25862                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25863                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25864                     
       
 25865                     /* Get the value from a foo(<param_value>) style call */
       
 25866                     if (IN2_param_value == NULL)
       
 25867                       IN2_param_value = function_call_param_iterator.next();
       
 25868                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25869                     last_type_symbol = last_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 ;
       
 25870                     
       
 25871                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 25872                     {
       
 25873                 
       
 25874                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25875                         return return_type_symbol;
       
 25876                         
       
 25877                     }
       
 25878                     
       
 25879                     ERROR;
       
 25880                 }
       
 25881                 
       
 25882             }
       
 25883             
       
 25884             ERROR;
       
 25885         }
       
 25886         
       
 25887     }/*function_concat*/
       
 25888     break;
       
 25889 
       
 25890 /****
       
 25891  *INSERT
       
 25892  */
       
 25893     case function_insert :
       
 25894     {
       
 25895         symbol_c *last_type_symbol = NULL;
       
 25896 
       
 25897         {
       
 25898             symbol_c *IN1_type_symbol = param_data_type;
       
 25899             last_type_symbol = param_data_type;
       
 25900             
       
 25901             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 25902             {
       
 25903         
       
 25904                 {
       
 25905                     identifier_c param_name("IN2");
       
 25906                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25907                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 25908                     
       
 25909                     /* Get the value from a foo(<param_value>) style call */
       
 25910                     if (IN2_param_value == NULL)
       
 25911                       IN2_param_value = function_call_param_iterator.next();
       
 25912                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 25913                     last_type_symbol = last_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 ;
       
 25914                     
       
 25915                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 25916                     {
       
 25917                 
       
 25918                         {
       
 25919                             identifier_c param_name("P");
       
 25920                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25921                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 25922                             
       
 25923                             /* Get the value from a foo(<param_value>) style call */
       
 25924                             if (P_param_value == NULL)
       
 25925                               P_param_value = function_call_param_iterator.next();
       
 25926                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 25927                             last_type_symbol = last_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 ;
       
 25928                             
       
 25929                             if(search_expression_type->is_integer_type(P_type_symbol))
       
 25930                             {
       
 25931                         
       
 25932                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25933                                 return return_type_symbol;
       
 25934                                 
       
 25935                             }
       
 25936                             
       
 25937                             ERROR;
       
 25938                         }
       
 25939                         
       
 25940                     }
       
 25941                     
       
 25942                     ERROR;
       
 25943                 }
       
 25944                 
       
 25945             }
       
 25946             
       
 25947             ERROR;
       
 25948         }
       
 25949         
       
 25950     }/*function_insert*/
       
 25951     break;
       
 25952 
       
 25953 /****
       
 25954  *DELETE
       
 25955  */
       
 25956     case function_delete :
       
 25957     {
       
 25958         symbol_c *last_type_symbol = NULL;
       
 25959 
       
 25960         {
       
 25961             symbol_c *IN_type_symbol = param_data_type;
       
 25962             last_type_symbol = param_data_type;
       
 25963             
       
 25964             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 25965             {
       
 25966         
       
 25967                 {
       
 25968                     identifier_c param_name("L");
       
 25969                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25970                     symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 25971                     
       
 25972                     /* Get the value from a foo(<param_value>) style call */
       
 25973                     if (L_param_value == NULL)
       
 25974                       L_param_value = function_call_param_iterator.next();
       
 25975                     symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 25976                     last_type_symbol = last_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 ;
       
 25977                     
       
 25978                     if(search_expression_type->is_integer_type(L_type_symbol))
       
 25979                     {
       
 25980                 
       
 25981                         {
       
 25982                             identifier_c param_name("P");
       
 25983                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 25984                             symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 25985                             
       
 25986                             /* Get the value from a foo(<param_value>) style call */
       
 25987                             if (P_param_value == NULL)
       
 25988                               P_param_value = function_call_param_iterator.next();
       
 25989                             symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 25990                             last_type_symbol = last_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 ;
       
 25991                             
       
 25992                             if(search_expression_type->is_integer_type(P_type_symbol))
       
 25993                             {
       
 25994                         
       
 25995                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 25996                                 return return_type_symbol;
       
 25997                                 
       
 25998                             }
       
 25999                             
       
 26000                             ERROR;
       
 26001                         }
       
 26002                         
       
 26003                     }
       
 26004                     
       
 26005                     ERROR;
       
 26006                 }
       
 26007                 
       
 26008             }
       
 26009             
       
 26010             ERROR;
       
 26011         }
       
 26012         
       
 26013     }/*function_delete*/
       
 26014     break;
       
 26015 
       
 26016 /****
       
 26017  *REPLACE
       
 26018  */
       
 26019     case function_replace :
       
 26020     {
       
 26021         symbol_c *last_type_symbol = NULL;
       
 26022 
       
 26023         {
       
 26024             symbol_c *IN1_type_symbol = param_data_type;
       
 26025             last_type_symbol = param_data_type;
       
 26026             
       
 26027             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 26028             {
       
 26029         
       
 26030                 {
       
 26031                     identifier_c param_name("IN2");
       
 26032                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26033                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26034                     
       
 26035                     /* Get the value from a foo(<param_value>) style call */
       
 26036                     if (IN2_param_value == NULL)
       
 26037                       IN2_param_value = function_call_param_iterator.next();
       
 26038                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26039                     last_type_symbol = last_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 ;
       
 26040                     
       
 26041                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 26042                     {
       
 26043                 
       
 26044                         {
       
 26045                             identifier_c param_name("L");
       
 26046                             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26047                             symbol_c *L_param_value = function_call_param_iterator.search(&param_name);
       
 26048                             
       
 26049                             /* Get the value from a foo(<param_value>) style call */
       
 26050                             if (L_param_value == NULL)
       
 26051                               L_param_value = function_call_param_iterator.next();
       
 26052                             symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value);
       
 26053                             last_type_symbol = last_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 ;
       
 26054                             
       
 26055                             if(search_expression_type->is_integer_type(L_type_symbol))
       
 26056                             {
       
 26057                         
       
 26058                                 {
       
 26059                                     identifier_c param_name("P");
       
 26060                                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26061                                     symbol_c *P_param_value = function_call_param_iterator.search(&param_name);
       
 26062                                     
       
 26063                                     /* Get the value from a foo(<param_value>) style call */
       
 26064                                     if (P_param_value == NULL)
       
 26065                                       P_param_value = function_call_param_iterator.next();
       
 26066                                     symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value);
       
 26067                                     last_type_symbol = last_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 ;
       
 26068                                     
       
 26069                                     if(search_expression_type->is_integer_type(P_type_symbol))
       
 26070                                     {
       
 26071                                 
       
 26072                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 26073                                         return return_type_symbol;
       
 26074                                         
       
 26075                                     }
       
 26076                                     
       
 26077                                     ERROR;
       
 26078                                 }
       
 26079                                 
       
 26080                             }
       
 26081                             
       
 26082                             ERROR;
       
 26083                         }
       
 26084                         
       
 26085                     }
       
 26086                     
       
 26087                     ERROR;
       
 26088                 }
       
 26089                 
       
 26090             }
       
 26091             
       
 26092             ERROR;
       
 26093         }
       
 26094         
       
 26095     }/*function_replace*/
       
 26096     break;
       
 26097 
       
 26098 /****
       
 26099  *FIND
       
 26100  */
       
 26101     case function_find :
       
 26102     {
       
 26103         symbol_c *last_type_symbol = NULL;
       
 26104 
       
 26105         {
       
 26106             symbol_c *IN1_type_symbol = param_data_type;
       
 26107             last_type_symbol = param_data_type;
       
 26108             
       
 26109             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 26110             {
       
 26111         
       
 26112                 {
       
 26113                     identifier_c param_name("IN2");
       
 26114                     /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 26115                     symbol_c *IN2_param_value = function_call_param_iterator.search(&param_name);
       
 26116                     
       
 26117                     /* Get the value from a foo(<param_value>) style call */
       
 26118                     if (IN2_param_value == NULL)
       
 26119                       IN2_param_value = function_call_param_iterator.next();
       
 26120                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
       
 26121                     last_type_symbol = last_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 ;
       
 26122                     
       
 26123                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 26124                     {
       
 26125                 
       
 26126                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 26127                         return return_type_symbol;
       
 26128                         
       
 26129                     }
       
 26130                     
       
 26131                     ERROR;
       
 26132                 }
       
 26133                 
       
 26134             }
       
 26135             
       
 26136             ERROR;
       
 26137         }
       
 26138         
       
 26139     }/*function_find*/
       
 26140     break;
       
 26141 
       
 26142     case function_none :
       
 26143     ERROR;
       
 26144   }
       
 26145   return NULL;
       
 26146 }