stage4/generate_c/search_type_code.c
changeset 149 05ca171a3d57
parent 70 e1f0ebd2d9ec
child 153 6aed920024f9
equal deleted inserted replaced
148:912bdab1eca8 149:05ca171a3d57
     1 /*
     1 /*
     2  * (c) 2003 Mario de Sousa
     2  * (c) 2008 Edouard TISSERANT
     3  *
     3  *
     4  * Offered to the public under the terms of the GNU General Public License
     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
     5  * as published by the Free Software Foundation; either version 2 of the
     6  * License, or (at your option) any later version.
     6  * License, or (at your option) any later version.
     7  *
     7  *
    19  *
    19  *
    20  * Based on the
    20  * Based on the
    21  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
    21  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
    22  *
    22  *
    23  */
    23  */
       
    24 
       
    25 /****
       
    26  * IEC 61131-3 standard function library
       
    27  * generated code, do not edit by hand
       
    28  */
    24  
    29  
    25  
    30  
    26 /****
    31 
    27  * IEC 61131-3 standard function lib
    32 void *compute_standard_function_default(function_invocation_c *st_symbol = NULL, il_formal_funct_call_c *il_symbol = NULL) {
    28  * generated code, do not edit by hand
    33   function_type_t current_function_type;
    29  */
    34   function_call_param_iterator_c *tmp_function_call_param_iterator;
    30 
    35   if (st_symbol != NULL && il_symbol == NULL) {
    31 void *compute_standard_function_st(function_invocation_c *symbol) {
    36     current_function_type = get_function_type((identifier_c *)st_symbol->function_name);
    32 
    37     tmp_function_call_param_iterator = new function_call_param_iterator_c(st_symbol);
    33   function_type_t current_function_type = get_function_type((identifier_c *)symbol->function_name);
    38   }
    34   function_call_param_iterator_c function_call_param_iterator(symbol);
    39   else if (st_symbol == NULL && il_symbol != NULL) {
       
    40     current_function_type = get_function_type((identifier_c *)il_symbol->function_name);
       
    41     tmp_function_call_param_iterator = new function_call_param_iterator_c(il_symbol);
       
    42   }
       
    43   else
       
    44     ERROR;
       
    45   function_call_param_iterator_c function_call_param_iterator(*tmp_function_call_param_iterator);
    35   search_expression_type_c* search_expression_type = this;
    46   search_expression_type_c* search_expression_type = this;
    36 
    47 
    37   switch(current_function_type){
    48   switch(current_function_type){
    38 
    49 
    39 /****
    50 /****
       
    51  *REAL_TO_SINT
       
    52  */
       
    53     case function_real_to_sint :
       
    54     {
       
    55         symbol_c *last_type_symbol = NULL;
       
    56 
       
    57         {
       
    58             identifier_c param_name("IN");
       
    59             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    60             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    61             
       
    62             /* Get the value from a foo(<param_value>) style call */
       
    63             if (IN_param_value == NULL)
       
    64               IN_param_value = function_call_param_iterator.next();
       
    65             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    66             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
    67             
       
    68             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
    69             {
       
    70         
       
    71                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
    72                 return return_type_symbol;
       
    73                 
       
    74             }
       
    75             
       
    76             
       
    77             ERROR;
       
    78         }
       
    79         
       
    80     }/*function_real_to_sint*/
       
    81     break;
       
    82 
       
    83 /****
       
    84  *REAL_TO_LINT
       
    85  */
       
    86     case function_real_to_lint :
       
    87     {
       
    88         symbol_c *last_type_symbol = NULL;
       
    89 
       
    90         {
       
    91             identifier_c param_name("IN");
       
    92             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
    93             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
    94             
       
    95             /* Get the value from a foo(<param_value>) style call */
       
    96             if (IN_param_value == NULL)
       
    97               IN_param_value = function_call_param_iterator.next();
       
    98             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
    99             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   100             
       
   101             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   102             {
       
   103         
       
   104                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   105                 return return_type_symbol;
       
   106                 
       
   107             }
       
   108             
       
   109             
       
   110             ERROR;
       
   111         }
       
   112         
       
   113     }/*function_real_to_lint*/
       
   114     break;
       
   115 
       
   116 /****
       
   117  *REAL_TO_DINT
       
   118  */
       
   119     case function_real_to_dint :
       
   120     {
       
   121         symbol_c *last_type_symbol = NULL;
       
   122 
       
   123         {
       
   124             identifier_c param_name("IN");
       
   125             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   126             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   127             
       
   128             /* Get the value from a foo(<param_value>) style call */
       
   129             if (IN_param_value == NULL)
       
   130               IN_param_value = function_call_param_iterator.next();
       
   131             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   132             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   133             
       
   134             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   135             {
       
   136         
       
   137                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
   138                 return return_type_symbol;
       
   139                 
       
   140             }
       
   141             
       
   142             
       
   143             ERROR;
       
   144         }
       
   145         
       
   146     }/*function_real_to_dint*/
       
   147     break;
       
   148 
       
   149 /****
       
   150  *REAL_TO_DATE
       
   151  */
       
   152     case function_real_to_date :
       
   153     {
       
   154         symbol_c *last_type_symbol = NULL;
       
   155 
       
   156         {
       
   157             identifier_c param_name("IN");
       
   158             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   159             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   160             
       
   161             /* Get the value from a foo(<param_value>) style call */
       
   162             if (IN_param_value == NULL)
       
   163               IN_param_value = function_call_param_iterator.next();
       
   164             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   165             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   166             
       
   167             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   168             {
       
   169         
       
   170                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   171                 return return_type_symbol;
       
   172                 
       
   173             }
       
   174             
       
   175             
       
   176             ERROR;
       
   177         }
       
   178         
       
   179     }/*function_real_to_date*/
       
   180     break;
       
   181 
       
   182 /****
       
   183  *REAL_TO_DWORD
       
   184  */
       
   185     case function_real_to_dword :
       
   186     {
       
   187         symbol_c *last_type_symbol = NULL;
       
   188 
       
   189         {
       
   190             identifier_c param_name("IN");
       
   191             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   192             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   193             
       
   194             /* Get the value from a foo(<param_value>) style call */
       
   195             if (IN_param_value == NULL)
       
   196               IN_param_value = function_call_param_iterator.next();
       
   197             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   198             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   199             
       
   200             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   201             {
       
   202         
       
   203                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   204                 return return_type_symbol;
       
   205                 
       
   206             }
       
   207             
       
   208             
       
   209             ERROR;
       
   210         }
       
   211         
       
   212     }/*function_real_to_dword*/
       
   213     break;
       
   214 
       
   215 /****
       
   216  *REAL_TO_DT
       
   217  */
       
   218     case function_real_to_dt :
       
   219     {
       
   220         symbol_c *last_type_symbol = NULL;
       
   221 
       
   222         {
       
   223             identifier_c param_name("IN");
       
   224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   226             
       
   227             /* Get the value from a foo(<param_value>) style call */
       
   228             if (IN_param_value == NULL)
       
   229               IN_param_value = function_call_param_iterator.next();
       
   230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   232             
       
   233             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   234             {
       
   235         
       
   236                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   237                 return return_type_symbol;
       
   238                 
       
   239             }
       
   240             
       
   241             
       
   242             ERROR;
       
   243         }
       
   244         
       
   245     }/*function_real_to_dt*/
       
   246     break;
       
   247 
       
   248 /****
       
   249  *REAL_TO_TOD
       
   250  */
       
   251     case function_real_to_tod :
       
   252     {
       
   253         symbol_c *last_type_symbol = NULL;
       
   254 
       
   255         {
       
   256             identifier_c param_name("IN");
       
   257             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   258             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   259             
       
   260             /* Get the value from a foo(<param_value>) style call */
       
   261             if (IN_param_value == NULL)
       
   262               IN_param_value = function_call_param_iterator.next();
       
   263             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   264             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   265             
       
   266             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   267             {
       
   268         
       
   269                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   270                 return return_type_symbol;
       
   271                 
       
   272             }
       
   273             
       
   274             
       
   275             ERROR;
       
   276         }
       
   277         
       
   278     }/*function_real_to_tod*/
       
   279     break;
       
   280 
       
   281 /****
       
   282  *REAL_TO_UDINT
       
   283  */
       
   284     case function_real_to_udint :
       
   285     {
       
   286         symbol_c *last_type_symbol = NULL;
       
   287 
       
   288         {
       
   289             identifier_c param_name("IN");
       
   290             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   291             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   292             
       
   293             /* Get the value from a foo(<param_value>) style call */
       
   294             if (IN_param_value == NULL)
       
   295               IN_param_value = function_call_param_iterator.next();
       
   296             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   297             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   298             
       
   299             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   300             {
       
   301         
       
   302                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   303                 return return_type_symbol;
       
   304                 
       
   305             }
       
   306             
       
   307             
       
   308             ERROR;
       
   309         }
       
   310         
       
   311     }/*function_real_to_udint*/
       
   312     break;
       
   313 
       
   314 /****
       
   315  *REAL_TO_WORD
       
   316  */
       
   317     case function_real_to_word :
       
   318     {
       
   319         symbol_c *last_type_symbol = NULL;
       
   320 
       
   321         {
       
   322             identifier_c param_name("IN");
       
   323             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   324             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   325             
       
   326             /* Get the value from a foo(<param_value>) style call */
       
   327             if (IN_param_value == NULL)
       
   328               IN_param_value = function_call_param_iterator.next();
       
   329             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   330             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   331             
       
   332             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   333             {
       
   334         
       
   335                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   336                 return return_type_symbol;
       
   337                 
       
   338             }
       
   339             
       
   340             
       
   341             ERROR;
       
   342         }
       
   343         
       
   344     }/*function_real_to_word*/
       
   345     break;
       
   346 
       
   347 /****
       
   348  *REAL_TO_STRING
       
   349  */
       
   350     case function_real_to_string :
       
   351     {
       
   352         symbol_c *last_type_symbol = NULL;
       
   353 
       
   354         {
       
   355             identifier_c param_name("IN");
       
   356             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   357             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   358             
       
   359             /* Get the value from a foo(<param_value>) style call */
       
   360             if (IN_param_value == NULL)
       
   361               IN_param_value = function_call_param_iterator.next();
       
   362             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   363             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   364             
       
   365             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   366             {
       
   367         
       
   368                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   369                 return return_type_symbol;
       
   370                 
       
   371             }
       
   372             
       
   373             
       
   374             ERROR;
       
   375         }
       
   376         
       
   377     }/*function_real_to_string*/
       
   378     break;
       
   379 
       
   380 /****
       
   381  *REAL_TO_LWORD
       
   382  */
       
   383     case function_real_to_lword :
       
   384     {
       
   385         symbol_c *last_type_symbol = NULL;
       
   386 
       
   387         {
       
   388             identifier_c param_name("IN");
       
   389             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   390             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   391             
       
   392             /* Get the value from a foo(<param_value>) style call */
       
   393             if (IN_param_value == NULL)
       
   394               IN_param_value = function_call_param_iterator.next();
       
   395             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   396             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   397             
       
   398             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   399             {
       
   400         
       
   401                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
   402                 return return_type_symbol;
       
   403                 
       
   404             }
       
   405             
       
   406             
       
   407             ERROR;
       
   408         }
       
   409         
       
   410     }/*function_real_to_lword*/
       
   411     break;
       
   412 
       
   413 /****
       
   414  *REAL_TO_UINT
       
   415  */
       
   416     case function_real_to_uint :
       
   417     {
       
   418         symbol_c *last_type_symbol = NULL;
       
   419 
       
   420         {
       
   421             identifier_c param_name("IN");
       
   422             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   423             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   424             
       
   425             /* Get the value from a foo(<param_value>) style call */
       
   426             if (IN_param_value == NULL)
       
   427               IN_param_value = function_call_param_iterator.next();
       
   428             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   429             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   430             
       
   431             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   432             {
       
   433         
       
   434                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
   435                 return return_type_symbol;
       
   436                 
       
   437             }
       
   438             
       
   439             
       
   440             ERROR;
       
   441         }
       
   442         
       
   443     }/*function_real_to_uint*/
       
   444     break;
       
   445 
       
   446 /****
       
   447  *REAL_TO_LREAL
       
   448  */
       
   449     case function_real_to_lreal :
       
   450     {
       
   451         symbol_c *last_type_symbol = NULL;
       
   452 
       
   453         {
       
   454             identifier_c param_name("IN");
       
   455             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   456             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   457             
       
   458             /* Get the value from a foo(<param_value>) style call */
       
   459             if (IN_param_value == NULL)
       
   460               IN_param_value = function_call_param_iterator.next();
       
   461             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   462             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   463             
       
   464             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   465             {
       
   466         
       
   467                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
   468                 return return_type_symbol;
       
   469                 
       
   470             }
       
   471             
       
   472             
       
   473             ERROR;
       
   474         }
       
   475         
       
   476     }/*function_real_to_lreal*/
       
   477     break;
       
   478 
       
   479 /****
       
   480  *REAL_TO_BYTE
       
   481  */
       
   482     case function_real_to_byte :
       
   483     {
       
   484         symbol_c *last_type_symbol = NULL;
       
   485 
       
   486         {
       
   487             identifier_c param_name("IN");
       
   488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   490             
       
   491             /* Get the value from a foo(<param_value>) style call */
       
   492             if (IN_param_value == NULL)
       
   493               IN_param_value = function_call_param_iterator.next();
       
   494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   496             
       
   497             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   498             {
       
   499         
       
   500                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
   501                 return return_type_symbol;
       
   502                 
       
   503             }
       
   504             
       
   505             
       
   506             ERROR;
       
   507         }
       
   508         
       
   509     }/*function_real_to_byte*/
       
   510     break;
       
   511 
       
   512 /****
       
   513  *REAL_TO_USINT
       
   514  */
       
   515     case function_real_to_usint :
       
   516     {
       
   517         symbol_c *last_type_symbol = NULL;
       
   518 
       
   519         {
       
   520             identifier_c param_name("IN");
       
   521             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   522             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   523             
       
   524             /* Get the value from a foo(<param_value>) style call */
       
   525             if (IN_param_value == NULL)
       
   526               IN_param_value = function_call_param_iterator.next();
       
   527             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   528             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   529             
       
   530             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   531             {
       
   532         
       
   533                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
   534                 return return_type_symbol;
       
   535                 
       
   536             }
       
   537             
       
   538             
       
   539             ERROR;
       
   540         }
       
   541         
       
   542     }/*function_real_to_usint*/
       
   543     break;
       
   544 
       
   545 /****
       
   546  *REAL_TO_ULINT
       
   547  */
       
   548     case function_real_to_ulint :
       
   549     {
       
   550         symbol_c *last_type_symbol = NULL;
       
   551 
       
   552         {
       
   553             identifier_c param_name("IN");
       
   554             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   555             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   556             
       
   557             /* Get the value from a foo(<param_value>) style call */
       
   558             if (IN_param_value == NULL)
       
   559               IN_param_value = function_call_param_iterator.next();
       
   560             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   561             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   562             
       
   563             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   564             {
       
   565         
       
   566                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
   567                 return return_type_symbol;
       
   568                 
       
   569             }
       
   570             
       
   571             
       
   572             ERROR;
       
   573         }
       
   574         
       
   575     }/*function_real_to_ulint*/
       
   576     break;
       
   577 
       
   578 /****
       
   579  *REAL_TO_BOOL
       
   580  */
       
   581     case function_real_to_bool :
       
   582     {
       
   583         symbol_c *last_type_symbol = NULL;
       
   584 
       
   585         {
       
   586             identifier_c param_name("IN");
       
   587             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   588             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   589             
       
   590             /* Get the value from a foo(<param_value>) style call */
       
   591             if (IN_param_value == NULL)
       
   592               IN_param_value = function_call_param_iterator.next();
       
   593             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   594             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   595             
       
   596             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   597             {
       
   598         
       
   599                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
   600                 return return_type_symbol;
       
   601                 
       
   602             }
       
   603             
       
   604             
       
   605             ERROR;
       
   606         }
       
   607         
       
   608     }/*function_real_to_bool*/
       
   609     break;
       
   610 
       
   611 /****
       
   612  *REAL_TO_TIME
       
   613  */
       
   614     case function_real_to_time :
       
   615     {
       
   616         symbol_c *last_type_symbol = NULL;
       
   617 
       
   618         {
       
   619             identifier_c param_name("IN");
       
   620             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   621             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   622             
       
   623             /* Get the value from a foo(<param_value>) style call */
       
   624             if (IN_param_value == NULL)
       
   625               IN_param_value = function_call_param_iterator.next();
       
   626             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   627             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   628             
       
   629             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   630             {
       
   631         
       
   632                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
   633                 return return_type_symbol;
       
   634                 
       
   635             }
       
   636             
       
   637             
       
   638             ERROR;
       
   639         }
       
   640         
       
   641     }/*function_real_to_time*/
       
   642     break;
       
   643 
       
   644 /****
       
   645  *REAL_TO_INT
       
   646  */
       
   647     case function_real_to_int :
       
   648     {
       
   649         symbol_c *last_type_symbol = NULL;
       
   650 
       
   651         {
       
   652             identifier_c param_name("IN");
       
   653             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   654             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   655             
       
   656             /* Get the value from a foo(<param_value>) style call */
       
   657             if (IN_param_value == NULL)
       
   658               IN_param_value = function_call_param_iterator.next();
       
   659             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   660             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   661             
       
   662             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
   663             {
       
   664         
       
   665                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
   666                 return return_type_symbol;
       
   667                 
       
   668             }
       
   669             
       
   670             
       
   671             ERROR;
       
   672         }
       
   673         
       
   674     }/*function_real_to_int*/
       
   675     break;
       
   676 
       
   677 /****
       
   678  *SINT_TO_REAL
       
   679  */
       
   680     case function_sint_to_real :
       
   681     {
       
   682         symbol_c *last_type_symbol = NULL;
       
   683 
       
   684         {
       
   685             identifier_c param_name("IN");
       
   686             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   687             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   688             
       
   689             /* Get the value from a foo(<param_value>) style call */
       
   690             if (IN_param_value == NULL)
       
   691               IN_param_value = function_call_param_iterator.next();
       
   692             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   693             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   694             
       
   695             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   696             {
       
   697         
       
   698                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
   699                 return return_type_symbol;
       
   700                 
       
   701             }
       
   702             
       
   703             
       
   704             ERROR;
       
   705         }
       
   706         
       
   707     }/*function_sint_to_real*/
       
   708     break;
       
   709 
       
   710 /****
       
   711  *SINT_TO_LINT
       
   712  */
       
   713     case function_sint_to_lint :
       
   714     {
       
   715         symbol_c *last_type_symbol = NULL;
       
   716 
       
   717         {
       
   718             identifier_c param_name("IN");
       
   719             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   720             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   721             
       
   722             /* Get the value from a foo(<param_value>) style call */
       
   723             if (IN_param_value == NULL)
       
   724               IN_param_value = function_call_param_iterator.next();
       
   725             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   726             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   727             
       
   728             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   729             {
       
   730         
       
   731                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
   732                 return return_type_symbol;
       
   733                 
       
   734             }
       
   735             
       
   736             
       
   737             ERROR;
       
   738         }
       
   739         
       
   740     }/*function_sint_to_lint*/
       
   741     break;
       
   742 
       
   743 /****
       
   744  *SINT_TO_DINT
       
   745  */
       
   746     case function_sint_to_dint :
       
   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::dint_type_name;
       
   765                 return return_type_symbol;
       
   766                 
       
   767             }
       
   768             
       
   769             
       
   770             ERROR;
       
   771         }
       
   772         
       
   773     }/*function_sint_to_dint*/
       
   774     break;
       
   775 
       
   776 /****
       
   777  *SINT_TO_DATE
       
   778  */
       
   779     case function_sint_to_date :
       
   780     {
       
   781         symbol_c *last_type_symbol = NULL;
       
   782 
       
   783         {
       
   784             identifier_c param_name("IN");
       
   785             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   786             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   787             
       
   788             /* Get the value from a foo(<param_value>) style call */
       
   789             if (IN_param_value == NULL)
       
   790               IN_param_value = function_call_param_iterator.next();
       
   791             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   792             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   793             
       
   794             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   795             {
       
   796         
       
   797                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
   798                 return return_type_symbol;
       
   799                 
       
   800             }
       
   801             
       
   802             
       
   803             ERROR;
       
   804         }
       
   805         
       
   806     }/*function_sint_to_date*/
       
   807     break;
       
   808 
       
   809 /****
       
   810  *SINT_TO_DWORD
       
   811  */
       
   812     case function_sint_to_dword :
       
   813     {
       
   814         symbol_c *last_type_symbol = NULL;
       
   815 
       
   816         {
       
   817             identifier_c param_name("IN");
       
   818             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   819             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   820             
       
   821             /* Get the value from a foo(<param_value>) style call */
       
   822             if (IN_param_value == NULL)
       
   823               IN_param_value = function_call_param_iterator.next();
       
   824             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   825             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   826             
       
   827             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   828             {
       
   829         
       
   830                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
   831                 return return_type_symbol;
       
   832                 
       
   833             }
       
   834             
       
   835             
       
   836             ERROR;
       
   837         }
       
   838         
       
   839     }/*function_sint_to_dword*/
       
   840     break;
       
   841 
       
   842 /****
       
   843  *SINT_TO_DT
       
   844  */
       
   845     case function_sint_to_dt :
       
   846     {
       
   847         symbol_c *last_type_symbol = NULL;
       
   848 
       
   849         {
       
   850             identifier_c param_name("IN");
       
   851             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   852             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   853             
       
   854             /* Get the value from a foo(<param_value>) style call */
       
   855             if (IN_param_value == NULL)
       
   856               IN_param_value = function_call_param_iterator.next();
       
   857             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   858             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   859             
       
   860             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   861             {
       
   862         
       
   863                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
   864                 return return_type_symbol;
       
   865                 
       
   866             }
       
   867             
       
   868             
       
   869             ERROR;
       
   870         }
       
   871         
       
   872     }/*function_sint_to_dt*/
       
   873     break;
       
   874 
       
   875 /****
       
   876  *SINT_TO_TOD
       
   877  */
       
   878     case function_sint_to_tod :
       
   879     {
       
   880         symbol_c *last_type_symbol = NULL;
       
   881 
       
   882         {
       
   883             identifier_c param_name("IN");
       
   884             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   885             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   886             
       
   887             /* Get the value from a foo(<param_value>) style call */
       
   888             if (IN_param_value == NULL)
       
   889               IN_param_value = function_call_param_iterator.next();
       
   890             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   891             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   892             
       
   893             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   894             {
       
   895         
       
   896                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
   897                 return return_type_symbol;
       
   898                 
       
   899             }
       
   900             
       
   901             
       
   902             ERROR;
       
   903         }
       
   904         
       
   905     }/*function_sint_to_tod*/
       
   906     break;
       
   907 
       
   908 /****
       
   909  *SINT_TO_UDINT
       
   910  */
       
   911     case function_sint_to_udint :
       
   912     {
       
   913         symbol_c *last_type_symbol = NULL;
       
   914 
       
   915         {
       
   916             identifier_c param_name("IN");
       
   917             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   918             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   919             
       
   920             /* Get the value from a foo(<param_value>) style call */
       
   921             if (IN_param_value == NULL)
       
   922               IN_param_value = function_call_param_iterator.next();
       
   923             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   924             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   925             
       
   926             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   927             {
       
   928         
       
   929                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
   930                 return return_type_symbol;
       
   931                 
       
   932             }
       
   933             
       
   934             
       
   935             ERROR;
       
   936         }
       
   937         
       
   938     }/*function_sint_to_udint*/
       
   939     break;
       
   940 
       
   941 /****
       
   942  *SINT_TO_WORD
       
   943  */
       
   944     case function_sint_to_word :
       
   945     {
       
   946         symbol_c *last_type_symbol = NULL;
       
   947 
       
   948         {
       
   949             identifier_c param_name("IN");
       
   950             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   951             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   952             
       
   953             /* Get the value from a foo(<param_value>) style call */
       
   954             if (IN_param_value == NULL)
       
   955               IN_param_value = function_call_param_iterator.next();
       
   956             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   957             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   958             
       
   959             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   960             {
       
   961         
       
   962                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
   963                 return return_type_symbol;
       
   964                 
       
   965             }
       
   966             
       
   967             
       
   968             ERROR;
       
   969         }
       
   970         
       
   971     }/*function_sint_to_word*/
       
   972     break;
       
   973 
       
   974 /****
       
   975  *SINT_TO_STRING
       
   976  */
       
   977     case function_sint_to_string :
       
   978     {
       
   979         symbol_c *last_type_symbol = NULL;
       
   980 
       
   981         {
       
   982             identifier_c param_name("IN");
       
   983             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
   984             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
   985             
       
   986             /* Get the value from a foo(<param_value>) style call */
       
   987             if (IN_param_value == NULL)
       
   988               IN_param_value = function_call_param_iterator.next();
       
   989             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
   990             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
   991             
       
   992             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
   993             {
       
   994         
       
   995                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
   996                 return return_type_symbol;
       
   997                 
       
   998             }
       
   999             
       
  1000             
       
  1001             ERROR;
       
  1002         }
       
  1003         
       
  1004     }/*function_sint_to_string*/
       
  1005     break;
       
  1006 
       
  1007 /****
       
  1008  *SINT_TO_LWORD
       
  1009  */
       
  1010     case function_sint_to_lword :
       
  1011     {
       
  1012         symbol_c *last_type_symbol = NULL;
       
  1013 
       
  1014         {
       
  1015             identifier_c param_name("IN");
       
  1016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1018             
       
  1019             /* Get the value from a foo(<param_value>) style call */
       
  1020             if (IN_param_value == NULL)
       
  1021               IN_param_value = function_call_param_iterator.next();
       
  1022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1024             
       
  1025             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1026             {
       
  1027         
       
  1028                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1029                 return return_type_symbol;
       
  1030                 
       
  1031             }
       
  1032             
       
  1033             
       
  1034             ERROR;
       
  1035         }
       
  1036         
       
  1037     }/*function_sint_to_lword*/
       
  1038     break;
       
  1039 
       
  1040 /****
       
  1041  *SINT_TO_UINT
       
  1042  */
       
  1043     case function_sint_to_uint :
       
  1044     {
       
  1045         symbol_c *last_type_symbol = NULL;
       
  1046 
       
  1047         {
       
  1048             identifier_c param_name("IN");
       
  1049             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1050             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1051             
       
  1052             /* Get the value from a foo(<param_value>) style call */
       
  1053             if (IN_param_value == NULL)
       
  1054               IN_param_value = function_call_param_iterator.next();
       
  1055             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1056             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1057             
       
  1058             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1059             {
       
  1060         
       
  1061                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1062                 return return_type_symbol;
       
  1063                 
       
  1064             }
       
  1065             
       
  1066             
       
  1067             ERROR;
       
  1068         }
       
  1069         
       
  1070     }/*function_sint_to_uint*/
       
  1071     break;
       
  1072 
       
  1073 /****
       
  1074  *SINT_TO_LREAL
       
  1075  */
       
  1076     case function_sint_to_lreal :
       
  1077     {
       
  1078         symbol_c *last_type_symbol = NULL;
       
  1079 
       
  1080         {
       
  1081             identifier_c param_name("IN");
       
  1082             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1083             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1084             
       
  1085             /* Get the value from a foo(<param_value>) style call */
       
  1086             if (IN_param_value == NULL)
       
  1087               IN_param_value = function_call_param_iterator.next();
       
  1088             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1089             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1090             
       
  1091             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1092             {
       
  1093         
       
  1094                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1095                 return return_type_symbol;
       
  1096                 
       
  1097             }
       
  1098             
       
  1099             
       
  1100             ERROR;
       
  1101         }
       
  1102         
       
  1103     }/*function_sint_to_lreal*/
       
  1104     break;
       
  1105 
       
  1106 /****
       
  1107  *SINT_TO_BYTE
       
  1108  */
       
  1109     case function_sint_to_byte :
       
  1110     {
       
  1111         symbol_c *last_type_symbol = NULL;
       
  1112 
       
  1113         {
       
  1114             identifier_c param_name("IN");
       
  1115             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1116             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1117             
       
  1118             /* Get the value from a foo(<param_value>) style call */
       
  1119             if (IN_param_value == NULL)
       
  1120               IN_param_value = function_call_param_iterator.next();
       
  1121             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1122             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1123             
       
  1124             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1125             {
       
  1126         
       
  1127                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1128                 return return_type_symbol;
       
  1129                 
       
  1130             }
       
  1131             
       
  1132             
       
  1133             ERROR;
       
  1134         }
       
  1135         
       
  1136     }/*function_sint_to_byte*/
       
  1137     break;
       
  1138 
       
  1139 /****
       
  1140  *SINT_TO_USINT
       
  1141  */
       
  1142     case function_sint_to_usint :
       
  1143     {
       
  1144         symbol_c *last_type_symbol = NULL;
       
  1145 
       
  1146         {
       
  1147             identifier_c param_name("IN");
       
  1148             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1149             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1150             
       
  1151             /* Get the value from a foo(<param_value>) style call */
       
  1152             if (IN_param_value == NULL)
       
  1153               IN_param_value = function_call_param_iterator.next();
       
  1154             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1155             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1156             
       
  1157             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1158             {
       
  1159         
       
  1160                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1161                 return return_type_symbol;
       
  1162                 
       
  1163             }
       
  1164             
       
  1165             
       
  1166             ERROR;
       
  1167         }
       
  1168         
       
  1169     }/*function_sint_to_usint*/
       
  1170     break;
       
  1171 
       
  1172 /****
       
  1173  *SINT_TO_ULINT
       
  1174  */
       
  1175     case function_sint_to_ulint :
       
  1176     {
       
  1177         symbol_c *last_type_symbol = NULL;
       
  1178 
       
  1179         {
       
  1180             identifier_c param_name("IN");
       
  1181             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1182             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1183             
       
  1184             /* Get the value from a foo(<param_value>) style call */
       
  1185             if (IN_param_value == NULL)
       
  1186               IN_param_value = function_call_param_iterator.next();
       
  1187             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1188             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1189             
       
  1190             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1191             {
       
  1192         
       
  1193                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1194                 return return_type_symbol;
       
  1195                 
       
  1196             }
       
  1197             
       
  1198             
       
  1199             ERROR;
       
  1200         }
       
  1201         
       
  1202     }/*function_sint_to_ulint*/
       
  1203     break;
       
  1204 
       
  1205 /****
       
  1206  *SINT_TO_BOOL
       
  1207  */
       
  1208     case function_sint_to_bool :
       
  1209     {
       
  1210         symbol_c *last_type_symbol = NULL;
       
  1211 
       
  1212         {
       
  1213             identifier_c param_name("IN");
       
  1214             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1215             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1216             
       
  1217             /* Get the value from a foo(<param_value>) style call */
       
  1218             if (IN_param_value == NULL)
       
  1219               IN_param_value = function_call_param_iterator.next();
       
  1220             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1221             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1222             
       
  1223             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1224             {
       
  1225         
       
  1226                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1227                 return return_type_symbol;
       
  1228                 
       
  1229             }
       
  1230             
       
  1231             
       
  1232             ERROR;
       
  1233         }
       
  1234         
       
  1235     }/*function_sint_to_bool*/
       
  1236     break;
       
  1237 
       
  1238 /****
       
  1239  *SINT_TO_TIME
       
  1240  */
       
  1241     case function_sint_to_time :
       
  1242     {
       
  1243         symbol_c *last_type_symbol = NULL;
       
  1244 
       
  1245         {
       
  1246             identifier_c param_name("IN");
       
  1247             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1248             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1249             
       
  1250             /* Get the value from a foo(<param_value>) style call */
       
  1251             if (IN_param_value == NULL)
       
  1252               IN_param_value = function_call_param_iterator.next();
       
  1253             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1254             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1255             
       
  1256             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1257             {
       
  1258         
       
  1259                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1260                 return return_type_symbol;
       
  1261                 
       
  1262             }
       
  1263             
       
  1264             
       
  1265             ERROR;
       
  1266         }
       
  1267         
       
  1268     }/*function_sint_to_time*/
       
  1269     break;
       
  1270 
       
  1271 /****
       
  1272  *SINT_TO_INT
       
  1273  */
       
  1274     case function_sint_to_int :
       
  1275     {
       
  1276         symbol_c *last_type_symbol = NULL;
       
  1277 
       
  1278         {
       
  1279             identifier_c param_name("IN");
       
  1280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1282             
       
  1283             /* Get the value from a foo(<param_value>) style call */
       
  1284             if (IN_param_value == NULL)
       
  1285               IN_param_value = function_call_param_iterator.next();
       
  1286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1288             
       
  1289             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
  1290             {
       
  1291         
       
  1292                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1293                 return return_type_symbol;
       
  1294                 
       
  1295             }
       
  1296             
       
  1297             
       
  1298             ERROR;
       
  1299         }
       
  1300         
       
  1301     }/*function_sint_to_int*/
       
  1302     break;
       
  1303 
       
  1304 /****
       
  1305  *LINT_TO_REAL
       
  1306  */
       
  1307     case function_lint_to_real :
       
  1308     {
       
  1309         symbol_c *last_type_symbol = NULL;
       
  1310 
       
  1311         {
       
  1312             identifier_c param_name("IN");
       
  1313             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1314             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1315             
       
  1316             /* Get the value from a foo(<param_value>) style call */
       
  1317             if (IN_param_value == NULL)
       
  1318               IN_param_value = function_call_param_iterator.next();
       
  1319             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1320             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1321             
       
  1322             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1323             {
       
  1324         
       
  1325                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1326                 return return_type_symbol;
       
  1327                 
       
  1328             }
       
  1329             
       
  1330             
       
  1331             ERROR;
       
  1332         }
       
  1333         
       
  1334     }/*function_lint_to_real*/
       
  1335     break;
       
  1336 
       
  1337 /****
       
  1338  *LINT_TO_SINT
       
  1339  */
       
  1340     case function_lint_to_sint :
       
  1341     {
       
  1342         symbol_c *last_type_symbol = NULL;
       
  1343 
       
  1344         {
       
  1345             identifier_c param_name("IN");
       
  1346             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1347             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1348             
       
  1349             /* Get the value from a foo(<param_value>) style call */
       
  1350             if (IN_param_value == NULL)
       
  1351               IN_param_value = function_call_param_iterator.next();
       
  1352             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1353             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1354             
       
  1355             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1356             {
       
  1357         
       
  1358                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  1359                 return return_type_symbol;
       
  1360                 
       
  1361             }
       
  1362             
       
  1363             
       
  1364             ERROR;
       
  1365         }
       
  1366         
       
  1367     }/*function_lint_to_sint*/
       
  1368     break;
       
  1369 
       
  1370 /****
       
  1371  *LINT_TO_DINT
       
  1372  */
       
  1373     case function_lint_to_dint :
       
  1374     {
       
  1375         symbol_c *last_type_symbol = NULL;
       
  1376 
       
  1377         {
       
  1378             identifier_c param_name("IN");
       
  1379             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1380             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1381             
       
  1382             /* Get the value from a foo(<param_value>) style call */
       
  1383             if (IN_param_value == NULL)
       
  1384               IN_param_value = function_call_param_iterator.next();
       
  1385             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1386             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1387             
       
  1388             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1389             {
       
  1390         
       
  1391                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  1392                 return return_type_symbol;
       
  1393                 
       
  1394             }
       
  1395             
       
  1396             
       
  1397             ERROR;
       
  1398         }
       
  1399         
       
  1400     }/*function_lint_to_dint*/
       
  1401     break;
       
  1402 
       
  1403 /****
       
  1404  *LINT_TO_DATE
       
  1405  */
       
  1406     case function_lint_to_date :
       
  1407     {
       
  1408         symbol_c *last_type_symbol = NULL;
       
  1409 
       
  1410         {
       
  1411             identifier_c param_name("IN");
       
  1412             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1413             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1414             
       
  1415             /* Get the value from a foo(<param_value>) style call */
       
  1416             if (IN_param_value == NULL)
       
  1417               IN_param_value = function_call_param_iterator.next();
       
  1418             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1419             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1420             
       
  1421             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1422             {
       
  1423         
       
  1424                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  1425                 return return_type_symbol;
       
  1426                 
       
  1427             }
       
  1428             
       
  1429             
       
  1430             ERROR;
       
  1431         }
       
  1432         
       
  1433     }/*function_lint_to_date*/
       
  1434     break;
       
  1435 
       
  1436 /****
       
  1437  *LINT_TO_DWORD
       
  1438  */
       
  1439     case function_lint_to_dword :
       
  1440     {
       
  1441         symbol_c *last_type_symbol = NULL;
       
  1442 
       
  1443         {
       
  1444             identifier_c param_name("IN");
       
  1445             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1446             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1447             
       
  1448             /* Get the value from a foo(<param_value>) style call */
       
  1449             if (IN_param_value == NULL)
       
  1450               IN_param_value = function_call_param_iterator.next();
       
  1451             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1452             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1453             
       
  1454             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1455             {
       
  1456         
       
  1457                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  1458                 return return_type_symbol;
       
  1459                 
       
  1460             }
       
  1461             
       
  1462             
       
  1463             ERROR;
       
  1464         }
       
  1465         
       
  1466     }/*function_lint_to_dword*/
       
  1467     break;
       
  1468 
       
  1469 /****
       
  1470  *LINT_TO_DT
       
  1471  */
       
  1472     case function_lint_to_dt :
       
  1473     {
       
  1474         symbol_c *last_type_symbol = NULL;
       
  1475 
       
  1476         {
       
  1477             identifier_c param_name("IN");
       
  1478             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1479             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1480             
       
  1481             /* Get the value from a foo(<param_value>) style call */
       
  1482             if (IN_param_value == NULL)
       
  1483               IN_param_value = function_call_param_iterator.next();
       
  1484             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1485             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1486             
       
  1487             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1488             {
       
  1489         
       
  1490                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  1491                 return return_type_symbol;
       
  1492                 
       
  1493             }
       
  1494             
       
  1495             
       
  1496             ERROR;
       
  1497         }
       
  1498         
       
  1499     }/*function_lint_to_dt*/
       
  1500     break;
       
  1501 
       
  1502 /****
       
  1503  *LINT_TO_TOD
       
  1504  */
       
  1505     case function_lint_to_tod :
       
  1506     {
       
  1507         symbol_c *last_type_symbol = NULL;
       
  1508 
       
  1509         {
       
  1510             identifier_c param_name("IN");
       
  1511             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1512             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1513             
       
  1514             /* Get the value from a foo(<param_value>) style call */
       
  1515             if (IN_param_value == NULL)
       
  1516               IN_param_value = function_call_param_iterator.next();
       
  1517             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1518             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1519             
       
  1520             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1521             {
       
  1522         
       
  1523                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  1524                 return return_type_symbol;
       
  1525                 
       
  1526             }
       
  1527             
       
  1528             
       
  1529             ERROR;
       
  1530         }
       
  1531         
       
  1532     }/*function_lint_to_tod*/
       
  1533     break;
       
  1534 
       
  1535 /****
       
  1536  *LINT_TO_UDINT
       
  1537  */
       
  1538     case function_lint_to_udint :
       
  1539     {
       
  1540         symbol_c *last_type_symbol = NULL;
       
  1541 
       
  1542         {
       
  1543             identifier_c param_name("IN");
       
  1544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1546             
       
  1547             /* Get the value from a foo(<param_value>) style call */
       
  1548             if (IN_param_value == NULL)
       
  1549               IN_param_value = function_call_param_iterator.next();
       
  1550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1552             
       
  1553             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1554             {
       
  1555         
       
  1556                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  1557                 return return_type_symbol;
       
  1558                 
       
  1559             }
       
  1560             
       
  1561             
       
  1562             ERROR;
       
  1563         }
       
  1564         
       
  1565     }/*function_lint_to_udint*/
       
  1566     break;
       
  1567 
       
  1568 /****
       
  1569  *LINT_TO_WORD
       
  1570  */
       
  1571     case function_lint_to_word :
       
  1572     {
       
  1573         symbol_c *last_type_symbol = NULL;
       
  1574 
       
  1575         {
       
  1576             identifier_c param_name("IN");
       
  1577             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1578             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1579             
       
  1580             /* Get the value from a foo(<param_value>) style call */
       
  1581             if (IN_param_value == NULL)
       
  1582               IN_param_value = function_call_param_iterator.next();
       
  1583             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1584             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1585             
       
  1586             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1587             {
       
  1588         
       
  1589                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  1590                 return return_type_symbol;
       
  1591                 
       
  1592             }
       
  1593             
       
  1594             
       
  1595             ERROR;
       
  1596         }
       
  1597         
       
  1598     }/*function_lint_to_word*/
       
  1599     break;
       
  1600 
       
  1601 /****
       
  1602  *LINT_TO_STRING
       
  1603  */
       
  1604     case function_lint_to_string :
       
  1605     {
       
  1606         symbol_c *last_type_symbol = NULL;
       
  1607 
       
  1608         {
       
  1609             identifier_c param_name("IN");
       
  1610             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1611             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1612             
       
  1613             /* Get the value from a foo(<param_value>) style call */
       
  1614             if (IN_param_value == NULL)
       
  1615               IN_param_value = function_call_param_iterator.next();
       
  1616             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1617             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1618             
       
  1619             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1620             {
       
  1621         
       
  1622                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  1623                 return return_type_symbol;
       
  1624                 
       
  1625             }
       
  1626             
       
  1627             
       
  1628             ERROR;
       
  1629         }
       
  1630         
       
  1631     }/*function_lint_to_string*/
       
  1632     break;
       
  1633 
       
  1634 /****
       
  1635  *LINT_TO_LWORD
       
  1636  */
       
  1637     case function_lint_to_lword :
       
  1638     {
       
  1639         symbol_c *last_type_symbol = NULL;
       
  1640 
       
  1641         {
       
  1642             identifier_c param_name("IN");
       
  1643             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1644             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1645             
       
  1646             /* Get the value from a foo(<param_value>) style call */
       
  1647             if (IN_param_value == NULL)
       
  1648               IN_param_value = function_call_param_iterator.next();
       
  1649             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1650             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1651             
       
  1652             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1653             {
       
  1654         
       
  1655                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  1656                 return return_type_symbol;
       
  1657                 
       
  1658             }
       
  1659             
       
  1660             
       
  1661             ERROR;
       
  1662         }
       
  1663         
       
  1664     }/*function_lint_to_lword*/
       
  1665     break;
       
  1666 
       
  1667 /****
       
  1668  *LINT_TO_UINT
       
  1669  */
       
  1670     case function_lint_to_uint :
       
  1671     {
       
  1672         symbol_c *last_type_symbol = NULL;
       
  1673 
       
  1674         {
       
  1675             identifier_c param_name("IN");
       
  1676             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1677             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1678             
       
  1679             /* Get the value from a foo(<param_value>) style call */
       
  1680             if (IN_param_value == NULL)
       
  1681               IN_param_value = function_call_param_iterator.next();
       
  1682             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1683             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1684             
       
  1685             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1686             {
       
  1687         
       
  1688                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  1689                 return return_type_symbol;
       
  1690                 
       
  1691             }
       
  1692             
       
  1693             
       
  1694             ERROR;
       
  1695         }
       
  1696         
       
  1697     }/*function_lint_to_uint*/
       
  1698     break;
       
  1699 
       
  1700 /****
       
  1701  *LINT_TO_LREAL
       
  1702  */
       
  1703     case function_lint_to_lreal :
       
  1704     {
       
  1705         symbol_c *last_type_symbol = NULL;
       
  1706 
       
  1707         {
       
  1708             identifier_c param_name("IN");
       
  1709             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1710             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1711             
       
  1712             /* Get the value from a foo(<param_value>) style call */
       
  1713             if (IN_param_value == NULL)
       
  1714               IN_param_value = function_call_param_iterator.next();
       
  1715             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1716             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1717             
       
  1718             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1719             {
       
  1720         
       
  1721                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  1722                 return return_type_symbol;
       
  1723                 
       
  1724             }
       
  1725             
       
  1726             
       
  1727             ERROR;
       
  1728         }
       
  1729         
       
  1730     }/*function_lint_to_lreal*/
       
  1731     break;
       
  1732 
       
  1733 /****
       
  1734  *LINT_TO_BYTE
       
  1735  */
       
  1736     case function_lint_to_byte :
       
  1737     {
       
  1738         symbol_c *last_type_symbol = NULL;
       
  1739 
       
  1740         {
       
  1741             identifier_c param_name("IN");
       
  1742             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1743             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1744             
       
  1745             /* Get the value from a foo(<param_value>) style call */
       
  1746             if (IN_param_value == NULL)
       
  1747               IN_param_value = function_call_param_iterator.next();
       
  1748             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1749             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1750             
       
  1751             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1752             {
       
  1753         
       
  1754                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  1755                 return return_type_symbol;
       
  1756                 
       
  1757             }
       
  1758             
       
  1759             
       
  1760             ERROR;
       
  1761         }
       
  1762         
       
  1763     }/*function_lint_to_byte*/
       
  1764     break;
       
  1765 
       
  1766 /****
       
  1767  *LINT_TO_USINT
       
  1768  */
       
  1769     case function_lint_to_usint :
       
  1770     {
       
  1771         symbol_c *last_type_symbol = NULL;
       
  1772 
       
  1773         {
       
  1774             identifier_c param_name("IN");
       
  1775             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1776             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1777             
       
  1778             /* Get the value from a foo(<param_value>) style call */
       
  1779             if (IN_param_value == NULL)
       
  1780               IN_param_value = function_call_param_iterator.next();
       
  1781             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1782             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1783             
       
  1784             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1785             {
       
  1786         
       
  1787                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  1788                 return return_type_symbol;
       
  1789                 
       
  1790             }
       
  1791             
       
  1792             
       
  1793             ERROR;
       
  1794         }
       
  1795         
       
  1796     }/*function_lint_to_usint*/
       
  1797     break;
       
  1798 
       
  1799 /****
       
  1800  *LINT_TO_ULINT
       
  1801  */
       
  1802     case function_lint_to_ulint :
       
  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::lint_type_name, last_type_symbol))
       
  1818             {
       
  1819         
       
  1820                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  1821                 return return_type_symbol;
       
  1822                 
       
  1823             }
       
  1824             
       
  1825             
       
  1826             ERROR;
       
  1827         }
       
  1828         
       
  1829     }/*function_lint_to_ulint*/
       
  1830     break;
       
  1831 
       
  1832 /****
       
  1833  *LINT_TO_BOOL
       
  1834  */
       
  1835     case function_lint_to_bool :
       
  1836     {
       
  1837         symbol_c *last_type_symbol = NULL;
       
  1838 
       
  1839         {
       
  1840             identifier_c param_name("IN");
       
  1841             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1842             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1843             
       
  1844             /* Get the value from a foo(<param_value>) style call */
       
  1845             if (IN_param_value == NULL)
       
  1846               IN_param_value = function_call_param_iterator.next();
       
  1847             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1848             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1849             
       
  1850             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1851             {
       
  1852         
       
  1853                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  1854                 return return_type_symbol;
       
  1855                 
       
  1856             }
       
  1857             
       
  1858             
       
  1859             ERROR;
       
  1860         }
       
  1861         
       
  1862     }/*function_lint_to_bool*/
       
  1863     break;
       
  1864 
       
  1865 /****
       
  1866  *LINT_TO_TIME
       
  1867  */
       
  1868     case function_lint_to_time :
       
  1869     {
       
  1870         symbol_c *last_type_symbol = NULL;
       
  1871 
       
  1872         {
       
  1873             identifier_c param_name("IN");
       
  1874             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1875             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1876             
       
  1877             /* Get the value from a foo(<param_value>) style call */
       
  1878             if (IN_param_value == NULL)
       
  1879               IN_param_value = function_call_param_iterator.next();
       
  1880             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1881             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1882             
       
  1883             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1884             {
       
  1885         
       
  1886                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  1887                 return return_type_symbol;
       
  1888                 
       
  1889             }
       
  1890             
       
  1891             
       
  1892             ERROR;
       
  1893         }
       
  1894         
       
  1895     }/*function_lint_to_time*/
       
  1896     break;
       
  1897 
       
  1898 /****
       
  1899  *LINT_TO_INT
       
  1900  */
       
  1901     case function_lint_to_int :
       
  1902     {
       
  1903         symbol_c *last_type_symbol = NULL;
       
  1904 
       
  1905         {
       
  1906             identifier_c param_name("IN");
       
  1907             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1908             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1909             
       
  1910             /* Get the value from a foo(<param_value>) style call */
       
  1911             if (IN_param_value == NULL)
       
  1912               IN_param_value = function_call_param_iterator.next();
       
  1913             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1914             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1915             
       
  1916             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
  1917             {
       
  1918         
       
  1919                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  1920                 return return_type_symbol;
       
  1921                 
       
  1922             }
       
  1923             
       
  1924             
       
  1925             ERROR;
       
  1926         }
       
  1927         
       
  1928     }/*function_lint_to_int*/
       
  1929     break;
       
  1930 
       
  1931 /****
       
  1932  *DINT_TO_REAL
       
  1933  */
       
  1934     case function_dint_to_real :
       
  1935     {
       
  1936         symbol_c *last_type_symbol = NULL;
       
  1937 
       
  1938         {
       
  1939             identifier_c param_name("IN");
       
  1940             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1941             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1942             
       
  1943             /* Get the value from a foo(<param_value>) style call */
       
  1944             if (IN_param_value == NULL)
       
  1945               IN_param_value = function_call_param_iterator.next();
       
  1946             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1947             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1948             
       
  1949             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  1950             {
       
  1951         
       
  1952                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  1953                 return return_type_symbol;
       
  1954                 
       
  1955             }
       
  1956             
       
  1957             
       
  1958             ERROR;
       
  1959         }
       
  1960         
       
  1961     }/*function_dint_to_real*/
       
  1962     break;
       
  1963 
       
  1964 /****
       
  1965  *DINT_TO_SINT
       
  1966  */
       
  1967     case function_dint_to_sint :
       
  1968     {
       
  1969         symbol_c *last_type_symbol = NULL;
       
  1970 
       
  1971         {
       
  1972             identifier_c param_name("IN");
       
  1973             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  1974             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  1975             
       
  1976             /* Get the value from a foo(<param_value>) style call */
       
  1977             if (IN_param_value == NULL)
       
  1978               IN_param_value = function_call_param_iterator.next();
       
  1979             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  1980             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  1981             
       
  1982             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  1983             {
       
  1984         
       
  1985                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  1986                 return return_type_symbol;
       
  1987                 
       
  1988             }
       
  1989             
       
  1990             
       
  1991             ERROR;
       
  1992         }
       
  1993         
       
  1994     }/*function_dint_to_sint*/
       
  1995     break;
       
  1996 
       
  1997 /****
       
  1998  *DINT_TO_LINT
       
  1999  */
       
  2000     case function_dint_to_lint :
       
  2001     {
       
  2002         symbol_c *last_type_symbol = NULL;
       
  2003 
       
  2004         {
       
  2005             identifier_c param_name("IN");
       
  2006             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2007             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2008             
       
  2009             /* Get the value from a foo(<param_value>) style call */
       
  2010             if (IN_param_value == NULL)
       
  2011               IN_param_value = function_call_param_iterator.next();
       
  2012             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2013             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2014             
       
  2015             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2016             {
       
  2017         
       
  2018                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2019                 return return_type_symbol;
       
  2020                 
       
  2021             }
       
  2022             
       
  2023             
       
  2024             ERROR;
       
  2025         }
       
  2026         
       
  2027     }/*function_dint_to_lint*/
       
  2028     break;
       
  2029 
       
  2030 /****
       
  2031  *DINT_TO_DATE
       
  2032  */
       
  2033     case function_dint_to_date :
       
  2034     {
       
  2035         symbol_c *last_type_symbol = NULL;
       
  2036 
       
  2037         {
       
  2038             identifier_c param_name("IN");
       
  2039             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2040             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2041             
       
  2042             /* Get the value from a foo(<param_value>) style call */
       
  2043             if (IN_param_value == NULL)
       
  2044               IN_param_value = function_call_param_iterator.next();
       
  2045             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2046             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2047             
       
  2048             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2049             {
       
  2050         
       
  2051                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  2052                 return return_type_symbol;
       
  2053                 
       
  2054             }
       
  2055             
       
  2056             
       
  2057             ERROR;
       
  2058         }
       
  2059         
       
  2060     }/*function_dint_to_date*/
       
  2061     break;
       
  2062 
       
  2063 /****
       
  2064  *DINT_TO_DWORD
       
  2065  */
       
  2066     case function_dint_to_dword :
       
  2067     {
       
  2068         symbol_c *last_type_symbol = NULL;
       
  2069 
       
  2070         {
       
  2071             identifier_c param_name("IN");
       
  2072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2074             
       
  2075             /* Get the value from a foo(<param_value>) style call */
       
  2076             if (IN_param_value == NULL)
       
  2077               IN_param_value = function_call_param_iterator.next();
       
  2078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2080             
       
  2081             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2082             {
       
  2083         
       
  2084                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2085                 return return_type_symbol;
       
  2086                 
       
  2087             }
       
  2088             
       
  2089             
       
  2090             ERROR;
       
  2091         }
       
  2092         
       
  2093     }/*function_dint_to_dword*/
       
  2094     break;
       
  2095 
       
  2096 /****
       
  2097  *DINT_TO_DT
       
  2098  */
       
  2099     case function_dint_to_dt :
       
  2100     {
       
  2101         symbol_c *last_type_symbol = NULL;
       
  2102 
       
  2103         {
       
  2104             identifier_c param_name("IN");
       
  2105             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2106             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2107             
       
  2108             /* Get the value from a foo(<param_value>) style call */
       
  2109             if (IN_param_value == NULL)
       
  2110               IN_param_value = function_call_param_iterator.next();
       
  2111             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2112             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2113             
       
  2114             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2115             {
       
  2116         
       
  2117                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  2118                 return return_type_symbol;
       
  2119                 
       
  2120             }
       
  2121             
       
  2122             
       
  2123             ERROR;
       
  2124         }
       
  2125         
       
  2126     }/*function_dint_to_dt*/
       
  2127     break;
       
  2128 
       
  2129 /****
       
  2130  *DINT_TO_TOD
       
  2131  */
       
  2132     case function_dint_to_tod :
       
  2133     {
       
  2134         symbol_c *last_type_symbol = NULL;
       
  2135 
       
  2136         {
       
  2137             identifier_c param_name("IN");
       
  2138             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2139             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2140             
       
  2141             /* Get the value from a foo(<param_value>) style call */
       
  2142             if (IN_param_value == NULL)
       
  2143               IN_param_value = function_call_param_iterator.next();
       
  2144             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2145             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2146             
       
  2147             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2148             {
       
  2149         
       
  2150                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  2151                 return return_type_symbol;
       
  2152                 
       
  2153             }
       
  2154             
       
  2155             
       
  2156             ERROR;
       
  2157         }
       
  2158         
       
  2159     }/*function_dint_to_tod*/
       
  2160     break;
       
  2161 
       
  2162 /****
       
  2163  *DINT_TO_UDINT
       
  2164  */
       
  2165     case function_dint_to_udint :
       
  2166     {
       
  2167         symbol_c *last_type_symbol = NULL;
       
  2168 
       
  2169         {
       
  2170             identifier_c param_name("IN");
       
  2171             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2172             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2173             
       
  2174             /* Get the value from a foo(<param_value>) style call */
       
  2175             if (IN_param_value == NULL)
       
  2176               IN_param_value = function_call_param_iterator.next();
       
  2177             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2178             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2179             
       
  2180             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2181             {
       
  2182         
       
  2183                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2184                 return return_type_symbol;
       
  2185                 
       
  2186             }
       
  2187             
       
  2188             
       
  2189             ERROR;
       
  2190         }
       
  2191         
       
  2192     }/*function_dint_to_udint*/
       
  2193     break;
       
  2194 
       
  2195 /****
       
  2196  *DINT_TO_WORD
       
  2197  */
       
  2198     case function_dint_to_word :
       
  2199     {
       
  2200         symbol_c *last_type_symbol = NULL;
       
  2201 
       
  2202         {
       
  2203             identifier_c param_name("IN");
       
  2204             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2205             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2206             
       
  2207             /* Get the value from a foo(<param_value>) style call */
       
  2208             if (IN_param_value == NULL)
       
  2209               IN_param_value = function_call_param_iterator.next();
       
  2210             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2211             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2212             
       
  2213             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2214             {
       
  2215         
       
  2216                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2217                 return return_type_symbol;
       
  2218                 
       
  2219             }
       
  2220             
       
  2221             
       
  2222             ERROR;
       
  2223         }
       
  2224         
       
  2225     }/*function_dint_to_word*/
       
  2226     break;
       
  2227 
       
  2228 /****
       
  2229  *DINT_TO_STRING
       
  2230  */
       
  2231     case function_dint_to_string :
       
  2232     {
       
  2233         symbol_c *last_type_symbol = NULL;
       
  2234 
       
  2235         {
       
  2236             identifier_c param_name("IN");
       
  2237             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2238             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2239             
       
  2240             /* Get the value from a foo(<param_value>) style call */
       
  2241             if (IN_param_value == NULL)
       
  2242               IN_param_value = function_call_param_iterator.next();
       
  2243             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2244             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2245             
       
  2246             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2247             {
       
  2248         
       
  2249                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2250                 return return_type_symbol;
       
  2251                 
       
  2252             }
       
  2253             
       
  2254             
       
  2255             ERROR;
       
  2256         }
       
  2257         
       
  2258     }/*function_dint_to_string*/
       
  2259     break;
       
  2260 
       
  2261 /****
       
  2262  *DINT_TO_LWORD
       
  2263  */
       
  2264     case function_dint_to_lword :
       
  2265     {
       
  2266         symbol_c *last_type_symbol = NULL;
       
  2267 
       
  2268         {
       
  2269             identifier_c param_name("IN");
       
  2270             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2271             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2272             
       
  2273             /* Get the value from a foo(<param_value>) style call */
       
  2274             if (IN_param_value == NULL)
       
  2275               IN_param_value = function_call_param_iterator.next();
       
  2276             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2277             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2278             
       
  2279             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2280             {
       
  2281         
       
  2282                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2283                 return return_type_symbol;
       
  2284                 
       
  2285             }
       
  2286             
       
  2287             
       
  2288             ERROR;
       
  2289         }
       
  2290         
       
  2291     }/*function_dint_to_lword*/
       
  2292     break;
       
  2293 
       
  2294 /****
       
  2295  *DINT_TO_UINT
       
  2296  */
       
  2297     case function_dint_to_uint :
       
  2298     {
       
  2299         symbol_c *last_type_symbol = NULL;
       
  2300 
       
  2301         {
       
  2302             identifier_c param_name("IN");
       
  2303             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2304             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2305             
       
  2306             /* Get the value from a foo(<param_value>) style call */
       
  2307             if (IN_param_value == NULL)
       
  2308               IN_param_value = function_call_param_iterator.next();
       
  2309             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2310             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2311             
       
  2312             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2313             {
       
  2314         
       
  2315                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2316                 return return_type_symbol;
       
  2317                 
       
  2318             }
       
  2319             
       
  2320             
       
  2321             ERROR;
       
  2322         }
       
  2323         
       
  2324     }/*function_dint_to_uint*/
       
  2325     break;
       
  2326 
       
  2327 /****
       
  2328  *DINT_TO_LREAL
       
  2329  */
       
  2330     case function_dint_to_lreal :
       
  2331     {
       
  2332         symbol_c *last_type_symbol = NULL;
       
  2333 
       
  2334         {
       
  2335             identifier_c param_name("IN");
       
  2336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2338             
       
  2339             /* Get the value from a foo(<param_value>) style call */
       
  2340             if (IN_param_value == NULL)
       
  2341               IN_param_value = function_call_param_iterator.next();
       
  2342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2344             
       
  2345             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2346             {
       
  2347         
       
  2348                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2349                 return return_type_symbol;
       
  2350                 
       
  2351             }
       
  2352             
       
  2353             
       
  2354             ERROR;
       
  2355         }
       
  2356         
       
  2357     }/*function_dint_to_lreal*/
       
  2358     break;
       
  2359 
       
  2360 /****
       
  2361  *DINT_TO_BYTE
       
  2362  */
       
  2363     case function_dint_to_byte :
       
  2364     {
       
  2365         symbol_c *last_type_symbol = NULL;
       
  2366 
       
  2367         {
       
  2368             identifier_c param_name("IN");
       
  2369             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2370             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2371             
       
  2372             /* Get the value from a foo(<param_value>) style call */
       
  2373             if (IN_param_value == NULL)
       
  2374               IN_param_value = function_call_param_iterator.next();
       
  2375             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2376             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2377             
       
  2378             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2379             {
       
  2380         
       
  2381                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2382                 return return_type_symbol;
       
  2383                 
       
  2384             }
       
  2385             
       
  2386             
       
  2387             ERROR;
       
  2388         }
       
  2389         
       
  2390     }/*function_dint_to_byte*/
       
  2391     break;
       
  2392 
       
  2393 /****
       
  2394  *DINT_TO_USINT
       
  2395  */
       
  2396     case function_dint_to_usint :
       
  2397     {
       
  2398         symbol_c *last_type_symbol = NULL;
       
  2399 
       
  2400         {
       
  2401             identifier_c param_name("IN");
       
  2402             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2403             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2404             
       
  2405             /* Get the value from a foo(<param_value>) style call */
       
  2406             if (IN_param_value == NULL)
       
  2407               IN_param_value = function_call_param_iterator.next();
       
  2408             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2409             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2410             
       
  2411             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2412             {
       
  2413         
       
  2414                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2415                 return return_type_symbol;
       
  2416                 
       
  2417             }
       
  2418             
       
  2419             
       
  2420             ERROR;
       
  2421         }
       
  2422         
       
  2423     }/*function_dint_to_usint*/
       
  2424     break;
       
  2425 
       
  2426 /****
       
  2427  *DINT_TO_ULINT
       
  2428  */
       
  2429     case function_dint_to_ulint :
       
  2430     {
       
  2431         symbol_c *last_type_symbol = NULL;
       
  2432 
       
  2433         {
       
  2434             identifier_c param_name("IN");
       
  2435             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2436             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2437             
       
  2438             /* Get the value from a foo(<param_value>) style call */
       
  2439             if (IN_param_value == NULL)
       
  2440               IN_param_value = function_call_param_iterator.next();
       
  2441             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2442             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2443             
       
  2444             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2445             {
       
  2446         
       
  2447                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  2448                 return return_type_symbol;
       
  2449                 
       
  2450             }
       
  2451             
       
  2452             
       
  2453             ERROR;
       
  2454         }
       
  2455         
       
  2456     }/*function_dint_to_ulint*/
       
  2457     break;
       
  2458 
       
  2459 /****
       
  2460  *DINT_TO_BOOL
       
  2461  */
       
  2462     case function_dint_to_bool :
       
  2463     {
       
  2464         symbol_c *last_type_symbol = NULL;
       
  2465 
       
  2466         {
       
  2467             identifier_c param_name("IN");
       
  2468             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2469             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2470             
       
  2471             /* Get the value from a foo(<param_value>) style call */
       
  2472             if (IN_param_value == NULL)
       
  2473               IN_param_value = function_call_param_iterator.next();
       
  2474             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2475             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2476             
       
  2477             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2478             {
       
  2479         
       
  2480                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  2481                 return return_type_symbol;
       
  2482                 
       
  2483             }
       
  2484             
       
  2485             
       
  2486             ERROR;
       
  2487         }
       
  2488         
       
  2489     }/*function_dint_to_bool*/
       
  2490     break;
       
  2491 
       
  2492 /****
       
  2493  *DINT_TO_TIME
       
  2494  */
       
  2495     case function_dint_to_time :
       
  2496     {
       
  2497         symbol_c *last_type_symbol = NULL;
       
  2498 
       
  2499         {
       
  2500             identifier_c param_name("IN");
       
  2501             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2502             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2503             
       
  2504             /* Get the value from a foo(<param_value>) style call */
       
  2505             if (IN_param_value == NULL)
       
  2506               IN_param_value = function_call_param_iterator.next();
       
  2507             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2508             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2509             
       
  2510             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2511             {
       
  2512         
       
  2513                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  2514                 return return_type_symbol;
       
  2515                 
       
  2516             }
       
  2517             
       
  2518             
       
  2519             ERROR;
       
  2520         }
       
  2521         
       
  2522     }/*function_dint_to_time*/
       
  2523     break;
       
  2524 
       
  2525 /****
       
  2526  *DINT_TO_INT
       
  2527  */
       
  2528     case function_dint_to_int :
       
  2529     {
       
  2530         symbol_c *last_type_symbol = NULL;
       
  2531 
       
  2532         {
       
  2533             identifier_c param_name("IN");
       
  2534             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2535             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2536             
       
  2537             /* Get the value from a foo(<param_value>) style call */
       
  2538             if (IN_param_value == NULL)
       
  2539               IN_param_value = function_call_param_iterator.next();
       
  2540             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2541             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2542             
       
  2543             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
  2544             {
       
  2545         
       
  2546                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  2547                 return return_type_symbol;
       
  2548                 
       
  2549             }
       
  2550             
       
  2551             
       
  2552             ERROR;
       
  2553         }
       
  2554         
       
  2555     }/*function_dint_to_int*/
       
  2556     break;
       
  2557 
       
  2558 /****
       
  2559  *DATE_TO_REAL
       
  2560  */
       
  2561     case function_date_to_real :
       
  2562     {
       
  2563         symbol_c *last_type_symbol = NULL;
       
  2564 
       
  2565         {
       
  2566             identifier_c param_name("IN");
       
  2567             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2568             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2569             
       
  2570             /* Get the value from a foo(<param_value>) style call */
       
  2571             if (IN_param_value == NULL)
       
  2572               IN_param_value = function_call_param_iterator.next();
       
  2573             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2574             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2575             
       
  2576             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2577             {
       
  2578         
       
  2579                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  2580                 return return_type_symbol;
       
  2581                 
       
  2582             }
       
  2583             
       
  2584             
       
  2585             ERROR;
       
  2586         }
       
  2587         
       
  2588     }/*function_date_to_real*/
       
  2589     break;
       
  2590 
       
  2591 /****
       
  2592  *DATE_TO_SINT
       
  2593  */
       
  2594     case function_date_to_sint :
       
  2595     {
       
  2596         symbol_c *last_type_symbol = NULL;
       
  2597 
       
  2598         {
       
  2599             identifier_c param_name("IN");
       
  2600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2602             
       
  2603             /* Get the value from a foo(<param_value>) style call */
       
  2604             if (IN_param_value == NULL)
       
  2605               IN_param_value = function_call_param_iterator.next();
       
  2606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2608             
       
  2609             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2610             {
       
  2611         
       
  2612                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  2613                 return return_type_symbol;
       
  2614                 
       
  2615             }
       
  2616             
       
  2617             
       
  2618             ERROR;
       
  2619         }
       
  2620         
       
  2621     }/*function_date_to_sint*/
       
  2622     break;
       
  2623 
       
  2624 /****
       
  2625  *DATE_TO_LINT
       
  2626  */
       
  2627     case function_date_to_lint :
       
  2628     {
       
  2629         symbol_c *last_type_symbol = NULL;
       
  2630 
       
  2631         {
       
  2632             identifier_c param_name("IN");
       
  2633             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2634             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2635             
       
  2636             /* Get the value from a foo(<param_value>) style call */
       
  2637             if (IN_param_value == NULL)
       
  2638               IN_param_value = function_call_param_iterator.next();
       
  2639             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2640             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2641             
       
  2642             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2643             {
       
  2644         
       
  2645                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  2646                 return return_type_symbol;
       
  2647                 
       
  2648             }
       
  2649             
       
  2650             
       
  2651             ERROR;
       
  2652         }
       
  2653         
       
  2654     }/*function_date_to_lint*/
       
  2655     break;
       
  2656 
       
  2657 /****
       
  2658  *DATE_TO_DINT
       
  2659  */
       
  2660     case function_date_to_dint :
       
  2661     {
       
  2662         symbol_c *last_type_symbol = NULL;
       
  2663 
       
  2664         {
       
  2665             identifier_c param_name("IN");
       
  2666             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2667             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2668             
       
  2669             /* Get the value from a foo(<param_value>) style call */
       
  2670             if (IN_param_value == NULL)
       
  2671               IN_param_value = function_call_param_iterator.next();
       
  2672             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2673             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2674             
       
  2675             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2676             {
       
  2677         
       
  2678                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  2679                 return return_type_symbol;
       
  2680                 
       
  2681             }
       
  2682             
       
  2683             
       
  2684             ERROR;
       
  2685         }
       
  2686         
       
  2687     }/*function_date_to_dint*/
       
  2688     break;
       
  2689 
       
  2690 /****
       
  2691  *DATE_TO_DWORD
       
  2692  */
       
  2693     case function_date_to_dword :
       
  2694     {
       
  2695         symbol_c *last_type_symbol = NULL;
       
  2696 
       
  2697         {
       
  2698             identifier_c param_name("IN");
       
  2699             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2700             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2701             
       
  2702             /* Get the value from a foo(<param_value>) style call */
       
  2703             if (IN_param_value == NULL)
       
  2704               IN_param_value = function_call_param_iterator.next();
       
  2705             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2706             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2707             
       
  2708             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2709             {
       
  2710         
       
  2711                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  2712                 return return_type_symbol;
       
  2713                 
       
  2714             }
       
  2715             
       
  2716             
       
  2717             ERROR;
       
  2718         }
       
  2719         
       
  2720     }/*function_date_to_dword*/
       
  2721     break;
       
  2722 
       
  2723 /****
       
  2724  *DATE_TO_UDINT
       
  2725  */
       
  2726     case function_date_to_udint :
       
  2727     {
       
  2728         symbol_c *last_type_symbol = NULL;
       
  2729 
       
  2730         {
       
  2731             identifier_c param_name("IN");
       
  2732             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2733             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2734             
       
  2735             /* Get the value from a foo(<param_value>) style call */
       
  2736             if (IN_param_value == NULL)
       
  2737               IN_param_value = function_call_param_iterator.next();
       
  2738             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2739             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2740             
       
  2741             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2742             {
       
  2743         
       
  2744                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  2745                 return return_type_symbol;
       
  2746                 
       
  2747             }
       
  2748             
       
  2749             
       
  2750             ERROR;
       
  2751         }
       
  2752         
       
  2753     }/*function_date_to_udint*/
       
  2754     break;
       
  2755 
       
  2756 /****
       
  2757  *DATE_TO_WORD
       
  2758  */
       
  2759     case function_date_to_word :
       
  2760     {
       
  2761         symbol_c *last_type_symbol = NULL;
       
  2762 
       
  2763         {
       
  2764             identifier_c param_name("IN");
       
  2765             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2766             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2767             
       
  2768             /* Get the value from a foo(<param_value>) style call */
       
  2769             if (IN_param_value == NULL)
       
  2770               IN_param_value = function_call_param_iterator.next();
       
  2771             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2772             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2773             
       
  2774             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2775             {
       
  2776         
       
  2777                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  2778                 return return_type_symbol;
       
  2779                 
       
  2780             }
       
  2781             
       
  2782             
       
  2783             ERROR;
       
  2784         }
       
  2785         
       
  2786     }/*function_date_to_word*/
       
  2787     break;
       
  2788 
       
  2789 /****
       
  2790  *DATE_TO_STRING
       
  2791  */
       
  2792     case function_date_to_string :
       
  2793     {
       
  2794         symbol_c *last_type_symbol = NULL;
       
  2795 
       
  2796         {
       
  2797             identifier_c param_name("IN");
       
  2798             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2799             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2800             
       
  2801             /* Get the value from a foo(<param_value>) style call */
       
  2802             if (IN_param_value == NULL)
       
  2803               IN_param_value = function_call_param_iterator.next();
       
  2804             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2805             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2806             
       
  2807             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2808             {
       
  2809         
       
  2810                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  2811                 return return_type_symbol;
       
  2812                 
       
  2813             }
       
  2814             
       
  2815             
       
  2816             ERROR;
       
  2817         }
       
  2818         
       
  2819     }/*function_date_to_string*/
       
  2820     break;
       
  2821 
       
  2822 /****
       
  2823  *DATE_TO_LWORD
       
  2824  */
       
  2825     case function_date_to_lword :
       
  2826     {
       
  2827         symbol_c *last_type_symbol = NULL;
       
  2828 
       
  2829         {
       
  2830             identifier_c param_name("IN");
       
  2831             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2832             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2833             
       
  2834             /* Get the value from a foo(<param_value>) style call */
       
  2835             if (IN_param_value == NULL)
       
  2836               IN_param_value = function_call_param_iterator.next();
       
  2837             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2838             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2839             
       
  2840             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2841             {
       
  2842         
       
  2843                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  2844                 return return_type_symbol;
       
  2845                 
       
  2846             }
       
  2847             
       
  2848             
       
  2849             ERROR;
       
  2850         }
       
  2851         
       
  2852     }/*function_date_to_lword*/
       
  2853     break;
       
  2854 
       
  2855 /****
       
  2856  *DATE_TO_UINT
       
  2857  */
       
  2858     case function_date_to_uint :
       
  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::date_type_name, last_type_symbol))
       
  2874             {
       
  2875         
       
  2876                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  2877                 return return_type_symbol;
       
  2878                 
       
  2879             }
       
  2880             
       
  2881             
       
  2882             ERROR;
       
  2883         }
       
  2884         
       
  2885     }/*function_date_to_uint*/
       
  2886     break;
       
  2887 
       
  2888 /****
       
  2889  *DATE_TO_LREAL
       
  2890  */
       
  2891     case function_date_to_lreal :
       
  2892     {
       
  2893         symbol_c *last_type_symbol = NULL;
       
  2894 
       
  2895         {
       
  2896             identifier_c param_name("IN");
       
  2897             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2898             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2899             
       
  2900             /* Get the value from a foo(<param_value>) style call */
       
  2901             if (IN_param_value == NULL)
       
  2902               IN_param_value = function_call_param_iterator.next();
       
  2903             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2904             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2905             
       
  2906             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2907             {
       
  2908         
       
  2909                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  2910                 return return_type_symbol;
       
  2911                 
       
  2912             }
       
  2913             
       
  2914             
       
  2915             ERROR;
       
  2916         }
       
  2917         
       
  2918     }/*function_date_to_lreal*/
       
  2919     break;
       
  2920 
       
  2921 /****
       
  2922  *DATE_TO_BYTE
       
  2923  */
       
  2924     case function_date_to_byte :
       
  2925     {
       
  2926         symbol_c *last_type_symbol = NULL;
       
  2927 
       
  2928         {
       
  2929             identifier_c param_name("IN");
       
  2930             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2931             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2932             
       
  2933             /* Get the value from a foo(<param_value>) style call */
       
  2934             if (IN_param_value == NULL)
       
  2935               IN_param_value = function_call_param_iterator.next();
       
  2936             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2937             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2938             
       
  2939             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2940             {
       
  2941         
       
  2942                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  2943                 return return_type_symbol;
       
  2944                 
       
  2945             }
       
  2946             
       
  2947             
       
  2948             ERROR;
       
  2949         }
       
  2950         
       
  2951     }/*function_date_to_byte*/
       
  2952     break;
       
  2953 
       
  2954 /****
       
  2955  *DATE_TO_USINT
       
  2956  */
       
  2957     case function_date_to_usint :
       
  2958     {
       
  2959         symbol_c *last_type_symbol = NULL;
       
  2960 
       
  2961         {
       
  2962             identifier_c param_name("IN");
       
  2963             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2964             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2965             
       
  2966             /* Get the value from a foo(<param_value>) style call */
       
  2967             if (IN_param_value == NULL)
       
  2968               IN_param_value = function_call_param_iterator.next();
       
  2969             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  2970             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  2971             
       
  2972             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  2973             {
       
  2974         
       
  2975                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  2976                 return return_type_symbol;
       
  2977                 
       
  2978             }
       
  2979             
       
  2980             
       
  2981             ERROR;
       
  2982         }
       
  2983         
       
  2984     }/*function_date_to_usint*/
       
  2985     break;
       
  2986 
       
  2987 /****
       
  2988  *DATE_TO_ULINT
       
  2989  */
       
  2990     case function_date_to_ulint :
       
  2991     {
       
  2992         symbol_c *last_type_symbol = NULL;
       
  2993 
       
  2994         {
       
  2995             identifier_c param_name("IN");
       
  2996             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  2997             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  2998             
       
  2999             /* Get the value from a foo(<param_value>) style call */
       
  3000             if (IN_param_value == NULL)
       
  3001               IN_param_value = function_call_param_iterator.next();
       
  3002             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3003             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3004             
       
  3005             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3006             {
       
  3007         
       
  3008                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3009                 return return_type_symbol;
       
  3010                 
       
  3011             }
       
  3012             
       
  3013             
       
  3014             ERROR;
       
  3015         }
       
  3016         
       
  3017     }/*function_date_to_ulint*/
       
  3018     break;
       
  3019 
       
  3020 /****
       
  3021  *DATE_TO_INT
       
  3022  */
       
  3023     case function_date_to_int :
       
  3024     {
       
  3025         symbol_c *last_type_symbol = NULL;
       
  3026 
       
  3027         {
       
  3028             identifier_c param_name("IN");
       
  3029             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3030             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3031             
       
  3032             /* Get the value from a foo(<param_value>) style call */
       
  3033             if (IN_param_value == NULL)
       
  3034               IN_param_value = function_call_param_iterator.next();
       
  3035             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3036             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3037             
       
  3038             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  3039             {
       
  3040         
       
  3041                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3042                 return return_type_symbol;
       
  3043                 
       
  3044             }
       
  3045             
       
  3046             
       
  3047             ERROR;
       
  3048         }
       
  3049         
       
  3050     }/*function_date_to_int*/
       
  3051     break;
       
  3052 
       
  3053 /****
       
  3054  *DWORD_TO_REAL
       
  3055  */
       
  3056     case function_dword_to_real :
       
  3057     {
       
  3058         symbol_c *last_type_symbol = NULL;
       
  3059 
       
  3060         {
       
  3061             identifier_c param_name("IN");
       
  3062             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3063             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3064             
       
  3065             /* Get the value from a foo(<param_value>) style call */
       
  3066             if (IN_param_value == NULL)
       
  3067               IN_param_value = function_call_param_iterator.next();
       
  3068             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3069             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3070             
       
  3071             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3072             {
       
  3073         
       
  3074                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3075                 return return_type_symbol;
       
  3076                 
       
  3077             }
       
  3078             
       
  3079             
       
  3080             ERROR;
       
  3081         }
       
  3082         
       
  3083     }/*function_dword_to_real*/
       
  3084     break;
       
  3085 
       
  3086 /****
       
  3087  *DWORD_TO_SINT
       
  3088  */
       
  3089     case function_dword_to_sint :
       
  3090     {
       
  3091         symbol_c *last_type_symbol = NULL;
       
  3092 
       
  3093         {
       
  3094             identifier_c param_name("IN");
       
  3095             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3096             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3097             
       
  3098             /* Get the value from a foo(<param_value>) style call */
       
  3099             if (IN_param_value == NULL)
       
  3100               IN_param_value = function_call_param_iterator.next();
       
  3101             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3102             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3103             
       
  3104             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3105             {
       
  3106         
       
  3107                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3108                 return return_type_symbol;
       
  3109                 
       
  3110             }
       
  3111             
       
  3112             
       
  3113             ERROR;
       
  3114         }
       
  3115         
       
  3116     }/*function_dword_to_sint*/
       
  3117     break;
       
  3118 
       
  3119 /****
       
  3120  *DWORD_TO_LINT
       
  3121  */
       
  3122     case function_dword_to_lint :
       
  3123     {
       
  3124         symbol_c *last_type_symbol = NULL;
       
  3125 
       
  3126         {
       
  3127             identifier_c param_name("IN");
       
  3128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3130             
       
  3131             /* Get the value from a foo(<param_value>) style call */
       
  3132             if (IN_param_value == NULL)
       
  3133               IN_param_value = function_call_param_iterator.next();
       
  3134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3136             
       
  3137             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3138             {
       
  3139         
       
  3140                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3141                 return return_type_symbol;
       
  3142                 
       
  3143             }
       
  3144             
       
  3145             
       
  3146             ERROR;
       
  3147         }
       
  3148         
       
  3149     }/*function_dword_to_lint*/
       
  3150     break;
       
  3151 
       
  3152 /****
       
  3153  *DWORD_TO_DINT
       
  3154  */
       
  3155     case function_dword_to_dint :
       
  3156     {
       
  3157         symbol_c *last_type_symbol = NULL;
       
  3158 
       
  3159         {
       
  3160             identifier_c param_name("IN");
       
  3161             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3162             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3163             
       
  3164             /* Get the value from a foo(<param_value>) style call */
       
  3165             if (IN_param_value == NULL)
       
  3166               IN_param_value = function_call_param_iterator.next();
       
  3167             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3168             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3169             
       
  3170             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3171             {
       
  3172         
       
  3173                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3174                 return return_type_symbol;
       
  3175                 
       
  3176             }
       
  3177             
       
  3178             
       
  3179             ERROR;
       
  3180         }
       
  3181         
       
  3182     }/*function_dword_to_dint*/
       
  3183     break;
       
  3184 
       
  3185 /****
       
  3186  *DWORD_TO_DATE
       
  3187  */
       
  3188     case function_dword_to_date :
       
  3189     {
       
  3190         symbol_c *last_type_symbol = NULL;
       
  3191 
       
  3192         {
       
  3193             identifier_c param_name("IN");
       
  3194             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3195             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3196             
       
  3197             /* Get the value from a foo(<param_value>) style call */
       
  3198             if (IN_param_value == NULL)
       
  3199               IN_param_value = function_call_param_iterator.next();
       
  3200             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3201             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3202             
       
  3203             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3204             {
       
  3205         
       
  3206                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  3207                 return return_type_symbol;
       
  3208                 
       
  3209             }
       
  3210             
       
  3211             
       
  3212             ERROR;
       
  3213         }
       
  3214         
       
  3215     }/*function_dword_to_date*/
       
  3216     break;
       
  3217 
       
  3218 /****
       
  3219  *DWORD_TO_DT
       
  3220  */
       
  3221     case function_dword_to_dt :
       
  3222     {
       
  3223         symbol_c *last_type_symbol = NULL;
       
  3224 
       
  3225         {
       
  3226             identifier_c param_name("IN");
       
  3227             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3228             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3229             
       
  3230             /* Get the value from a foo(<param_value>) style call */
       
  3231             if (IN_param_value == NULL)
       
  3232               IN_param_value = function_call_param_iterator.next();
       
  3233             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3234             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3235             
       
  3236             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3237             {
       
  3238         
       
  3239                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  3240                 return return_type_symbol;
       
  3241                 
       
  3242             }
       
  3243             
       
  3244             
       
  3245             ERROR;
       
  3246         }
       
  3247         
       
  3248     }/*function_dword_to_dt*/
       
  3249     break;
       
  3250 
       
  3251 /****
       
  3252  *DWORD_TO_TOD
       
  3253  */
       
  3254     case function_dword_to_tod :
       
  3255     {
       
  3256         symbol_c *last_type_symbol = NULL;
       
  3257 
       
  3258         {
       
  3259             identifier_c param_name("IN");
       
  3260             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3261             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3262             
       
  3263             /* Get the value from a foo(<param_value>) style call */
       
  3264             if (IN_param_value == NULL)
       
  3265               IN_param_value = function_call_param_iterator.next();
       
  3266             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3267             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3268             
       
  3269             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3270             {
       
  3271         
       
  3272                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  3273                 return return_type_symbol;
       
  3274                 
       
  3275             }
       
  3276             
       
  3277             
       
  3278             ERROR;
       
  3279         }
       
  3280         
       
  3281     }/*function_dword_to_tod*/
       
  3282     break;
       
  3283 
       
  3284 /****
       
  3285  *DWORD_TO_UDINT
       
  3286  */
       
  3287     case function_dword_to_udint :
       
  3288     {
       
  3289         symbol_c *last_type_symbol = NULL;
       
  3290 
       
  3291         {
       
  3292             identifier_c param_name("IN");
       
  3293             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3294             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3295             
       
  3296             /* Get the value from a foo(<param_value>) style call */
       
  3297             if (IN_param_value == NULL)
       
  3298               IN_param_value = function_call_param_iterator.next();
       
  3299             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3300             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3301             
       
  3302             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3303             {
       
  3304         
       
  3305                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3306                 return return_type_symbol;
       
  3307                 
       
  3308             }
       
  3309             
       
  3310             
       
  3311             ERROR;
       
  3312         }
       
  3313         
       
  3314     }/*function_dword_to_udint*/
       
  3315     break;
       
  3316 
       
  3317 /****
       
  3318  *DWORD_TO_WORD
       
  3319  */
       
  3320     case function_dword_to_word :
       
  3321     {
       
  3322         symbol_c *last_type_symbol = NULL;
       
  3323 
       
  3324         {
       
  3325             identifier_c param_name("IN");
       
  3326             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3327             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3328             
       
  3329             /* Get the value from a foo(<param_value>) style call */
       
  3330             if (IN_param_value == NULL)
       
  3331               IN_param_value = function_call_param_iterator.next();
       
  3332             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3333             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3334             
       
  3335             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3336             {
       
  3337         
       
  3338                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3339                 return return_type_symbol;
       
  3340                 
       
  3341             }
       
  3342             
       
  3343             
       
  3344             ERROR;
       
  3345         }
       
  3346         
       
  3347     }/*function_dword_to_word*/
       
  3348     break;
       
  3349 
       
  3350 /****
       
  3351  *DWORD_TO_STRING
       
  3352  */
       
  3353     case function_dword_to_string :
       
  3354     {
       
  3355         symbol_c *last_type_symbol = NULL;
       
  3356 
       
  3357         {
       
  3358             identifier_c param_name("IN");
       
  3359             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3360             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3361             
       
  3362             /* Get the value from a foo(<param_value>) style call */
       
  3363             if (IN_param_value == NULL)
       
  3364               IN_param_value = function_call_param_iterator.next();
       
  3365             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3366             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3367             
       
  3368             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3369             {
       
  3370         
       
  3371                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3372                 return return_type_symbol;
       
  3373                 
       
  3374             }
       
  3375             
       
  3376             
       
  3377             ERROR;
       
  3378         }
       
  3379         
       
  3380     }/*function_dword_to_string*/
       
  3381     break;
       
  3382 
       
  3383 /****
       
  3384  *DWORD_TO_LWORD
       
  3385  */
       
  3386     case function_dword_to_lword :
       
  3387     {
       
  3388         symbol_c *last_type_symbol = NULL;
       
  3389 
       
  3390         {
       
  3391             identifier_c param_name("IN");
       
  3392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3394             
       
  3395             /* Get the value from a foo(<param_value>) style call */
       
  3396             if (IN_param_value == NULL)
       
  3397               IN_param_value = function_call_param_iterator.next();
       
  3398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3400             
       
  3401             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3402             {
       
  3403         
       
  3404                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3405                 return return_type_symbol;
       
  3406                 
       
  3407             }
       
  3408             
       
  3409             
       
  3410             ERROR;
       
  3411         }
       
  3412         
       
  3413     }/*function_dword_to_lword*/
       
  3414     break;
       
  3415 
       
  3416 /****
       
  3417  *DWORD_TO_UINT
       
  3418  */
       
  3419     case function_dword_to_uint :
       
  3420     {
       
  3421         symbol_c *last_type_symbol = NULL;
       
  3422 
       
  3423         {
       
  3424             identifier_c param_name("IN");
       
  3425             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3426             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3427             
       
  3428             /* Get the value from a foo(<param_value>) style call */
       
  3429             if (IN_param_value == NULL)
       
  3430               IN_param_value = function_call_param_iterator.next();
       
  3431             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3432             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3433             
       
  3434             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3435             {
       
  3436         
       
  3437                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3438                 return return_type_symbol;
       
  3439                 
       
  3440             }
       
  3441             
       
  3442             
       
  3443             ERROR;
       
  3444         }
       
  3445         
       
  3446     }/*function_dword_to_uint*/
       
  3447     break;
       
  3448 
       
  3449 /****
       
  3450  *DWORD_TO_LREAL
       
  3451  */
       
  3452     case function_dword_to_lreal :
       
  3453     {
       
  3454         symbol_c *last_type_symbol = NULL;
       
  3455 
       
  3456         {
       
  3457             identifier_c param_name("IN");
       
  3458             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3459             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3460             
       
  3461             /* Get the value from a foo(<param_value>) style call */
       
  3462             if (IN_param_value == NULL)
       
  3463               IN_param_value = function_call_param_iterator.next();
       
  3464             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3465             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3466             
       
  3467             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3468             {
       
  3469         
       
  3470                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  3471                 return return_type_symbol;
       
  3472                 
       
  3473             }
       
  3474             
       
  3475             
       
  3476             ERROR;
       
  3477         }
       
  3478         
       
  3479     }/*function_dword_to_lreal*/
       
  3480     break;
       
  3481 
       
  3482 /****
       
  3483  *DWORD_TO_BYTE
       
  3484  */
       
  3485     case function_dword_to_byte :
       
  3486     {
       
  3487         symbol_c *last_type_symbol = NULL;
       
  3488 
       
  3489         {
       
  3490             identifier_c param_name("IN");
       
  3491             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3492             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3493             
       
  3494             /* Get the value from a foo(<param_value>) style call */
       
  3495             if (IN_param_value == NULL)
       
  3496               IN_param_value = function_call_param_iterator.next();
       
  3497             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3498             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3499             
       
  3500             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3501             {
       
  3502         
       
  3503                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  3504                 return return_type_symbol;
       
  3505                 
       
  3506             }
       
  3507             
       
  3508             
       
  3509             ERROR;
       
  3510         }
       
  3511         
       
  3512     }/*function_dword_to_byte*/
       
  3513     break;
       
  3514 
       
  3515 /****
       
  3516  *DWORD_TO_USINT
       
  3517  */
       
  3518     case function_dword_to_usint :
       
  3519     {
       
  3520         symbol_c *last_type_symbol = NULL;
       
  3521 
       
  3522         {
       
  3523             identifier_c param_name("IN");
       
  3524             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3525             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3526             
       
  3527             /* Get the value from a foo(<param_value>) style call */
       
  3528             if (IN_param_value == NULL)
       
  3529               IN_param_value = function_call_param_iterator.next();
       
  3530             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3531             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3532             
       
  3533             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3534             {
       
  3535         
       
  3536                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  3537                 return return_type_symbol;
       
  3538                 
       
  3539             }
       
  3540             
       
  3541             
       
  3542             ERROR;
       
  3543         }
       
  3544         
       
  3545     }/*function_dword_to_usint*/
       
  3546     break;
       
  3547 
       
  3548 /****
       
  3549  *DWORD_TO_ULINT
       
  3550  */
       
  3551     case function_dword_to_ulint :
       
  3552     {
       
  3553         symbol_c *last_type_symbol = NULL;
       
  3554 
       
  3555         {
       
  3556             identifier_c param_name("IN");
       
  3557             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3558             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3559             
       
  3560             /* Get the value from a foo(<param_value>) style call */
       
  3561             if (IN_param_value == NULL)
       
  3562               IN_param_value = function_call_param_iterator.next();
       
  3563             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3564             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3565             
       
  3566             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3567             {
       
  3568         
       
  3569                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  3570                 return return_type_symbol;
       
  3571                 
       
  3572             }
       
  3573             
       
  3574             
       
  3575             ERROR;
       
  3576         }
       
  3577         
       
  3578     }/*function_dword_to_ulint*/
       
  3579     break;
       
  3580 
       
  3581 /****
       
  3582  *DWORD_TO_BOOL
       
  3583  */
       
  3584     case function_dword_to_bool :
       
  3585     {
       
  3586         symbol_c *last_type_symbol = NULL;
       
  3587 
       
  3588         {
       
  3589             identifier_c param_name("IN");
       
  3590             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3591             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3592             
       
  3593             /* Get the value from a foo(<param_value>) style call */
       
  3594             if (IN_param_value == NULL)
       
  3595               IN_param_value = function_call_param_iterator.next();
       
  3596             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3597             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3598             
       
  3599             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3600             {
       
  3601         
       
  3602                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  3603                 return return_type_symbol;
       
  3604                 
       
  3605             }
       
  3606             
       
  3607             
       
  3608             ERROR;
       
  3609         }
       
  3610         
       
  3611     }/*function_dword_to_bool*/
       
  3612     break;
       
  3613 
       
  3614 /****
       
  3615  *DWORD_TO_TIME
       
  3616  */
       
  3617     case function_dword_to_time :
       
  3618     {
       
  3619         symbol_c *last_type_symbol = NULL;
       
  3620 
       
  3621         {
       
  3622             identifier_c param_name("IN");
       
  3623             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3624             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3625             
       
  3626             /* Get the value from a foo(<param_value>) style call */
       
  3627             if (IN_param_value == NULL)
       
  3628               IN_param_value = function_call_param_iterator.next();
       
  3629             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3630             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3631             
       
  3632             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3633             {
       
  3634         
       
  3635                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  3636                 return return_type_symbol;
       
  3637                 
       
  3638             }
       
  3639             
       
  3640             
       
  3641             ERROR;
       
  3642         }
       
  3643         
       
  3644     }/*function_dword_to_time*/
       
  3645     break;
       
  3646 
       
  3647 /****
       
  3648  *DWORD_TO_INT
       
  3649  */
       
  3650     case function_dword_to_int :
       
  3651     {
       
  3652         symbol_c *last_type_symbol = NULL;
       
  3653 
       
  3654         {
       
  3655             identifier_c param_name("IN");
       
  3656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3658             
       
  3659             /* Get the value from a foo(<param_value>) style call */
       
  3660             if (IN_param_value == NULL)
       
  3661               IN_param_value = function_call_param_iterator.next();
       
  3662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3664             
       
  3665             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
  3666             {
       
  3667         
       
  3668                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  3669                 return return_type_symbol;
       
  3670                 
       
  3671             }
       
  3672             
       
  3673             
       
  3674             ERROR;
       
  3675         }
       
  3676         
       
  3677     }/*function_dword_to_int*/
       
  3678     break;
       
  3679 
       
  3680 /****
       
  3681  *DT_TO_REAL
       
  3682  */
       
  3683     case function_dt_to_real :
       
  3684     {
       
  3685         symbol_c *last_type_symbol = NULL;
       
  3686 
       
  3687         {
       
  3688             identifier_c param_name("IN");
       
  3689             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3690             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3691             
       
  3692             /* Get the value from a foo(<param_value>) style call */
       
  3693             if (IN_param_value == NULL)
       
  3694               IN_param_value = function_call_param_iterator.next();
       
  3695             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3696             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3697             
       
  3698             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  3699             {
       
  3700         
       
  3701                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  3702                 return return_type_symbol;
       
  3703                 
       
  3704             }
       
  3705             
       
  3706             
       
  3707             ERROR;
       
  3708         }
       
  3709         
       
  3710     }/*function_dt_to_real*/
       
  3711     break;
       
  3712 
       
  3713 /****
       
  3714  *DT_TO_SINT
       
  3715  */
       
  3716     case function_dt_to_sint :
       
  3717     {
       
  3718         symbol_c *last_type_symbol = NULL;
       
  3719 
       
  3720         {
       
  3721             identifier_c param_name("IN");
       
  3722             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3723             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3724             
       
  3725             /* Get the value from a foo(<param_value>) style call */
       
  3726             if (IN_param_value == NULL)
       
  3727               IN_param_value = function_call_param_iterator.next();
       
  3728             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3729             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3730             
       
  3731             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  3732             {
       
  3733         
       
  3734                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  3735                 return return_type_symbol;
       
  3736                 
       
  3737             }
       
  3738             
       
  3739             
       
  3740             ERROR;
       
  3741         }
       
  3742         
       
  3743     }/*function_dt_to_sint*/
       
  3744     break;
       
  3745 
       
  3746 /****
       
  3747  *DT_TO_LINT
       
  3748  */
       
  3749     case function_dt_to_lint :
       
  3750     {
       
  3751         symbol_c *last_type_symbol = NULL;
       
  3752 
       
  3753         {
       
  3754             identifier_c param_name("IN");
       
  3755             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3756             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3757             
       
  3758             /* Get the value from a foo(<param_value>) style call */
       
  3759             if (IN_param_value == NULL)
       
  3760               IN_param_value = function_call_param_iterator.next();
       
  3761             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3762             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3763             
       
  3764             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  3765             {
       
  3766         
       
  3767                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  3768                 return return_type_symbol;
       
  3769                 
       
  3770             }
       
  3771             
       
  3772             
       
  3773             ERROR;
       
  3774         }
       
  3775         
       
  3776     }/*function_dt_to_lint*/
       
  3777     break;
       
  3778 
       
  3779 /****
       
  3780  *DT_TO_DINT
       
  3781  */
       
  3782     case function_dt_to_dint :
       
  3783     {
       
  3784         symbol_c *last_type_symbol = NULL;
       
  3785 
       
  3786         {
       
  3787             identifier_c param_name("IN");
       
  3788             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3789             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3790             
       
  3791             /* Get the value from a foo(<param_value>) style call */
       
  3792             if (IN_param_value == NULL)
       
  3793               IN_param_value = function_call_param_iterator.next();
       
  3794             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3795             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3796             
       
  3797             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  3798             {
       
  3799         
       
  3800                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  3801                 return return_type_symbol;
       
  3802                 
       
  3803             }
       
  3804             
       
  3805             
       
  3806             ERROR;
       
  3807         }
       
  3808         
       
  3809     }/*function_dt_to_dint*/
       
  3810     break;
       
  3811 
       
  3812 /****
       
  3813  *DT_TO_DWORD
       
  3814  */
       
  3815     case function_dt_to_dword :
       
  3816     {
       
  3817         symbol_c *last_type_symbol = NULL;
       
  3818 
       
  3819         {
       
  3820             identifier_c param_name("IN");
       
  3821             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3822             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3823             
       
  3824             /* Get the value from a foo(<param_value>) style call */
       
  3825             if (IN_param_value == NULL)
       
  3826               IN_param_value = function_call_param_iterator.next();
       
  3827             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3828             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3829             
       
  3830             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  3831             {
       
  3832         
       
  3833                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  3834                 return return_type_symbol;
       
  3835                 
       
  3836             }
       
  3837             
       
  3838             
       
  3839             ERROR;
       
  3840         }
       
  3841         
       
  3842     }/*function_dt_to_dword*/
       
  3843     break;
       
  3844 
       
  3845 /****
       
  3846  *DT_TO_UDINT
       
  3847  */
       
  3848     case function_dt_to_udint :
       
  3849     {
       
  3850         symbol_c *last_type_symbol = NULL;
       
  3851 
       
  3852         {
       
  3853             identifier_c param_name("IN");
       
  3854             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3855             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3856             
       
  3857             /* Get the value from a foo(<param_value>) style call */
       
  3858             if (IN_param_value == NULL)
       
  3859               IN_param_value = function_call_param_iterator.next();
       
  3860             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3861             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3862             
       
  3863             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  3864             {
       
  3865         
       
  3866                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  3867                 return return_type_symbol;
       
  3868                 
       
  3869             }
       
  3870             
       
  3871             
       
  3872             ERROR;
       
  3873         }
       
  3874         
       
  3875     }/*function_dt_to_udint*/
       
  3876     break;
       
  3877 
       
  3878 /****
       
  3879  *DT_TO_WORD
       
  3880  */
       
  3881     case function_dt_to_word :
       
  3882     {
       
  3883         symbol_c *last_type_symbol = NULL;
       
  3884 
       
  3885         {
       
  3886             identifier_c param_name("IN");
       
  3887             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3888             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3889             
       
  3890             /* Get the value from a foo(<param_value>) style call */
       
  3891             if (IN_param_value == NULL)
       
  3892               IN_param_value = function_call_param_iterator.next();
       
  3893             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3894             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3895             
       
  3896             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  3897             {
       
  3898         
       
  3899                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  3900                 return return_type_symbol;
       
  3901                 
       
  3902             }
       
  3903             
       
  3904             
       
  3905             ERROR;
       
  3906         }
       
  3907         
       
  3908     }/*function_dt_to_word*/
       
  3909     break;
       
  3910 
       
  3911 /****
       
  3912  *DT_TO_STRING
       
  3913  */
       
  3914     case function_dt_to_string :
       
  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::dt_type_name, last_type_symbol))
       
  3930             {
       
  3931         
       
  3932                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  3933                 return return_type_symbol;
       
  3934                 
       
  3935             }
       
  3936             
       
  3937             
       
  3938             ERROR;
       
  3939         }
       
  3940         
       
  3941     }/*function_dt_to_string*/
       
  3942     break;
       
  3943 
       
  3944 /****
       
  3945  *DT_TO_LWORD
       
  3946  */
       
  3947     case function_dt_to_lword :
       
  3948     {
       
  3949         symbol_c *last_type_symbol = NULL;
       
  3950 
       
  3951         {
       
  3952             identifier_c param_name("IN");
       
  3953             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3954             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3955             
       
  3956             /* Get the value from a foo(<param_value>) style call */
       
  3957             if (IN_param_value == NULL)
       
  3958               IN_param_value = function_call_param_iterator.next();
       
  3959             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3960             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3961             
       
  3962             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  3963             {
       
  3964         
       
  3965                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  3966                 return return_type_symbol;
       
  3967                 
       
  3968             }
       
  3969             
       
  3970             
       
  3971             ERROR;
       
  3972         }
       
  3973         
       
  3974     }/*function_dt_to_lword*/
       
  3975     break;
       
  3976 
       
  3977 /****
       
  3978  *DT_TO_UINT
       
  3979  */
       
  3980     case function_dt_to_uint :
       
  3981     {
       
  3982         symbol_c *last_type_symbol = NULL;
       
  3983 
       
  3984         {
       
  3985             identifier_c param_name("IN");
       
  3986             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  3987             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  3988             
       
  3989             /* Get the value from a foo(<param_value>) style call */
       
  3990             if (IN_param_value == NULL)
       
  3991               IN_param_value = function_call_param_iterator.next();
       
  3992             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  3993             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  3994             
       
  3995             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  3996             {
       
  3997         
       
  3998                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  3999                 return return_type_symbol;
       
  4000                 
       
  4001             }
       
  4002             
       
  4003             
       
  4004             ERROR;
       
  4005         }
       
  4006         
       
  4007     }/*function_dt_to_uint*/
       
  4008     break;
       
  4009 
       
  4010 /****
       
  4011  *DT_TO_LREAL
       
  4012  */
       
  4013     case function_dt_to_lreal :
       
  4014     {
       
  4015         symbol_c *last_type_symbol = NULL;
       
  4016 
       
  4017         {
       
  4018             identifier_c param_name("IN");
       
  4019             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4020             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4021             
       
  4022             /* Get the value from a foo(<param_value>) style call */
       
  4023             if (IN_param_value == NULL)
       
  4024               IN_param_value = function_call_param_iterator.next();
       
  4025             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4026             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4027             
       
  4028             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4029             {
       
  4030         
       
  4031                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4032                 return return_type_symbol;
       
  4033                 
       
  4034             }
       
  4035             
       
  4036             
       
  4037             ERROR;
       
  4038         }
       
  4039         
       
  4040     }/*function_dt_to_lreal*/
       
  4041     break;
       
  4042 
       
  4043 /****
       
  4044  *DT_TO_BYTE
       
  4045  */
       
  4046     case function_dt_to_byte :
       
  4047     {
       
  4048         symbol_c *last_type_symbol = NULL;
       
  4049 
       
  4050         {
       
  4051             identifier_c param_name("IN");
       
  4052             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4053             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4054             
       
  4055             /* Get the value from a foo(<param_value>) style call */
       
  4056             if (IN_param_value == NULL)
       
  4057               IN_param_value = function_call_param_iterator.next();
       
  4058             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4059             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4060             
       
  4061             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4062             {
       
  4063         
       
  4064                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4065                 return return_type_symbol;
       
  4066                 
       
  4067             }
       
  4068             
       
  4069             
       
  4070             ERROR;
       
  4071         }
       
  4072         
       
  4073     }/*function_dt_to_byte*/
       
  4074     break;
       
  4075 
       
  4076 /****
       
  4077  *DT_TO_USINT
       
  4078  */
       
  4079     case function_dt_to_usint :
       
  4080     {
       
  4081         symbol_c *last_type_symbol = NULL;
       
  4082 
       
  4083         {
       
  4084             identifier_c param_name("IN");
       
  4085             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4086             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4087             
       
  4088             /* Get the value from a foo(<param_value>) style call */
       
  4089             if (IN_param_value == NULL)
       
  4090               IN_param_value = function_call_param_iterator.next();
       
  4091             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4092             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4093             
       
  4094             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4095             {
       
  4096         
       
  4097                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4098                 return return_type_symbol;
       
  4099                 
       
  4100             }
       
  4101             
       
  4102             
       
  4103             ERROR;
       
  4104         }
       
  4105         
       
  4106     }/*function_dt_to_usint*/
       
  4107     break;
       
  4108 
       
  4109 /****
       
  4110  *DT_TO_ULINT
       
  4111  */
       
  4112     case function_dt_to_ulint :
       
  4113     {
       
  4114         symbol_c *last_type_symbol = NULL;
       
  4115 
       
  4116         {
       
  4117             identifier_c param_name("IN");
       
  4118             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4119             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4120             
       
  4121             /* Get the value from a foo(<param_value>) style call */
       
  4122             if (IN_param_value == NULL)
       
  4123               IN_param_value = function_call_param_iterator.next();
       
  4124             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4125             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4126             
       
  4127             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4128             {
       
  4129         
       
  4130                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4131                 return return_type_symbol;
       
  4132                 
       
  4133             }
       
  4134             
       
  4135             
       
  4136             ERROR;
       
  4137         }
       
  4138         
       
  4139     }/*function_dt_to_ulint*/
       
  4140     break;
       
  4141 
       
  4142 /****
       
  4143  *DT_TO_INT
       
  4144  */
       
  4145     case function_dt_to_int :
       
  4146     {
       
  4147         symbol_c *last_type_symbol = NULL;
       
  4148 
       
  4149         {
       
  4150             identifier_c param_name("IN");
       
  4151             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4152             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4153             
       
  4154             /* Get the value from a foo(<param_value>) style call */
       
  4155             if (IN_param_value == NULL)
       
  4156               IN_param_value = function_call_param_iterator.next();
       
  4157             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4158             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4159             
       
  4160             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  4161             {
       
  4162         
       
  4163                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4164                 return return_type_symbol;
       
  4165                 
       
  4166             }
       
  4167             
       
  4168             
       
  4169             ERROR;
       
  4170         }
       
  4171         
       
  4172     }/*function_dt_to_int*/
       
  4173     break;
       
  4174 
       
  4175 /****
       
  4176  *TOD_TO_REAL
       
  4177  */
       
  4178     case function_tod_to_real :
       
  4179     {
       
  4180         symbol_c *last_type_symbol = NULL;
       
  4181 
       
  4182         {
       
  4183             identifier_c param_name("IN");
       
  4184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4186             
       
  4187             /* Get the value from a foo(<param_value>) style call */
       
  4188             if (IN_param_value == NULL)
       
  4189               IN_param_value = function_call_param_iterator.next();
       
  4190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4192             
       
  4193             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4194             {
       
  4195         
       
  4196                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4197                 return return_type_symbol;
       
  4198                 
       
  4199             }
       
  4200             
       
  4201             
       
  4202             ERROR;
       
  4203         }
       
  4204         
       
  4205     }/*function_tod_to_real*/
       
  4206     break;
       
  4207 
       
  4208 /****
       
  4209  *TOD_TO_SINT
       
  4210  */
       
  4211     case function_tod_to_sint :
       
  4212     {
       
  4213         symbol_c *last_type_symbol = NULL;
       
  4214 
       
  4215         {
       
  4216             identifier_c param_name("IN");
       
  4217             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4218             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4219             
       
  4220             /* Get the value from a foo(<param_value>) style call */
       
  4221             if (IN_param_value == NULL)
       
  4222               IN_param_value = function_call_param_iterator.next();
       
  4223             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4224             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4225             
       
  4226             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4227             {
       
  4228         
       
  4229                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4230                 return return_type_symbol;
       
  4231                 
       
  4232             }
       
  4233             
       
  4234             
       
  4235             ERROR;
       
  4236         }
       
  4237         
       
  4238     }/*function_tod_to_sint*/
       
  4239     break;
       
  4240 
       
  4241 /****
       
  4242  *TOD_TO_LINT
       
  4243  */
       
  4244     case function_tod_to_lint :
       
  4245     {
       
  4246         symbol_c *last_type_symbol = NULL;
       
  4247 
       
  4248         {
       
  4249             identifier_c param_name("IN");
       
  4250             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4251             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4252             
       
  4253             /* Get the value from a foo(<param_value>) style call */
       
  4254             if (IN_param_value == NULL)
       
  4255               IN_param_value = function_call_param_iterator.next();
       
  4256             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4257             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4258             
       
  4259             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4260             {
       
  4261         
       
  4262                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4263                 return return_type_symbol;
       
  4264                 
       
  4265             }
       
  4266             
       
  4267             
       
  4268             ERROR;
       
  4269         }
       
  4270         
       
  4271     }/*function_tod_to_lint*/
       
  4272     break;
       
  4273 
       
  4274 /****
       
  4275  *TOD_TO_DINT
       
  4276  */
       
  4277     case function_tod_to_dint :
       
  4278     {
       
  4279         symbol_c *last_type_symbol = NULL;
       
  4280 
       
  4281         {
       
  4282             identifier_c param_name("IN");
       
  4283             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4284             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4285             
       
  4286             /* Get the value from a foo(<param_value>) style call */
       
  4287             if (IN_param_value == NULL)
       
  4288               IN_param_value = function_call_param_iterator.next();
       
  4289             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4290             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4291             
       
  4292             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4293             {
       
  4294         
       
  4295                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4296                 return return_type_symbol;
       
  4297                 
       
  4298             }
       
  4299             
       
  4300             
       
  4301             ERROR;
       
  4302         }
       
  4303         
       
  4304     }/*function_tod_to_dint*/
       
  4305     break;
       
  4306 
       
  4307 /****
       
  4308  *TOD_TO_DWORD
       
  4309  */
       
  4310     case function_tod_to_dword :
       
  4311     {
       
  4312         symbol_c *last_type_symbol = NULL;
       
  4313 
       
  4314         {
       
  4315             identifier_c param_name("IN");
       
  4316             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4317             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4318             
       
  4319             /* Get the value from a foo(<param_value>) style call */
       
  4320             if (IN_param_value == NULL)
       
  4321               IN_param_value = function_call_param_iterator.next();
       
  4322             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4323             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4324             
       
  4325             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4326             {
       
  4327         
       
  4328                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4329                 return return_type_symbol;
       
  4330                 
       
  4331             }
       
  4332             
       
  4333             
       
  4334             ERROR;
       
  4335         }
       
  4336         
       
  4337     }/*function_tod_to_dword*/
       
  4338     break;
       
  4339 
       
  4340 /****
       
  4341  *TOD_TO_UDINT
       
  4342  */
       
  4343     case function_tod_to_udint :
       
  4344     {
       
  4345         symbol_c *last_type_symbol = NULL;
       
  4346 
       
  4347         {
       
  4348             identifier_c param_name("IN");
       
  4349             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4350             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4351             
       
  4352             /* Get the value from a foo(<param_value>) style call */
       
  4353             if (IN_param_value == NULL)
       
  4354               IN_param_value = function_call_param_iterator.next();
       
  4355             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4356             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4357             
       
  4358             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4359             {
       
  4360         
       
  4361                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  4362                 return return_type_symbol;
       
  4363                 
       
  4364             }
       
  4365             
       
  4366             
       
  4367             ERROR;
       
  4368         }
       
  4369         
       
  4370     }/*function_tod_to_udint*/
       
  4371     break;
       
  4372 
       
  4373 /****
       
  4374  *TOD_TO_WORD
       
  4375  */
       
  4376     case function_tod_to_word :
       
  4377     {
       
  4378         symbol_c *last_type_symbol = NULL;
       
  4379 
       
  4380         {
       
  4381             identifier_c param_name("IN");
       
  4382             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4383             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4384             
       
  4385             /* Get the value from a foo(<param_value>) style call */
       
  4386             if (IN_param_value == NULL)
       
  4387               IN_param_value = function_call_param_iterator.next();
       
  4388             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4389             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4390             
       
  4391             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4392             {
       
  4393         
       
  4394                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4395                 return return_type_symbol;
       
  4396                 
       
  4397             }
       
  4398             
       
  4399             
       
  4400             ERROR;
       
  4401         }
       
  4402         
       
  4403     }/*function_tod_to_word*/
       
  4404     break;
       
  4405 
       
  4406 /****
       
  4407  *TOD_TO_STRING
       
  4408  */
       
  4409     case function_tod_to_string :
       
  4410     {
       
  4411         symbol_c *last_type_symbol = NULL;
       
  4412 
       
  4413         {
       
  4414             identifier_c param_name("IN");
       
  4415             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4416             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4417             
       
  4418             /* Get the value from a foo(<param_value>) style call */
       
  4419             if (IN_param_value == NULL)
       
  4420               IN_param_value = function_call_param_iterator.next();
       
  4421             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4422             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4423             
       
  4424             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4425             {
       
  4426         
       
  4427                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4428                 return return_type_symbol;
       
  4429                 
       
  4430             }
       
  4431             
       
  4432             
       
  4433             ERROR;
       
  4434         }
       
  4435         
       
  4436     }/*function_tod_to_string*/
       
  4437     break;
       
  4438 
       
  4439 /****
       
  4440  *TOD_TO_LWORD
       
  4441  */
       
  4442     case function_tod_to_lword :
       
  4443     {
       
  4444         symbol_c *last_type_symbol = NULL;
       
  4445 
       
  4446         {
       
  4447             identifier_c param_name("IN");
       
  4448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4450             
       
  4451             /* Get the value from a foo(<param_value>) style call */
       
  4452             if (IN_param_value == NULL)
       
  4453               IN_param_value = function_call_param_iterator.next();
       
  4454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4456             
       
  4457             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4458             {
       
  4459         
       
  4460                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  4461                 return return_type_symbol;
       
  4462                 
       
  4463             }
       
  4464             
       
  4465             
       
  4466             ERROR;
       
  4467         }
       
  4468         
       
  4469     }/*function_tod_to_lword*/
       
  4470     break;
       
  4471 
       
  4472 /****
       
  4473  *TOD_TO_UINT
       
  4474  */
       
  4475     case function_tod_to_uint :
       
  4476     {
       
  4477         symbol_c *last_type_symbol = NULL;
       
  4478 
       
  4479         {
       
  4480             identifier_c param_name("IN");
       
  4481             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4482             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4483             
       
  4484             /* Get the value from a foo(<param_value>) style call */
       
  4485             if (IN_param_value == NULL)
       
  4486               IN_param_value = function_call_param_iterator.next();
       
  4487             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4488             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4489             
       
  4490             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4491             {
       
  4492         
       
  4493                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  4494                 return return_type_symbol;
       
  4495                 
       
  4496             }
       
  4497             
       
  4498             
       
  4499             ERROR;
       
  4500         }
       
  4501         
       
  4502     }/*function_tod_to_uint*/
       
  4503     break;
       
  4504 
       
  4505 /****
       
  4506  *TOD_TO_LREAL
       
  4507  */
       
  4508     case function_tod_to_lreal :
       
  4509     {
       
  4510         symbol_c *last_type_symbol = NULL;
       
  4511 
       
  4512         {
       
  4513             identifier_c param_name("IN");
       
  4514             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4515             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4516             
       
  4517             /* Get the value from a foo(<param_value>) style call */
       
  4518             if (IN_param_value == NULL)
       
  4519               IN_param_value = function_call_param_iterator.next();
       
  4520             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4521             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4522             
       
  4523             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4524             {
       
  4525         
       
  4526                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  4527                 return return_type_symbol;
       
  4528                 
       
  4529             }
       
  4530             
       
  4531             
       
  4532             ERROR;
       
  4533         }
       
  4534         
       
  4535     }/*function_tod_to_lreal*/
       
  4536     break;
       
  4537 
       
  4538 /****
       
  4539  *TOD_TO_BYTE
       
  4540  */
       
  4541     case function_tod_to_byte :
       
  4542     {
       
  4543         symbol_c *last_type_symbol = NULL;
       
  4544 
       
  4545         {
       
  4546             identifier_c param_name("IN");
       
  4547             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4548             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4549             
       
  4550             /* Get the value from a foo(<param_value>) style call */
       
  4551             if (IN_param_value == NULL)
       
  4552               IN_param_value = function_call_param_iterator.next();
       
  4553             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4554             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4555             
       
  4556             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4557             {
       
  4558         
       
  4559                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  4560                 return return_type_symbol;
       
  4561                 
       
  4562             }
       
  4563             
       
  4564             
       
  4565             ERROR;
       
  4566         }
       
  4567         
       
  4568     }/*function_tod_to_byte*/
       
  4569     break;
       
  4570 
       
  4571 /****
       
  4572  *TOD_TO_USINT
       
  4573  */
       
  4574     case function_tod_to_usint :
       
  4575     {
       
  4576         symbol_c *last_type_symbol = NULL;
       
  4577 
       
  4578         {
       
  4579             identifier_c param_name("IN");
       
  4580             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4581             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4582             
       
  4583             /* Get the value from a foo(<param_value>) style call */
       
  4584             if (IN_param_value == NULL)
       
  4585               IN_param_value = function_call_param_iterator.next();
       
  4586             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4587             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4588             
       
  4589             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4590             {
       
  4591         
       
  4592                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  4593                 return return_type_symbol;
       
  4594                 
       
  4595             }
       
  4596             
       
  4597             
       
  4598             ERROR;
       
  4599         }
       
  4600         
       
  4601     }/*function_tod_to_usint*/
       
  4602     break;
       
  4603 
       
  4604 /****
       
  4605  *TOD_TO_ULINT
       
  4606  */
       
  4607     case function_tod_to_ulint :
       
  4608     {
       
  4609         symbol_c *last_type_symbol = NULL;
       
  4610 
       
  4611         {
       
  4612             identifier_c param_name("IN");
       
  4613             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4614             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4615             
       
  4616             /* Get the value from a foo(<param_value>) style call */
       
  4617             if (IN_param_value == NULL)
       
  4618               IN_param_value = function_call_param_iterator.next();
       
  4619             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4620             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4621             
       
  4622             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4623             {
       
  4624         
       
  4625                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  4626                 return return_type_symbol;
       
  4627                 
       
  4628             }
       
  4629             
       
  4630             
       
  4631             ERROR;
       
  4632         }
       
  4633         
       
  4634     }/*function_tod_to_ulint*/
       
  4635     break;
       
  4636 
       
  4637 /****
       
  4638  *TOD_TO_INT
       
  4639  */
       
  4640     case function_tod_to_int :
       
  4641     {
       
  4642         symbol_c *last_type_symbol = NULL;
       
  4643 
       
  4644         {
       
  4645             identifier_c param_name("IN");
       
  4646             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4647             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4648             
       
  4649             /* Get the value from a foo(<param_value>) style call */
       
  4650             if (IN_param_value == NULL)
       
  4651               IN_param_value = function_call_param_iterator.next();
       
  4652             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4653             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4654             
       
  4655             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  4656             {
       
  4657         
       
  4658                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  4659                 return return_type_symbol;
       
  4660                 
       
  4661             }
       
  4662             
       
  4663             
       
  4664             ERROR;
       
  4665         }
       
  4666         
       
  4667     }/*function_tod_to_int*/
       
  4668     break;
       
  4669 
       
  4670 /****
       
  4671  *UDINT_TO_REAL
       
  4672  */
       
  4673     case function_udint_to_real :
       
  4674     {
       
  4675         symbol_c *last_type_symbol = NULL;
       
  4676 
       
  4677         {
       
  4678             identifier_c param_name("IN");
       
  4679             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4680             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4681             
       
  4682             /* Get the value from a foo(<param_value>) style call */
       
  4683             if (IN_param_value == NULL)
       
  4684               IN_param_value = function_call_param_iterator.next();
       
  4685             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4686             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4687             
       
  4688             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4689             {
       
  4690         
       
  4691                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  4692                 return return_type_symbol;
       
  4693                 
       
  4694             }
       
  4695             
       
  4696             
       
  4697             ERROR;
       
  4698         }
       
  4699         
       
  4700     }/*function_udint_to_real*/
       
  4701     break;
       
  4702 
       
  4703 /****
       
  4704  *UDINT_TO_SINT
       
  4705  */
       
  4706     case function_udint_to_sint :
       
  4707     {
       
  4708         symbol_c *last_type_symbol = NULL;
       
  4709 
       
  4710         {
       
  4711             identifier_c param_name("IN");
       
  4712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4714             
       
  4715             /* Get the value from a foo(<param_value>) style call */
       
  4716             if (IN_param_value == NULL)
       
  4717               IN_param_value = function_call_param_iterator.next();
       
  4718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4720             
       
  4721             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4722             {
       
  4723         
       
  4724                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  4725                 return return_type_symbol;
       
  4726                 
       
  4727             }
       
  4728             
       
  4729             
       
  4730             ERROR;
       
  4731         }
       
  4732         
       
  4733     }/*function_udint_to_sint*/
       
  4734     break;
       
  4735 
       
  4736 /****
       
  4737  *UDINT_TO_LINT
       
  4738  */
       
  4739     case function_udint_to_lint :
       
  4740     {
       
  4741         symbol_c *last_type_symbol = NULL;
       
  4742 
       
  4743         {
       
  4744             identifier_c param_name("IN");
       
  4745             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4746             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4747             
       
  4748             /* Get the value from a foo(<param_value>) style call */
       
  4749             if (IN_param_value == NULL)
       
  4750               IN_param_value = function_call_param_iterator.next();
       
  4751             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4752             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4753             
       
  4754             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4755             {
       
  4756         
       
  4757                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  4758                 return return_type_symbol;
       
  4759                 
       
  4760             }
       
  4761             
       
  4762             
       
  4763             ERROR;
       
  4764         }
       
  4765         
       
  4766     }/*function_udint_to_lint*/
       
  4767     break;
       
  4768 
       
  4769 /****
       
  4770  *UDINT_TO_DINT
       
  4771  */
       
  4772     case function_udint_to_dint :
       
  4773     {
       
  4774         symbol_c *last_type_symbol = NULL;
       
  4775 
       
  4776         {
       
  4777             identifier_c param_name("IN");
       
  4778             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4779             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4780             
       
  4781             /* Get the value from a foo(<param_value>) style call */
       
  4782             if (IN_param_value == NULL)
       
  4783               IN_param_value = function_call_param_iterator.next();
       
  4784             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4785             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4786             
       
  4787             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4788             {
       
  4789         
       
  4790                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  4791                 return return_type_symbol;
       
  4792                 
       
  4793             }
       
  4794             
       
  4795             
       
  4796             ERROR;
       
  4797         }
       
  4798         
       
  4799     }/*function_udint_to_dint*/
       
  4800     break;
       
  4801 
       
  4802 /****
       
  4803  *UDINT_TO_DATE
       
  4804  */
       
  4805     case function_udint_to_date :
       
  4806     {
       
  4807         symbol_c *last_type_symbol = NULL;
       
  4808 
       
  4809         {
       
  4810             identifier_c param_name("IN");
       
  4811             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4812             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4813             
       
  4814             /* Get the value from a foo(<param_value>) style call */
       
  4815             if (IN_param_value == NULL)
       
  4816               IN_param_value = function_call_param_iterator.next();
       
  4817             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4818             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4819             
       
  4820             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4821             {
       
  4822         
       
  4823                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  4824                 return return_type_symbol;
       
  4825                 
       
  4826             }
       
  4827             
       
  4828             
       
  4829             ERROR;
       
  4830         }
       
  4831         
       
  4832     }/*function_udint_to_date*/
       
  4833     break;
       
  4834 
       
  4835 /****
       
  4836  *UDINT_TO_DWORD
       
  4837  */
       
  4838     case function_udint_to_dword :
       
  4839     {
       
  4840         symbol_c *last_type_symbol = NULL;
       
  4841 
       
  4842         {
       
  4843             identifier_c param_name("IN");
       
  4844             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4845             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4846             
       
  4847             /* Get the value from a foo(<param_value>) style call */
       
  4848             if (IN_param_value == NULL)
       
  4849               IN_param_value = function_call_param_iterator.next();
       
  4850             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4851             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4852             
       
  4853             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4854             {
       
  4855         
       
  4856                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  4857                 return return_type_symbol;
       
  4858                 
       
  4859             }
       
  4860             
       
  4861             
       
  4862             ERROR;
       
  4863         }
       
  4864         
       
  4865     }/*function_udint_to_dword*/
       
  4866     break;
       
  4867 
       
  4868 /****
       
  4869  *UDINT_TO_DT
       
  4870  */
       
  4871     case function_udint_to_dt :
       
  4872     {
       
  4873         symbol_c *last_type_symbol = NULL;
       
  4874 
       
  4875         {
       
  4876             identifier_c param_name("IN");
       
  4877             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4878             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4879             
       
  4880             /* Get the value from a foo(<param_value>) style call */
       
  4881             if (IN_param_value == NULL)
       
  4882               IN_param_value = function_call_param_iterator.next();
       
  4883             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4884             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4885             
       
  4886             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4887             {
       
  4888         
       
  4889                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  4890                 return return_type_symbol;
       
  4891                 
       
  4892             }
       
  4893             
       
  4894             
       
  4895             ERROR;
       
  4896         }
       
  4897         
       
  4898     }/*function_udint_to_dt*/
       
  4899     break;
       
  4900 
       
  4901 /****
       
  4902  *UDINT_TO_TOD
       
  4903  */
       
  4904     case function_udint_to_tod :
       
  4905     {
       
  4906         symbol_c *last_type_symbol = NULL;
       
  4907 
       
  4908         {
       
  4909             identifier_c param_name("IN");
       
  4910             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4911             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4912             
       
  4913             /* Get the value from a foo(<param_value>) style call */
       
  4914             if (IN_param_value == NULL)
       
  4915               IN_param_value = function_call_param_iterator.next();
       
  4916             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4917             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4918             
       
  4919             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4920             {
       
  4921         
       
  4922                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  4923                 return return_type_symbol;
       
  4924                 
       
  4925             }
       
  4926             
       
  4927             
       
  4928             ERROR;
       
  4929         }
       
  4930         
       
  4931     }/*function_udint_to_tod*/
       
  4932     break;
       
  4933 
       
  4934 /****
       
  4935  *UDINT_TO_WORD
       
  4936  */
       
  4937     case function_udint_to_word :
       
  4938     {
       
  4939         symbol_c *last_type_symbol = NULL;
       
  4940 
       
  4941         {
       
  4942             identifier_c param_name("IN");
       
  4943             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  4944             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  4945             
       
  4946             /* Get the value from a foo(<param_value>) style call */
       
  4947             if (IN_param_value == NULL)
       
  4948               IN_param_value = function_call_param_iterator.next();
       
  4949             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  4950             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  4951             
       
  4952             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  4953             {
       
  4954         
       
  4955                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  4956                 return return_type_symbol;
       
  4957                 
       
  4958             }
       
  4959             
       
  4960             
       
  4961             ERROR;
       
  4962         }
       
  4963         
       
  4964     }/*function_udint_to_word*/
       
  4965     break;
       
  4966 
       
  4967 /****
       
  4968  *UDINT_TO_STRING
       
  4969  */
       
  4970     case function_udint_to_string :
       
  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::udint_type_name, last_type_symbol))
       
  4986             {
       
  4987         
       
  4988                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  4989                 return return_type_symbol;
       
  4990                 
       
  4991             }
       
  4992             
       
  4993             
       
  4994             ERROR;
       
  4995         }
       
  4996         
       
  4997     }/*function_udint_to_string*/
       
  4998     break;
       
  4999 
       
  5000 /****
       
  5001  *UDINT_TO_LWORD
       
  5002  */
       
  5003     case function_udint_to_lword :
       
  5004     {
       
  5005         symbol_c *last_type_symbol = NULL;
       
  5006 
       
  5007         {
       
  5008             identifier_c param_name("IN");
       
  5009             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5010             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5011             
       
  5012             /* Get the value from a foo(<param_value>) style call */
       
  5013             if (IN_param_value == NULL)
       
  5014               IN_param_value = function_call_param_iterator.next();
       
  5015             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5016             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5017             
       
  5018             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5019             {
       
  5020         
       
  5021                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5022                 return return_type_symbol;
       
  5023                 
       
  5024             }
       
  5025             
       
  5026             
       
  5027             ERROR;
       
  5028         }
       
  5029         
       
  5030     }/*function_udint_to_lword*/
       
  5031     break;
       
  5032 
       
  5033 /****
       
  5034  *UDINT_TO_UINT
       
  5035  */
       
  5036     case function_udint_to_uint :
       
  5037     {
       
  5038         symbol_c *last_type_symbol = NULL;
       
  5039 
       
  5040         {
       
  5041             identifier_c param_name("IN");
       
  5042             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5043             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5044             
       
  5045             /* Get the value from a foo(<param_value>) style call */
       
  5046             if (IN_param_value == NULL)
       
  5047               IN_param_value = function_call_param_iterator.next();
       
  5048             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5049             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5050             
       
  5051             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5052             {
       
  5053         
       
  5054                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5055                 return return_type_symbol;
       
  5056                 
       
  5057             }
       
  5058             
       
  5059             
       
  5060             ERROR;
       
  5061         }
       
  5062         
       
  5063     }/*function_udint_to_uint*/
       
  5064     break;
       
  5065 
       
  5066 /****
       
  5067  *UDINT_TO_LREAL
       
  5068  */
       
  5069     case function_udint_to_lreal :
       
  5070     {
       
  5071         symbol_c *last_type_symbol = NULL;
       
  5072 
       
  5073         {
       
  5074             identifier_c param_name("IN");
       
  5075             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5076             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5077             
       
  5078             /* Get the value from a foo(<param_value>) style call */
       
  5079             if (IN_param_value == NULL)
       
  5080               IN_param_value = function_call_param_iterator.next();
       
  5081             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5082             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5083             
       
  5084             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5085             {
       
  5086         
       
  5087                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5088                 return return_type_symbol;
       
  5089                 
       
  5090             }
       
  5091             
       
  5092             
       
  5093             ERROR;
       
  5094         }
       
  5095         
       
  5096     }/*function_udint_to_lreal*/
       
  5097     break;
       
  5098 
       
  5099 /****
       
  5100  *UDINT_TO_BYTE
       
  5101  */
       
  5102     case function_udint_to_byte :
       
  5103     {
       
  5104         symbol_c *last_type_symbol = NULL;
       
  5105 
       
  5106         {
       
  5107             identifier_c param_name("IN");
       
  5108             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5109             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5110             
       
  5111             /* Get the value from a foo(<param_value>) style call */
       
  5112             if (IN_param_value == NULL)
       
  5113               IN_param_value = function_call_param_iterator.next();
       
  5114             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5115             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5116             
       
  5117             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5118             {
       
  5119         
       
  5120                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5121                 return return_type_symbol;
       
  5122                 
       
  5123             }
       
  5124             
       
  5125             
       
  5126             ERROR;
       
  5127         }
       
  5128         
       
  5129     }/*function_udint_to_byte*/
       
  5130     break;
       
  5131 
       
  5132 /****
       
  5133  *UDINT_TO_USINT
       
  5134  */
       
  5135     case function_udint_to_usint :
       
  5136     {
       
  5137         symbol_c *last_type_symbol = NULL;
       
  5138 
       
  5139         {
       
  5140             identifier_c param_name("IN");
       
  5141             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5142             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5143             
       
  5144             /* Get the value from a foo(<param_value>) style call */
       
  5145             if (IN_param_value == NULL)
       
  5146               IN_param_value = function_call_param_iterator.next();
       
  5147             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5148             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5149             
       
  5150             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5151             {
       
  5152         
       
  5153                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5154                 return return_type_symbol;
       
  5155                 
       
  5156             }
       
  5157             
       
  5158             
       
  5159             ERROR;
       
  5160         }
       
  5161         
       
  5162     }/*function_udint_to_usint*/
       
  5163     break;
       
  5164 
       
  5165 /****
       
  5166  *UDINT_TO_ULINT
       
  5167  */
       
  5168     case function_udint_to_ulint :
       
  5169     {
       
  5170         symbol_c *last_type_symbol = NULL;
       
  5171 
       
  5172         {
       
  5173             identifier_c param_name("IN");
       
  5174             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5175             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5176             
       
  5177             /* Get the value from a foo(<param_value>) style call */
       
  5178             if (IN_param_value == NULL)
       
  5179               IN_param_value = function_call_param_iterator.next();
       
  5180             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5181             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5182             
       
  5183             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5184             {
       
  5185         
       
  5186                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5187                 return return_type_symbol;
       
  5188                 
       
  5189             }
       
  5190             
       
  5191             
       
  5192             ERROR;
       
  5193         }
       
  5194         
       
  5195     }/*function_udint_to_ulint*/
       
  5196     break;
       
  5197 
       
  5198 /****
       
  5199  *UDINT_TO_BOOL
       
  5200  */
       
  5201     case function_udint_to_bool :
       
  5202     {
       
  5203         symbol_c *last_type_symbol = NULL;
       
  5204 
       
  5205         {
       
  5206             identifier_c param_name("IN");
       
  5207             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5208             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5209             
       
  5210             /* Get the value from a foo(<param_value>) style call */
       
  5211             if (IN_param_value == NULL)
       
  5212               IN_param_value = function_call_param_iterator.next();
       
  5213             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5214             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5215             
       
  5216             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5217             {
       
  5218         
       
  5219                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5220                 return return_type_symbol;
       
  5221                 
       
  5222             }
       
  5223             
       
  5224             
       
  5225             ERROR;
       
  5226         }
       
  5227         
       
  5228     }/*function_udint_to_bool*/
       
  5229     break;
       
  5230 
       
  5231 /****
       
  5232  *UDINT_TO_TIME
       
  5233  */
       
  5234     case function_udint_to_time :
       
  5235     {
       
  5236         symbol_c *last_type_symbol = NULL;
       
  5237 
       
  5238         {
       
  5239             identifier_c param_name("IN");
       
  5240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5242             
       
  5243             /* Get the value from a foo(<param_value>) style call */
       
  5244             if (IN_param_value == NULL)
       
  5245               IN_param_value = function_call_param_iterator.next();
       
  5246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5248             
       
  5249             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5250             {
       
  5251         
       
  5252                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5253                 return return_type_symbol;
       
  5254                 
       
  5255             }
       
  5256             
       
  5257             
       
  5258             ERROR;
       
  5259         }
       
  5260         
       
  5261     }/*function_udint_to_time*/
       
  5262     break;
       
  5263 
       
  5264 /****
       
  5265  *UDINT_TO_INT
       
  5266  */
       
  5267     case function_udint_to_int :
       
  5268     {
       
  5269         symbol_c *last_type_symbol = NULL;
       
  5270 
       
  5271         {
       
  5272             identifier_c param_name("IN");
       
  5273             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5274             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5275             
       
  5276             /* Get the value from a foo(<param_value>) style call */
       
  5277             if (IN_param_value == NULL)
       
  5278               IN_param_value = function_call_param_iterator.next();
       
  5279             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5280             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5281             
       
  5282             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
  5283             {
       
  5284         
       
  5285                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5286                 return return_type_symbol;
       
  5287                 
       
  5288             }
       
  5289             
       
  5290             
       
  5291             ERROR;
       
  5292         }
       
  5293         
       
  5294     }/*function_udint_to_int*/
       
  5295     break;
       
  5296 
       
  5297 /****
       
  5298  *WORD_TO_REAL
       
  5299  */
       
  5300     case function_word_to_real :
       
  5301     {
       
  5302         symbol_c *last_type_symbol = NULL;
       
  5303 
       
  5304         {
       
  5305             identifier_c param_name("IN");
       
  5306             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5307             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5308             
       
  5309             /* Get the value from a foo(<param_value>) style call */
       
  5310             if (IN_param_value == NULL)
       
  5311               IN_param_value = function_call_param_iterator.next();
       
  5312             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5313             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5314             
       
  5315             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5316             {
       
  5317         
       
  5318                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5319                 return return_type_symbol;
       
  5320                 
       
  5321             }
       
  5322             
       
  5323             
       
  5324             ERROR;
       
  5325         }
       
  5326         
       
  5327     }/*function_word_to_real*/
       
  5328     break;
       
  5329 
       
  5330 /****
       
  5331  *WORD_TO_SINT
       
  5332  */
       
  5333     case function_word_to_sint :
       
  5334     {
       
  5335         symbol_c *last_type_symbol = NULL;
       
  5336 
       
  5337         {
       
  5338             identifier_c param_name("IN");
       
  5339             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5340             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5341             
       
  5342             /* Get the value from a foo(<param_value>) style call */
       
  5343             if (IN_param_value == NULL)
       
  5344               IN_param_value = function_call_param_iterator.next();
       
  5345             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5346             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5347             
       
  5348             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5349             {
       
  5350         
       
  5351                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5352                 return return_type_symbol;
       
  5353                 
       
  5354             }
       
  5355             
       
  5356             
       
  5357             ERROR;
       
  5358         }
       
  5359         
       
  5360     }/*function_word_to_sint*/
       
  5361     break;
       
  5362 
       
  5363 /****
       
  5364  *WORD_TO_LINT
       
  5365  */
       
  5366     case function_word_to_lint :
       
  5367     {
       
  5368         symbol_c *last_type_symbol = NULL;
       
  5369 
       
  5370         {
       
  5371             identifier_c param_name("IN");
       
  5372             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5373             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5374             
       
  5375             /* Get the value from a foo(<param_value>) style call */
       
  5376             if (IN_param_value == NULL)
       
  5377               IN_param_value = function_call_param_iterator.next();
       
  5378             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5379             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5380             
       
  5381             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5382             {
       
  5383         
       
  5384                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  5385                 return return_type_symbol;
       
  5386                 
       
  5387             }
       
  5388             
       
  5389             
       
  5390             ERROR;
       
  5391         }
       
  5392         
       
  5393     }/*function_word_to_lint*/
       
  5394     break;
       
  5395 
       
  5396 /****
       
  5397  *WORD_TO_DINT
       
  5398  */
       
  5399     case function_word_to_dint :
       
  5400     {
       
  5401         symbol_c *last_type_symbol = NULL;
       
  5402 
       
  5403         {
       
  5404             identifier_c param_name("IN");
       
  5405             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5406             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5407             
       
  5408             /* Get the value from a foo(<param_value>) style call */
       
  5409             if (IN_param_value == NULL)
       
  5410               IN_param_value = function_call_param_iterator.next();
       
  5411             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5412             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5413             
       
  5414             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5415             {
       
  5416         
       
  5417                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  5418                 return return_type_symbol;
       
  5419                 
       
  5420             }
       
  5421             
       
  5422             
       
  5423             ERROR;
       
  5424         }
       
  5425         
       
  5426     }/*function_word_to_dint*/
       
  5427     break;
       
  5428 
       
  5429 /****
       
  5430  *WORD_TO_DATE
       
  5431  */
       
  5432     case function_word_to_date :
       
  5433     {
       
  5434         symbol_c *last_type_symbol = NULL;
       
  5435 
       
  5436         {
       
  5437             identifier_c param_name("IN");
       
  5438             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5439             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5440             
       
  5441             /* Get the value from a foo(<param_value>) style call */
       
  5442             if (IN_param_value == NULL)
       
  5443               IN_param_value = function_call_param_iterator.next();
       
  5444             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5445             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5446             
       
  5447             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5448             {
       
  5449         
       
  5450                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  5451                 return return_type_symbol;
       
  5452                 
       
  5453             }
       
  5454             
       
  5455             
       
  5456             ERROR;
       
  5457         }
       
  5458         
       
  5459     }/*function_word_to_date*/
       
  5460     break;
       
  5461 
       
  5462 /****
       
  5463  *WORD_TO_DWORD
       
  5464  */
       
  5465     case function_word_to_dword :
       
  5466     {
       
  5467         symbol_c *last_type_symbol = NULL;
       
  5468 
       
  5469         {
       
  5470             identifier_c param_name("IN");
       
  5471             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5472             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5473             
       
  5474             /* Get the value from a foo(<param_value>) style call */
       
  5475             if (IN_param_value == NULL)
       
  5476               IN_param_value = function_call_param_iterator.next();
       
  5477             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5478             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5479             
       
  5480             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5481             {
       
  5482         
       
  5483                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  5484                 return return_type_symbol;
       
  5485                 
       
  5486             }
       
  5487             
       
  5488             
       
  5489             ERROR;
       
  5490         }
       
  5491         
       
  5492     }/*function_word_to_dword*/
       
  5493     break;
       
  5494 
       
  5495 /****
       
  5496  *WORD_TO_DT
       
  5497  */
       
  5498     case function_word_to_dt :
       
  5499     {
       
  5500         symbol_c *last_type_symbol = NULL;
       
  5501 
       
  5502         {
       
  5503             identifier_c param_name("IN");
       
  5504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5506             
       
  5507             /* Get the value from a foo(<param_value>) style call */
       
  5508             if (IN_param_value == NULL)
       
  5509               IN_param_value = function_call_param_iterator.next();
       
  5510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5512             
       
  5513             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5514             {
       
  5515         
       
  5516                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  5517                 return return_type_symbol;
       
  5518                 
       
  5519             }
       
  5520             
       
  5521             
       
  5522             ERROR;
       
  5523         }
       
  5524         
       
  5525     }/*function_word_to_dt*/
       
  5526     break;
       
  5527 
       
  5528 /****
       
  5529  *WORD_TO_TOD
       
  5530  */
       
  5531     case function_word_to_tod :
       
  5532     {
       
  5533         symbol_c *last_type_symbol = NULL;
       
  5534 
       
  5535         {
       
  5536             identifier_c param_name("IN");
       
  5537             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5538             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5539             
       
  5540             /* Get the value from a foo(<param_value>) style call */
       
  5541             if (IN_param_value == NULL)
       
  5542               IN_param_value = function_call_param_iterator.next();
       
  5543             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5544             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5545             
       
  5546             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5547             {
       
  5548         
       
  5549                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  5550                 return return_type_symbol;
       
  5551                 
       
  5552             }
       
  5553             
       
  5554             
       
  5555             ERROR;
       
  5556         }
       
  5557         
       
  5558     }/*function_word_to_tod*/
       
  5559     break;
       
  5560 
       
  5561 /****
       
  5562  *WORD_TO_UDINT
       
  5563  */
       
  5564     case function_word_to_udint :
       
  5565     {
       
  5566         symbol_c *last_type_symbol = NULL;
       
  5567 
       
  5568         {
       
  5569             identifier_c param_name("IN");
       
  5570             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5571             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5572             
       
  5573             /* Get the value from a foo(<param_value>) style call */
       
  5574             if (IN_param_value == NULL)
       
  5575               IN_param_value = function_call_param_iterator.next();
       
  5576             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5577             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5578             
       
  5579             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5580             {
       
  5581         
       
  5582                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  5583                 return return_type_symbol;
       
  5584                 
       
  5585             }
       
  5586             
       
  5587             
       
  5588             ERROR;
       
  5589         }
       
  5590         
       
  5591     }/*function_word_to_udint*/
       
  5592     break;
       
  5593 
       
  5594 /****
       
  5595  *WORD_TO_STRING
       
  5596  */
       
  5597     case function_word_to_string :
       
  5598     {
       
  5599         symbol_c *last_type_symbol = NULL;
       
  5600 
       
  5601         {
       
  5602             identifier_c param_name("IN");
       
  5603             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5604             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5605             
       
  5606             /* Get the value from a foo(<param_value>) style call */
       
  5607             if (IN_param_value == NULL)
       
  5608               IN_param_value = function_call_param_iterator.next();
       
  5609             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5610             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5611             
       
  5612             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5613             {
       
  5614         
       
  5615                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  5616                 return return_type_symbol;
       
  5617                 
       
  5618             }
       
  5619             
       
  5620             
       
  5621             ERROR;
       
  5622         }
       
  5623         
       
  5624     }/*function_word_to_string*/
       
  5625     break;
       
  5626 
       
  5627 /****
       
  5628  *WORD_TO_LWORD
       
  5629  */
       
  5630     case function_word_to_lword :
       
  5631     {
       
  5632         symbol_c *last_type_symbol = NULL;
       
  5633 
       
  5634         {
       
  5635             identifier_c param_name("IN");
       
  5636             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5637             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5638             
       
  5639             /* Get the value from a foo(<param_value>) style call */
       
  5640             if (IN_param_value == NULL)
       
  5641               IN_param_value = function_call_param_iterator.next();
       
  5642             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5643             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5644             
       
  5645             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5646             {
       
  5647         
       
  5648                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  5649                 return return_type_symbol;
       
  5650                 
       
  5651             }
       
  5652             
       
  5653             
       
  5654             ERROR;
       
  5655         }
       
  5656         
       
  5657     }/*function_word_to_lword*/
       
  5658     break;
       
  5659 
       
  5660 /****
       
  5661  *WORD_TO_UINT
       
  5662  */
       
  5663     case function_word_to_uint :
       
  5664     {
       
  5665         symbol_c *last_type_symbol = NULL;
       
  5666 
       
  5667         {
       
  5668             identifier_c param_name("IN");
       
  5669             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5670             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5671             
       
  5672             /* Get the value from a foo(<param_value>) style call */
       
  5673             if (IN_param_value == NULL)
       
  5674               IN_param_value = function_call_param_iterator.next();
       
  5675             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5676             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5677             
       
  5678             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5679             {
       
  5680         
       
  5681                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  5682                 return return_type_symbol;
       
  5683                 
       
  5684             }
       
  5685             
       
  5686             
       
  5687             ERROR;
       
  5688         }
       
  5689         
       
  5690     }/*function_word_to_uint*/
       
  5691     break;
       
  5692 
       
  5693 /****
       
  5694  *WORD_TO_LREAL
       
  5695  */
       
  5696     case function_word_to_lreal :
       
  5697     {
       
  5698         symbol_c *last_type_symbol = NULL;
       
  5699 
       
  5700         {
       
  5701             identifier_c param_name("IN");
       
  5702             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5703             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5704             
       
  5705             /* Get the value from a foo(<param_value>) style call */
       
  5706             if (IN_param_value == NULL)
       
  5707               IN_param_value = function_call_param_iterator.next();
       
  5708             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5709             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5710             
       
  5711             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5712             {
       
  5713         
       
  5714                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  5715                 return return_type_symbol;
       
  5716                 
       
  5717             }
       
  5718             
       
  5719             
       
  5720             ERROR;
       
  5721         }
       
  5722         
       
  5723     }/*function_word_to_lreal*/
       
  5724     break;
       
  5725 
       
  5726 /****
       
  5727  *WORD_TO_BYTE
       
  5728  */
       
  5729     case function_word_to_byte :
       
  5730     {
       
  5731         symbol_c *last_type_symbol = NULL;
       
  5732 
       
  5733         {
       
  5734             identifier_c param_name("IN");
       
  5735             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5736             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5737             
       
  5738             /* Get the value from a foo(<param_value>) style call */
       
  5739             if (IN_param_value == NULL)
       
  5740               IN_param_value = function_call_param_iterator.next();
       
  5741             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5742             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5743             
       
  5744             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5745             {
       
  5746         
       
  5747                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  5748                 return return_type_symbol;
       
  5749                 
       
  5750             }
       
  5751             
       
  5752             
       
  5753             ERROR;
       
  5754         }
       
  5755         
       
  5756     }/*function_word_to_byte*/
       
  5757     break;
       
  5758 
       
  5759 /****
       
  5760  *WORD_TO_USINT
       
  5761  */
       
  5762     case function_word_to_usint :
       
  5763     {
       
  5764         symbol_c *last_type_symbol = NULL;
       
  5765 
       
  5766         {
       
  5767             identifier_c param_name("IN");
       
  5768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5770             
       
  5771             /* Get the value from a foo(<param_value>) style call */
       
  5772             if (IN_param_value == NULL)
       
  5773               IN_param_value = function_call_param_iterator.next();
       
  5774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5776             
       
  5777             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5778             {
       
  5779         
       
  5780                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  5781                 return return_type_symbol;
       
  5782                 
       
  5783             }
       
  5784             
       
  5785             
       
  5786             ERROR;
       
  5787         }
       
  5788         
       
  5789     }/*function_word_to_usint*/
       
  5790     break;
       
  5791 
       
  5792 /****
       
  5793  *WORD_TO_ULINT
       
  5794  */
       
  5795     case function_word_to_ulint :
       
  5796     {
       
  5797         symbol_c *last_type_symbol = NULL;
       
  5798 
       
  5799         {
       
  5800             identifier_c param_name("IN");
       
  5801             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5802             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5803             
       
  5804             /* Get the value from a foo(<param_value>) style call */
       
  5805             if (IN_param_value == NULL)
       
  5806               IN_param_value = function_call_param_iterator.next();
       
  5807             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5808             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5809             
       
  5810             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5811             {
       
  5812         
       
  5813                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  5814                 return return_type_symbol;
       
  5815                 
       
  5816             }
       
  5817             
       
  5818             
       
  5819             ERROR;
       
  5820         }
       
  5821         
       
  5822     }/*function_word_to_ulint*/
       
  5823     break;
       
  5824 
       
  5825 /****
       
  5826  *WORD_TO_BOOL
       
  5827  */
       
  5828     case function_word_to_bool :
       
  5829     {
       
  5830         symbol_c *last_type_symbol = NULL;
       
  5831 
       
  5832         {
       
  5833             identifier_c param_name("IN");
       
  5834             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5835             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5836             
       
  5837             /* Get the value from a foo(<param_value>) style call */
       
  5838             if (IN_param_value == NULL)
       
  5839               IN_param_value = function_call_param_iterator.next();
       
  5840             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5841             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5842             
       
  5843             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5844             {
       
  5845         
       
  5846                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  5847                 return return_type_symbol;
       
  5848                 
       
  5849             }
       
  5850             
       
  5851             
       
  5852             ERROR;
       
  5853         }
       
  5854         
       
  5855     }/*function_word_to_bool*/
       
  5856     break;
       
  5857 
       
  5858 /****
       
  5859  *WORD_TO_TIME
       
  5860  */
       
  5861     case function_word_to_time :
       
  5862     {
       
  5863         symbol_c *last_type_symbol = NULL;
       
  5864 
       
  5865         {
       
  5866             identifier_c param_name("IN");
       
  5867             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5868             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5869             
       
  5870             /* Get the value from a foo(<param_value>) style call */
       
  5871             if (IN_param_value == NULL)
       
  5872               IN_param_value = function_call_param_iterator.next();
       
  5873             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5874             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5875             
       
  5876             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5877             {
       
  5878         
       
  5879                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  5880                 return return_type_symbol;
       
  5881                 
       
  5882             }
       
  5883             
       
  5884             
       
  5885             ERROR;
       
  5886         }
       
  5887         
       
  5888     }/*function_word_to_time*/
       
  5889     break;
       
  5890 
       
  5891 /****
       
  5892  *WORD_TO_INT
       
  5893  */
       
  5894     case function_word_to_int :
       
  5895     {
       
  5896         symbol_c *last_type_symbol = NULL;
       
  5897 
       
  5898         {
       
  5899             identifier_c param_name("IN");
       
  5900             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5901             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5902             
       
  5903             /* Get the value from a foo(<param_value>) style call */
       
  5904             if (IN_param_value == NULL)
       
  5905               IN_param_value = function_call_param_iterator.next();
       
  5906             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5907             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5908             
       
  5909             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  5910             {
       
  5911         
       
  5912                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  5913                 return return_type_symbol;
       
  5914                 
       
  5915             }
       
  5916             
       
  5917             
       
  5918             ERROR;
       
  5919         }
       
  5920         
       
  5921     }/*function_word_to_int*/
       
  5922     break;
       
  5923 
       
  5924 /****
       
  5925  *STRING_TO_REAL
       
  5926  */
       
  5927     case function_string_to_real :
       
  5928     {
       
  5929         symbol_c *last_type_symbol = NULL;
       
  5930 
       
  5931         {
       
  5932             identifier_c param_name("IN");
       
  5933             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5934             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5935             
       
  5936             /* Get the value from a foo(<param_value>) style call */
       
  5937             if (IN_param_value == NULL)
       
  5938               IN_param_value = function_call_param_iterator.next();
       
  5939             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5940             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5941             
       
  5942             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  5943             {
       
  5944         
       
  5945                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  5946                 return return_type_symbol;
       
  5947                 
       
  5948             }
       
  5949             
       
  5950             
       
  5951             ERROR;
       
  5952         }
       
  5953         
       
  5954     }/*function_string_to_real*/
       
  5955     break;
       
  5956 
       
  5957 /****
       
  5958  *STRING_TO_SINT
       
  5959  */
       
  5960     case function_string_to_sint :
       
  5961     {
       
  5962         symbol_c *last_type_symbol = NULL;
       
  5963 
       
  5964         {
       
  5965             identifier_c param_name("IN");
       
  5966             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  5967             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  5968             
       
  5969             /* Get the value from a foo(<param_value>) style call */
       
  5970             if (IN_param_value == NULL)
       
  5971               IN_param_value = function_call_param_iterator.next();
       
  5972             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  5973             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  5974             
       
  5975             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  5976             {
       
  5977         
       
  5978                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  5979                 return return_type_symbol;
       
  5980                 
       
  5981             }
       
  5982             
       
  5983             
       
  5984             ERROR;
       
  5985         }
       
  5986         
       
  5987     }/*function_string_to_sint*/
       
  5988     break;
       
  5989 
       
  5990 /****
       
  5991  *STRING_TO_LINT
       
  5992  */
       
  5993     case function_string_to_lint :
       
  5994     {
       
  5995         symbol_c *last_type_symbol = NULL;
       
  5996 
       
  5997         {
       
  5998             identifier_c param_name("IN");
       
  5999             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6000             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6001             
       
  6002             /* Get the value from a foo(<param_value>) style call */
       
  6003             if (IN_param_value == NULL)
       
  6004               IN_param_value = function_call_param_iterator.next();
       
  6005             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6006             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6007             
       
  6008             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6009             {
       
  6010         
       
  6011                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6012                 return return_type_symbol;
       
  6013                 
       
  6014             }
       
  6015             
       
  6016             
       
  6017             ERROR;
       
  6018         }
       
  6019         
       
  6020     }/*function_string_to_lint*/
       
  6021     break;
       
  6022 
       
  6023 /****
       
  6024  *STRING_TO_DINT
       
  6025  */
       
  6026     case function_string_to_dint :
       
  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::string_type_name, last_type_symbol))
       
  6042             {
       
  6043         
       
  6044                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6045                 return return_type_symbol;
       
  6046                 
       
  6047             }
       
  6048             
       
  6049             
       
  6050             ERROR;
       
  6051         }
       
  6052         
       
  6053     }/*function_string_to_dint*/
       
  6054     break;
       
  6055 
       
  6056 /****
       
  6057  *STRING_TO_DATE
       
  6058  */
       
  6059     case function_string_to_date :
       
  6060     {
       
  6061         symbol_c *last_type_symbol = NULL;
       
  6062 
       
  6063         {
       
  6064             identifier_c param_name("IN");
       
  6065             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6066             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6067             
       
  6068             /* Get the value from a foo(<param_value>) style call */
       
  6069             if (IN_param_value == NULL)
       
  6070               IN_param_value = function_call_param_iterator.next();
       
  6071             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6072             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6073             
       
  6074             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6075             {
       
  6076         
       
  6077                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6078                 return return_type_symbol;
       
  6079                 
       
  6080             }
       
  6081             
       
  6082             
       
  6083             ERROR;
       
  6084         }
       
  6085         
       
  6086     }/*function_string_to_date*/
       
  6087     break;
       
  6088 
       
  6089 /****
       
  6090  *STRING_TO_DWORD
       
  6091  */
       
  6092     case function_string_to_dword :
       
  6093     {
       
  6094         symbol_c *last_type_symbol = NULL;
       
  6095 
       
  6096         {
       
  6097             identifier_c param_name("IN");
       
  6098             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6099             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6100             
       
  6101             /* Get the value from a foo(<param_value>) style call */
       
  6102             if (IN_param_value == NULL)
       
  6103               IN_param_value = function_call_param_iterator.next();
       
  6104             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6105             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6106             
       
  6107             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6108             {
       
  6109         
       
  6110                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6111                 return return_type_symbol;
       
  6112                 
       
  6113             }
       
  6114             
       
  6115             
       
  6116             ERROR;
       
  6117         }
       
  6118         
       
  6119     }/*function_string_to_dword*/
       
  6120     break;
       
  6121 
       
  6122 /****
       
  6123  *STRING_TO_DT
       
  6124  */
       
  6125     case function_string_to_dt :
       
  6126     {
       
  6127         symbol_c *last_type_symbol = NULL;
       
  6128 
       
  6129         {
       
  6130             identifier_c param_name("IN");
       
  6131             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6132             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6133             
       
  6134             /* Get the value from a foo(<param_value>) style call */
       
  6135             if (IN_param_value == NULL)
       
  6136               IN_param_value = function_call_param_iterator.next();
       
  6137             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6138             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6139             
       
  6140             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6141             {
       
  6142         
       
  6143                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6144                 return return_type_symbol;
       
  6145                 
       
  6146             }
       
  6147             
       
  6148             
       
  6149             ERROR;
       
  6150         }
       
  6151         
       
  6152     }/*function_string_to_dt*/
       
  6153     break;
       
  6154 
       
  6155 /****
       
  6156  *STRING_TO_TOD
       
  6157  */
       
  6158     case function_string_to_tod :
       
  6159     {
       
  6160         symbol_c *last_type_symbol = NULL;
       
  6161 
       
  6162         {
       
  6163             identifier_c param_name("IN");
       
  6164             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6165             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6166             
       
  6167             /* Get the value from a foo(<param_value>) style call */
       
  6168             if (IN_param_value == NULL)
       
  6169               IN_param_value = function_call_param_iterator.next();
       
  6170             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6171             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6172             
       
  6173             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6174             {
       
  6175         
       
  6176                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6177                 return return_type_symbol;
       
  6178                 
       
  6179             }
       
  6180             
       
  6181             
       
  6182             ERROR;
       
  6183         }
       
  6184         
       
  6185     }/*function_string_to_tod*/
       
  6186     break;
       
  6187 
       
  6188 /****
       
  6189  *STRING_TO_UDINT
       
  6190  */
       
  6191     case function_string_to_udint :
       
  6192     {
       
  6193         symbol_c *last_type_symbol = NULL;
       
  6194 
       
  6195         {
       
  6196             identifier_c param_name("IN");
       
  6197             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6198             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6199             
       
  6200             /* Get the value from a foo(<param_value>) style call */
       
  6201             if (IN_param_value == NULL)
       
  6202               IN_param_value = function_call_param_iterator.next();
       
  6203             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6204             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6205             
       
  6206             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6207             {
       
  6208         
       
  6209                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6210                 return return_type_symbol;
       
  6211                 
       
  6212             }
       
  6213             
       
  6214             
       
  6215             ERROR;
       
  6216         }
       
  6217         
       
  6218     }/*function_string_to_udint*/
       
  6219     break;
       
  6220 
       
  6221 /****
       
  6222  *STRING_TO_WORD
       
  6223  */
       
  6224     case function_string_to_word :
       
  6225     {
       
  6226         symbol_c *last_type_symbol = NULL;
       
  6227 
       
  6228         {
       
  6229             identifier_c param_name("IN");
       
  6230             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6231             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6232             
       
  6233             /* Get the value from a foo(<param_value>) style call */
       
  6234             if (IN_param_value == NULL)
       
  6235               IN_param_value = function_call_param_iterator.next();
       
  6236             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6237             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6238             
       
  6239             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6240             {
       
  6241         
       
  6242                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6243                 return return_type_symbol;
       
  6244                 
       
  6245             }
       
  6246             
       
  6247             
       
  6248             ERROR;
       
  6249         }
       
  6250         
       
  6251     }/*function_string_to_word*/
       
  6252     break;
       
  6253 
       
  6254 /****
       
  6255  *STRING_TO_LWORD
       
  6256  */
       
  6257     case function_string_to_lword :
       
  6258     {
       
  6259         symbol_c *last_type_symbol = NULL;
       
  6260 
       
  6261         {
       
  6262             identifier_c param_name("IN");
       
  6263             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6264             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6265             
       
  6266             /* Get the value from a foo(<param_value>) style call */
       
  6267             if (IN_param_value == NULL)
       
  6268               IN_param_value = function_call_param_iterator.next();
       
  6269             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6270             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6271             
       
  6272             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6273             {
       
  6274         
       
  6275                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  6276                 return return_type_symbol;
       
  6277                 
       
  6278             }
       
  6279             
       
  6280             
       
  6281             ERROR;
       
  6282         }
       
  6283         
       
  6284     }/*function_string_to_lword*/
       
  6285     break;
       
  6286 
       
  6287 /****
       
  6288  *STRING_TO_UINT
       
  6289  */
       
  6290     case function_string_to_uint :
       
  6291     {
       
  6292         symbol_c *last_type_symbol = NULL;
       
  6293 
       
  6294         {
       
  6295             identifier_c param_name("IN");
       
  6296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6298             
       
  6299             /* Get the value from a foo(<param_value>) style call */
       
  6300             if (IN_param_value == NULL)
       
  6301               IN_param_value = function_call_param_iterator.next();
       
  6302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6304             
       
  6305             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6306             {
       
  6307         
       
  6308                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6309                 return return_type_symbol;
       
  6310                 
       
  6311             }
       
  6312             
       
  6313             
       
  6314             ERROR;
       
  6315         }
       
  6316         
       
  6317     }/*function_string_to_uint*/
       
  6318     break;
       
  6319 
       
  6320 /****
       
  6321  *STRING_TO_LREAL
       
  6322  */
       
  6323     case function_string_to_lreal :
       
  6324     {
       
  6325         symbol_c *last_type_symbol = NULL;
       
  6326 
       
  6327         {
       
  6328             identifier_c param_name("IN");
       
  6329             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6330             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6331             
       
  6332             /* Get the value from a foo(<param_value>) style call */
       
  6333             if (IN_param_value == NULL)
       
  6334               IN_param_value = function_call_param_iterator.next();
       
  6335             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6336             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6337             
       
  6338             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6339             {
       
  6340         
       
  6341                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6342                 return return_type_symbol;
       
  6343                 
       
  6344             }
       
  6345             
       
  6346             
       
  6347             ERROR;
       
  6348         }
       
  6349         
       
  6350     }/*function_string_to_lreal*/
       
  6351     break;
       
  6352 
       
  6353 /****
       
  6354  *STRING_TO_BYTE
       
  6355  */
       
  6356     case function_string_to_byte :
       
  6357     {
       
  6358         symbol_c *last_type_symbol = NULL;
       
  6359 
       
  6360         {
       
  6361             identifier_c param_name("IN");
       
  6362             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6363             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6364             
       
  6365             /* Get the value from a foo(<param_value>) style call */
       
  6366             if (IN_param_value == NULL)
       
  6367               IN_param_value = function_call_param_iterator.next();
       
  6368             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6369             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6370             
       
  6371             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6372             {
       
  6373         
       
  6374                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  6375                 return return_type_symbol;
       
  6376                 
       
  6377             }
       
  6378             
       
  6379             
       
  6380             ERROR;
       
  6381         }
       
  6382         
       
  6383     }/*function_string_to_byte*/
       
  6384     break;
       
  6385 
       
  6386 /****
       
  6387  *STRING_TO_USINT
       
  6388  */
       
  6389     case function_string_to_usint :
       
  6390     {
       
  6391         symbol_c *last_type_symbol = NULL;
       
  6392 
       
  6393         {
       
  6394             identifier_c param_name("IN");
       
  6395             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6396             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6397             
       
  6398             /* Get the value from a foo(<param_value>) style call */
       
  6399             if (IN_param_value == NULL)
       
  6400               IN_param_value = function_call_param_iterator.next();
       
  6401             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6402             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6403             
       
  6404             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6405             {
       
  6406         
       
  6407                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6408                 return return_type_symbol;
       
  6409                 
       
  6410             }
       
  6411             
       
  6412             
       
  6413             ERROR;
       
  6414         }
       
  6415         
       
  6416     }/*function_string_to_usint*/
       
  6417     break;
       
  6418 
       
  6419 /****
       
  6420  *STRING_TO_ULINT
       
  6421  */
       
  6422     case function_string_to_ulint :
       
  6423     {
       
  6424         symbol_c *last_type_symbol = NULL;
       
  6425 
       
  6426         {
       
  6427             identifier_c param_name("IN");
       
  6428             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6429             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6430             
       
  6431             /* Get the value from a foo(<param_value>) style call */
       
  6432             if (IN_param_value == NULL)
       
  6433               IN_param_value = function_call_param_iterator.next();
       
  6434             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6435             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6436             
       
  6437             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6438             {
       
  6439         
       
  6440                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6441                 return return_type_symbol;
       
  6442                 
       
  6443             }
       
  6444             
       
  6445             
       
  6446             ERROR;
       
  6447         }
       
  6448         
       
  6449     }/*function_string_to_ulint*/
       
  6450     break;
       
  6451 
       
  6452 /****
       
  6453  *STRING_TO_BOOL
       
  6454  */
       
  6455     case function_string_to_bool :
       
  6456     {
       
  6457         symbol_c *last_type_symbol = NULL;
       
  6458 
       
  6459         {
       
  6460             identifier_c param_name("IN");
       
  6461             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6462             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6463             
       
  6464             /* Get the value from a foo(<param_value>) style call */
       
  6465             if (IN_param_value == NULL)
       
  6466               IN_param_value = function_call_param_iterator.next();
       
  6467             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6468             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6469             
       
  6470             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6471             {
       
  6472         
       
  6473                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  6474                 return return_type_symbol;
       
  6475                 
       
  6476             }
       
  6477             
       
  6478             
       
  6479             ERROR;
       
  6480         }
       
  6481         
       
  6482     }/*function_string_to_bool*/
       
  6483     break;
       
  6484 
       
  6485 /****
       
  6486  *STRING_TO_TIME
       
  6487  */
       
  6488     case function_string_to_time :
       
  6489     {
       
  6490         symbol_c *last_type_symbol = NULL;
       
  6491 
       
  6492         {
       
  6493             identifier_c param_name("IN");
       
  6494             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6495             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6496             
       
  6497             /* Get the value from a foo(<param_value>) style call */
       
  6498             if (IN_param_value == NULL)
       
  6499               IN_param_value = function_call_param_iterator.next();
       
  6500             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6501             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6502             
       
  6503             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6504             {
       
  6505         
       
  6506                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  6507                 return return_type_symbol;
       
  6508                 
       
  6509             }
       
  6510             
       
  6511             
       
  6512             ERROR;
       
  6513         }
       
  6514         
       
  6515     }/*function_string_to_time*/
       
  6516     break;
       
  6517 
       
  6518 /****
       
  6519  *STRING_TO_INT
       
  6520  */
       
  6521     case function_string_to_int :
       
  6522     {
       
  6523         symbol_c *last_type_symbol = NULL;
       
  6524 
       
  6525         {
       
  6526             identifier_c param_name("IN");
       
  6527             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6528             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6529             
       
  6530             /* Get the value from a foo(<param_value>) style call */
       
  6531             if (IN_param_value == NULL)
       
  6532               IN_param_value = function_call_param_iterator.next();
       
  6533             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6534             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6535             
       
  6536             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  6537             {
       
  6538         
       
  6539                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6540                 return return_type_symbol;
       
  6541                 
       
  6542             }
       
  6543             
       
  6544             
       
  6545             ERROR;
       
  6546         }
       
  6547         
       
  6548     }/*function_string_to_int*/
       
  6549     break;
       
  6550 
       
  6551 /****
       
  6552  *LWORD_TO_REAL
       
  6553  */
       
  6554     case function_lword_to_real :
       
  6555     {
       
  6556         symbol_c *last_type_symbol = NULL;
       
  6557 
       
  6558         {
       
  6559             identifier_c param_name("IN");
       
  6560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6562             
       
  6563             /* Get the value from a foo(<param_value>) style call */
       
  6564             if (IN_param_value == NULL)
       
  6565               IN_param_value = function_call_param_iterator.next();
       
  6566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6568             
       
  6569             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6570             {
       
  6571         
       
  6572                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6573                 return return_type_symbol;
       
  6574                 
       
  6575             }
       
  6576             
       
  6577             
       
  6578             ERROR;
       
  6579         }
       
  6580         
       
  6581     }/*function_lword_to_real*/
       
  6582     break;
       
  6583 
       
  6584 /****
       
  6585  *LWORD_TO_SINT
       
  6586  */
       
  6587     case function_lword_to_sint :
       
  6588     {
       
  6589         symbol_c *last_type_symbol = NULL;
       
  6590 
       
  6591         {
       
  6592             identifier_c param_name("IN");
       
  6593             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6594             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6595             
       
  6596             /* Get the value from a foo(<param_value>) style call */
       
  6597             if (IN_param_value == NULL)
       
  6598               IN_param_value = function_call_param_iterator.next();
       
  6599             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6600             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6601             
       
  6602             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6603             {
       
  6604         
       
  6605                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6606                 return return_type_symbol;
       
  6607                 
       
  6608             }
       
  6609             
       
  6610             
       
  6611             ERROR;
       
  6612         }
       
  6613         
       
  6614     }/*function_lword_to_sint*/
       
  6615     break;
       
  6616 
       
  6617 /****
       
  6618  *LWORD_TO_LINT
       
  6619  */
       
  6620     case function_lword_to_lint :
       
  6621     {
       
  6622         symbol_c *last_type_symbol = NULL;
       
  6623 
       
  6624         {
       
  6625             identifier_c param_name("IN");
       
  6626             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6627             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6628             
       
  6629             /* Get the value from a foo(<param_value>) style call */
       
  6630             if (IN_param_value == NULL)
       
  6631               IN_param_value = function_call_param_iterator.next();
       
  6632             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6633             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6634             
       
  6635             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6636             {
       
  6637         
       
  6638                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6639                 return return_type_symbol;
       
  6640                 
       
  6641             }
       
  6642             
       
  6643             
       
  6644             ERROR;
       
  6645         }
       
  6646         
       
  6647     }/*function_lword_to_lint*/
       
  6648     break;
       
  6649 
       
  6650 /****
       
  6651  *LWORD_TO_DINT
       
  6652  */
       
  6653     case function_lword_to_dint :
       
  6654     {
       
  6655         symbol_c *last_type_symbol = NULL;
       
  6656 
       
  6657         {
       
  6658             identifier_c param_name("IN");
       
  6659             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6660             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6661             
       
  6662             /* Get the value from a foo(<param_value>) style call */
       
  6663             if (IN_param_value == NULL)
       
  6664               IN_param_value = function_call_param_iterator.next();
       
  6665             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6666             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6667             
       
  6668             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6669             {
       
  6670         
       
  6671                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6672                 return return_type_symbol;
       
  6673                 
       
  6674             }
       
  6675             
       
  6676             
       
  6677             ERROR;
       
  6678         }
       
  6679         
       
  6680     }/*function_lword_to_dint*/
       
  6681     break;
       
  6682 
       
  6683 /****
       
  6684  *LWORD_TO_DATE
       
  6685  */
       
  6686     case function_lword_to_date :
       
  6687     {
       
  6688         symbol_c *last_type_symbol = NULL;
       
  6689 
       
  6690         {
       
  6691             identifier_c param_name("IN");
       
  6692             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6693             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6694             
       
  6695             /* Get the value from a foo(<param_value>) style call */
       
  6696             if (IN_param_value == NULL)
       
  6697               IN_param_value = function_call_param_iterator.next();
       
  6698             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6699             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6700             
       
  6701             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6702             {
       
  6703         
       
  6704                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  6705                 return return_type_symbol;
       
  6706                 
       
  6707             }
       
  6708             
       
  6709             
       
  6710             ERROR;
       
  6711         }
       
  6712         
       
  6713     }/*function_lword_to_date*/
       
  6714     break;
       
  6715 
       
  6716 /****
       
  6717  *LWORD_TO_DWORD
       
  6718  */
       
  6719     case function_lword_to_dword :
       
  6720     {
       
  6721         symbol_c *last_type_symbol = NULL;
       
  6722 
       
  6723         {
       
  6724             identifier_c param_name("IN");
       
  6725             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6726             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6727             
       
  6728             /* Get the value from a foo(<param_value>) style call */
       
  6729             if (IN_param_value == NULL)
       
  6730               IN_param_value = function_call_param_iterator.next();
       
  6731             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6732             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6733             
       
  6734             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6735             {
       
  6736         
       
  6737                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  6738                 return return_type_symbol;
       
  6739                 
       
  6740             }
       
  6741             
       
  6742             
       
  6743             ERROR;
       
  6744         }
       
  6745         
       
  6746     }/*function_lword_to_dword*/
       
  6747     break;
       
  6748 
       
  6749 /****
       
  6750  *LWORD_TO_DT
       
  6751  */
       
  6752     case function_lword_to_dt :
       
  6753     {
       
  6754         symbol_c *last_type_symbol = NULL;
       
  6755 
       
  6756         {
       
  6757             identifier_c param_name("IN");
       
  6758             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6759             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6760             
       
  6761             /* Get the value from a foo(<param_value>) style call */
       
  6762             if (IN_param_value == NULL)
       
  6763               IN_param_value = function_call_param_iterator.next();
       
  6764             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6765             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6766             
       
  6767             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6768             {
       
  6769         
       
  6770                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  6771                 return return_type_symbol;
       
  6772                 
       
  6773             }
       
  6774             
       
  6775             
       
  6776             ERROR;
       
  6777         }
       
  6778         
       
  6779     }/*function_lword_to_dt*/
       
  6780     break;
       
  6781 
       
  6782 /****
       
  6783  *LWORD_TO_TOD
       
  6784  */
       
  6785     case function_lword_to_tod :
       
  6786     {
       
  6787         symbol_c *last_type_symbol = NULL;
       
  6788 
       
  6789         {
       
  6790             identifier_c param_name("IN");
       
  6791             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6792             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6793             
       
  6794             /* Get the value from a foo(<param_value>) style call */
       
  6795             if (IN_param_value == NULL)
       
  6796               IN_param_value = function_call_param_iterator.next();
       
  6797             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6798             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6799             
       
  6800             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6801             {
       
  6802         
       
  6803                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  6804                 return return_type_symbol;
       
  6805                 
       
  6806             }
       
  6807             
       
  6808             
       
  6809             ERROR;
       
  6810         }
       
  6811         
       
  6812     }/*function_lword_to_tod*/
       
  6813     break;
       
  6814 
       
  6815 /****
       
  6816  *LWORD_TO_UDINT
       
  6817  */
       
  6818     case function_lword_to_udint :
       
  6819     {
       
  6820         symbol_c *last_type_symbol = NULL;
       
  6821 
       
  6822         {
       
  6823             identifier_c param_name("IN");
       
  6824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6826             
       
  6827             /* Get the value from a foo(<param_value>) style call */
       
  6828             if (IN_param_value == NULL)
       
  6829               IN_param_value = function_call_param_iterator.next();
       
  6830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6832             
       
  6833             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6834             {
       
  6835         
       
  6836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6837                 return return_type_symbol;
       
  6838                 
       
  6839             }
       
  6840             
       
  6841             
       
  6842             ERROR;
       
  6843         }
       
  6844         
       
  6845     }/*function_lword_to_udint*/
       
  6846     break;
       
  6847 
       
  6848 /****
       
  6849  *LWORD_TO_WORD
       
  6850  */
       
  6851     case function_lword_to_word :
       
  6852     {
       
  6853         symbol_c *last_type_symbol = NULL;
       
  6854 
       
  6855         {
       
  6856             identifier_c param_name("IN");
       
  6857             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6858             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6859             
       
  6860             /* Get the value from a foo(<param_value>) style call */
       
  6861             if (IN_param_value == NULL)
       
  6862               IN_param_value = function_call_param_iterator.next();
       
  6863             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6864             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6865             
       
  6866             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6867             {
       
  6868         
       
  6869                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  6870                 return return_type_symbol;
       
  6871                 
       
  6872             }
       
  6873             
       
  6874             
       
  6875             ERROR;
       
  6876         }
       
  6877         
       
  6878     }/*function_lword_to_word*/
       
  6879     break;
       
  6880 
       
  6881 /****
       
  6882  *LWORD_TO_STRING
       
  6883  */
       
  6884     case function_lword_to_string :
       
  6885     {
       
  6886         symbol_c *last_type_symbol = NULL;
       
  6887 
       
  6888         {
       
  6889             identifier_c param_name("IN");
       
  6890             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6891             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6892             
       
  6893             /* Get the value from a foo(<param_value>) style call */
       
  6894             if (IN_param_value == NULL)
       
  6895               IN_param_value = function_call_param_iterator.next();
       
  6896             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6897             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6898             
       
  6899             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6900             {
       
  6901         
       
  6902                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  6903                 return return_type_symbol;
       
  6904                 
       
  6905             }
       
  6906             
       
  6907             
       
  6908             ERROR;
       
  6909         }
       
  6910         
       
  6911     }/*function_lword_to_string*/
       
  6912     break;
       
  6913 
       
  6914 /****
       
  6915  *LWORD_TO_UINT
       
  6916  */
       
  6917     case function_lword_to_uint :
       
  6918     {
       
  6919         symbol_c *last_type_symbol = NULL;
       
  6920 
       
  6921         {
       
  6922             identifier_c param_name("IN");
       
  6923             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6924             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6925             
       
  6926             /* Get the value from a foo(<param_value>) style call */
       
  6927             if (IN_param_value == NULL)
       
  6928               IN_param_value = function_call_param_iterator.next();
       
  6929             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6930             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6931             
       
  6932             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6933             {
       
  6934         
       
  6935                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6936                 return return_type_symbol;
       
  6937                 
       
  6938             }
       
  6939             
       
  6940             
       
  6941             ERROR;
       
  6942         }
       
  6943         
       
  6944     }/*function_lword_to_uint*/
       
  6945     break;
       
  6946 
       
  6947 /****
       
  6948  *LWORD_TO_LREAL
       
  6949  */
       
  6950     case function_lword_to_lreal :
       
  6951     {
       
  6952         symbol_c *last_type_symbol = NULL;
       
  6953 
       
  6954         {
       
  6955             identifier_c param_name("IN");
       
  6956             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6957             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6958             
       
  6959             /* Get the value from a foo(<param_value>) style call */
       
  6960             if (IN_param_value == NULL)
       
  6961               IN_param_value = function_call_param_iterator.next();
       
  6962             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6963             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6964             
       
  6965             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6966             {
       
  6967         
       
  6968                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  6969                 return return_type_symbol;
       
  6970                 
       
  6971             }
       
  6972             
       
  6973             
       
  6974             ERROR;
       
  6975         }
       
  6976         
       
  6977     }/*function_lword_to_lreal*/
       
  6978     break;
       
  6979 
       
  6980 /****
       
  6981  *LWORD_TO_BYTE
       
  6982  */
       
  6983     case function_lword_to_byte :
       
  6984     {
       
  6985         symbol_c *last_type_symbol = NULL;
       
  6986 
       
  6987         {
       
  6988             identifier_c param_name("IN");
       
  6989             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6990             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6991             
       
  6992             /* Get the value from a foo(<param_value>) style call */
       
  6993             if (IN_param_value == NULL)
       
  6994               IN_param_value = function_call_param_iterator.next();
       
  6995             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6996             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6997             
       
  6998             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  6999             {
       
  7000         
       
  7001                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7002                 return return_type_symbol;
       
  7003                 
       
  7004             }
       
  7005             
       
  7006             
       
  7007             ERROR;
       
  7008         }
       
  7009         
       
  7010     }/*function_lword_to_byte*/
       
  7011     break;
       
  7012 
       
  7013 /****
       
  7014  *LWORD_TO_USINT
       
  7015  */
       
  7016     case function_lword_to_usint :
       
  7017     {
       
  7018         symbol_c *last_type_symbol = NULL;
       
  7019 
       
  7020         {
       
  7021             identifier_c param_name("IN");
       
  7022             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7023             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7024             
       
  7025             /* Get the value from a foo(<param_value>) style call */
       
  7026             if (IN_param_value == NULL)
       
  7027               IN_param_value = function_call_param_iterator.next();
       
  7028             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7029             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7030             
       
  7031             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7032             {
       
  7033         
       
  7034                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7035                 return return_type_symbol;
       
  7036                 
       
  7037             }
       
  7038             
       
  7039             
       
  7040             ERROR;
       
  7041         }
       
  7042         
       
  7043     }/*function_lword_to_usint*/
       
  7044     break;
       
  7045 
       
  7046 /****
       
  7047  *LWORD_TO_ULINT
       
  7048  */
       
  7049     case function_lword_to_ulint :
       
  7050     {
       
  7051         symbol_c *last_type_symbol = NULL;
       
  7052 
       
  7053         {
       
  7054             identifier_c param_name("IN");
       
  7055             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7056             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7057             
       
  7058             /* Get the value from a foo(<param_value>) style call */
       
  7059             if (IN_param_value == NULL)
       
  7060               IN_param_value = function_call_param_iterator.next();
       
  7061             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7062             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7063             
       
  7064             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7065             {
       
  7066         
       
  7067                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7068                 return return_type_symbol;
       
  7069                 
       
  7070             }
       
  7071             
       
  7072             
       
  7073             ERROR;
       
  7074         }
       
  7075         
       
  7076     }/*function_lword_to_ulint*/
       
  7077     break;
       
  7078 
       
  7079 /****
       
  7080  *LWORD_TO_BOOL
       
  7081  */
       
  7082     case function_lword_to_bool :
       
  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::lword_type_name, last_type_symbol))
       
  7098             {
       
  7099         
       
  7100                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7101                 return return_type_symbol;
       
  7102                 
       
  7103             }
       
  7104             
       
  7105             
       
  7106             ERROR;
       
  7107         }
       
  7108         
       
  7109     }/*function_lword_to_bool*/
       
  7110     break;
       
  7111 
       
  7112 /****
       
  7113  *LWORD_TO_TIME
       
  7114  */
       
  7115     case function_lword_to_time :
       
  7116     {
       
  7117         symbol_c *last_type_symbol = NULL;
       
  7118 
       
  7119         {
       
  7120             identifier_c param_name("IN");
       
  7121             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7122             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7123             
       
  7124             /* Get the value from a foo(<param_value>) style call */
       
  7125             if (IN_param_value == NULL)
       
  7126               IN_param_value = function_call_param_iterator.next();
       
  7127             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7128             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7129             
       
  7130             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7131             {
       
  7132         
       
  7133                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7134                 return return_type_symbol;
       
  7135                 
       
  7136             }
       
  7137             
       
  7138             
       
  7139             ERROR;
       
  7140         }
       
  7141         
       
  7142     }/*function_lword_to_time*/
       
  7143     break;
       
  7144 
       
  7145 /****
       
  7146  *LWORD_TO_INT
       
  7147  */
       
  7148     case function_lword_to_int :
       
  7149     {
       
  7150         symbol_c *last_type_symbol = NULL;
       
  7151 
       
  7152         {
       
  7153             identifier_c param_name("IN");
       
  7154             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7155             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7156             
       
  7157             /* Get the value from a foo(<param_value>) style call */
       
  7158             if (IN_param_value == NULL)
       
  7159               IN_param_value = function_call_param_iterator.next();
       
  7160             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7161             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7162             
       
  7163             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
  7164             {
       
  7165         
       
  7166                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7167                 return return_type_symbol;
       
  7168                 
       
  7169             }
       
  7170             
       
  7171             
       
  7172             ERROR;
       
  7173         }
       
  7174         
       
  7175     }/*function_lword_to_int*/
       
  7176     break;
       
  7177 
       
  7178 /****
       
  7179  *UINT_TO_REAL
       
  7180  */
       
  7181     case function_uint_to_real :
       
  7182     {
       
  7183         symbol_c *last_type_symbol = NULL;
       
  7184 
       
  7185         {
       
  7186             identifier_c param_name("IN");
       
  7187             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7188             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7189             
       
  7190             /* Get the value from a foo(<param_value>) style call */
       
  7191             if (IN_param_value == NULL)
       
  7192               IN_param_value = function_call_param_iterator.next();
       
  7193             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7194             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7195             
       
  7196             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7197             {
       
  7198         
       
  7199                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7200                 return return_type_symbol;
       
  7201                 
       
  7202             }
       
  7203             
       
  7204             
       
  7205             ERROR;
       
  7206         }
       
  7207         
       
  7208     }/*function_uint_to_real*/
       
  7209     break;
       
  7210 
       
  7211 /****
       
  7212  *UINT_TO_SINT
       
  7213  */
       
  7214     case function_uint_to_sint :
       
  7215     {
       
  7216         symbol_c *last_type_symbol = NULL;
       
  7217 
       
  7218         {
       
  7219             identifier_c param_name("IN");
       
  7220             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7221             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7222             
       
  7223             /* Get the value from a foo(<param_value>) style call */
       
  7224             if (IN_param_value == NULL)
       
  7225               IN_param_value = function_call_param_iterator.next();
       
  7226             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7227             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7228             
       
  7229             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7230             {
       
  7231         
       
  7232                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7233                 return return_type_symbol;
       
  7234                 
       
  7235             }
       
  7236             
       
  7237             
       
  7238             ERROR;
       
  7239         }
       
  7240         
       
  7241     }/*function_uint_to_sint*/
       
  7242     break;
       
  7243 
       
  7244 /****
       
  7245  *UINT_TO_LINT
       
  7246  */
       
  7247     case function_uint_to_lint :
       
  7248     {
       
  7249         symbol_c *last_type_symbol = NULL;
       
  7250 
       
  7251         {
       
  7252             identifier_c param_name("IN");
       
  7253             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7254             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7255             
       
  7256             /* Get the value from a foo(<param_value>) style call */
       
  7257             if (IN_param_value == NULL)
       
  7258               IN_param_value = function_call_param_iterator.next();
       
  7259             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7260             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7261             
       
  7262             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7263             {
       
  7264         
       
  7265                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7266                 return return_type_symbol;
       
  7267                 
       
  7268             }
       
  7269             
       
  7270             
       
  7271             ERROR;
       
  7272         }
       
  7273         
       
  7274     }/*function_uint_to_lint*/
       
  7275     break;
       
  7276 
       
  7277 /****
       
  7278  *UINT_TO_DINT
       
  7279  */
       
  7280     case function_uint_to_dint :
       
  7281     {
       
  7282         symbol_c *last_type_symbol = NULL;
       
  7283 
       
  7284         {
       
  7285             identifier_c param_name("IN");
       
  7286             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7287             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7288             
       
  7289             /* Get the value from a foo(<param_value>) style call */
       
  7290             if (IN_param_value == NULL)
       
  7291               IN_param_value = function_call_param_iterator.next();
       
  7292             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7293             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7294             
       
  7295             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7296             {
       
  7297         
       
  7298                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7299                 return return_type_symbol;
       
  7300                 
       
  7301             }
       
  7302             
       
  7303             
       
  7304             ERROR;
       
  7305         }
       
  7306         
       
  7307     }/*function_uint_to_dint*/
       
  7308     break;
       
  7309 
       
  7310 /****
       
  7311  *UINT_TO_DATE
       
  7312  */
       
  7313     case function_uint_to_date :
       
  7314     {
       
  7315         symbol_c *last_type_symbol = NULL;
       
  7316 
       
  7317         {
       
  7318             identifier_c param_name("IN");
       
  7319             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7320             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7321             
       
  7322             /* Get the value from a foo(<param_value>) style call */
       
  7323             if (IN_param_value == NULL)
       
  7324               IN_param_value = function_call_param_iterator.next();
       
  7325             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7326             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7327             
       
  7328             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7329             {
       
  7330         
       
  7331                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7332                 return return_type_symbol;
       
  7333                 
       
  7334             }
       
  7335             
       
  7336             
       
  7337             ERROR;
       
  7338         }
       
  7339         
       
  7340     }/*function_uint_to_date*/
       
  7341     break;
       
  7342 
       
  7343 /****
       
  7344  *UINT_TO_DWORD
       
  7345  */
       
  7346     case function_uint_to_dword :
       
  7347     {
       
  7348         symbol_c *last_type_symbol = NULL;
       
  7349 
       
  7350         {
       
  7351             identifier_c param_name("IN");
       
  7352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7354             
       
  7355             /* Get the value from a foo(<param_value>) style call */
       
  7356             if (IN_param_value == NULL)
       
  7357               IN_param_value = function_call_param_iterator.next();
       
  7358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7360             
       
  7361             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7362             {
       
  7363         
       
  7364                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7365                 return return_type_symbol;
       
  7366                 
       
  7367             }
       
  7368             
       
  7369             
       
  7370             ERROR;
       
  7371         }
       
  7372         
       
  7373     }/*function_uint_to_dword*/
       
  7374     break;
       
  7375 
       
  7376 /****
       
  7377  *UINT_TO_DT
       
  7378  */
       
  7379     case function_uint_to_dt :
       
  7380     {
       
  7381         symbol_c *last_type_symbol = NULL;
       
  7382 
       
  7383         {
       
  7384             identifier_c param_name("IN");
       
  7385             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7386             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7387             
       
  7388             /* Get the value from a foo(<param_value>) style call */
       
  7389             if (IN_param_value == NULL)
       
  7390               IN_param_value = function_call_param_iterator.next();
       
  7391             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7392             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7393             
       
  7394             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7395             {
       
  7396         
       
  7397                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  7398                 return return_type_symbol;
       
  7399                 
       
  7400             }
       
  7401             
       
  7402             
       
  7403             ERROR;
       
  7404         }
       
  7405         
       
  7406     }/*function_uint_to_dt*/
       
  7407     break;
       
  7408 
       
  7409 /****
       
  7410  *UINT_TO_TOD
       
  7411  */
       
  7412     case function_uint_to_tod :
       
  7413     {
       
  7414         symbol_c *last_type_symbol = NULL;
       
  7415 
       
  7416         {
       
  7417             identifier_c param_name("IN");
       
  7418             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7419             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7420             
       
  7421             /* Get the value from a foo(<param_value>) style call */
       
  7422             if (IN_param_value == NULL)
       
  7423               IN_param_value = function_call_param_iterator.next();
       
  7424             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7425             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7426             
       
  7427             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7428             {
       
  7429         
       
  7430                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  7431                 return return_type_symbol;
       
  7432                 
       
  7433             }
       
  7434             
       
  7435             
       
  7436             ERROR;
       
  7437         }
       
  7438         
       
  7439     }/*function_uint_to_tod*/
       
  7440     break;
       
  7441 
       
  7442 /****
       
  7443  *UINT_TO_UDINT
       
  7444  */
       
  7445     case function_uint_to_udint :
       
  7446     {
       
  7447         symbol_c *last_type_symbol = NULL;
       
  7448 
       
  7449         {
       
  7450             identifier_c param_name("IN");
       
  7451             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7452             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7453             
       
  7454             /* Get the value from a foo(<param_value>) style call */
       
  7455             if (IN_param_value == NULL)
       
  7456               IN_param_value = function_call_param_iterator.next();
       
  7457             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7458             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7459             
       
  7460             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7461             {
       
  7462         
       
  7463                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7464                 return return_type_symbol;
       
  7465                 
       
  7466             }
       
  7467             
       
  7468             
       
  7469             ERROR;
       
  7470         }
       
  7471         
       
  7472     }/*function_uint_to_udint*/
       
  7473     break;
       
  7474 
       
  7475 /****
       
  7476  *UINT_TO_WORD
       
  7477  */
       
  7478     case function_uint_to_word :
       
  7479     {
       
  7480         symbol_c *last_type_symbol = NULL;
       
  7481 
       
  7482         {
       
  7483             identifier_c param_name("IN");
       
  7484             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7485             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7486             
       
  7487             /* Get the value from a foo(<param_value>) style call */
       
  7488             if (IN_param_value == NULL)
       
  7489               IN_param_value = function_call_param_iterator.next();
       
  7490             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7491             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7492             
       
  7493             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7494             {
       
  7495         
       
  7496                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7497                 return return_type_symbol;
       
  7498                 
       
  7499             }
       
  7500             
       
  7501             
       
  7502             ERROR;
       
  7503         }
       
  7504         
       
  7505     }/*function_uint_to_word*/
       
  7506     break;
       
  7507 
       
  7508 /****
       
  7509  *UINT_TO_STRING
       
  7510  */
       
  7511     case function_uint_to_string :
       
  7512     {
       
  7513         symbol_c *last_type_symbol = NULL;
       
  7514 
       
  7515         {
       
  7516             identifier_c param_name("IN");
       
  7517             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7518             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7519             
       
  7520             /* Get the value from a foo(<param_value>) style call */
       
  7521             if (IN_param_value == NULL)
       
  7522               IN_param_value = function_call_param_iterator.next();
       
  7523             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7524             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7525             
       
  7526             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7527             {
       
  7528         
       
  7529                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7530                 return return_type_symbol;
       
  7531                 
       
  7532             }
       
  7533             
       
  7534             
       
  7535             ERROR;
       
  7536         }
       
  7537         
       
  7538     }/*function_uint_to_string*/
       
  7539     break;
       
  7540 
       
  7541 /****
       
  7542  *UINT_TO_LWORD
       
  7543  */
       
  7544     case function_uint_to_lword :
       
  7545     {
       
  7546         symbol_c *last_type_symbol = NULL;
       
  7547 
       
  7548         {
       
  7549             identifier_c param_name("IN");
       
  7550             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7551             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7552             
       
  7553             /* Get the value from a foo(<param_value>) style call */
       
  7554             if (IN_param_value == NULL)
       
  7555               IN_param_value = function_call_param_iterator.next();
       
  7556             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7557             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7558             
       
  7559             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7560             {
       
  7561         
       
  7562                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7563                 return return_type_symbol;
       
  7564                 
       
  7565             }
       
  7566             
       
  7567             
       
  7568             ERROR;
       
  7569         }
       
  7570         
       
  7571     }/*function_uint_to_lword*/
       
  7572     break;
       
  7573 
       
  7574 /****
       
  7575  *UINT_TO_LREAL
       
  7576  */
       
  7577     case function_uint_to_lreal :
       
  7578     {
       
  7579         symbol_c *last_type_symbol = NULL;
       
  7580 
       
  7581         {
       
  7582             identifier_c param_name("IN");
       
  7583             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7584             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7585             
       
  7586             /* Get the value from a foo(<param_value>) style call */
       
  7587             if (IN_param_value == NULL)
       
  7588               IN_param_value = function_call_param_iterator.next();
       
  7589             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7590             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7591             
       
  7592             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7593             {
       
  7594         
       
  7595                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7596                 return return_type_symbol;
       
  7597                 
       
  7598             }
       
  7599             
       
  7600             
       
  7601             ERROR;
       
  7602         }
       
  7603         
       
  7604     }/*function_uint_to_lreal*/
       
  7605     break;
       
  7606 
       
  7607 /****
       
  7608  *UINT_TO_BYTE
       
  7609  */
       
  7610     case function_uint_to_byte :
       
  7611     {
       
  7612         symbol_c *last_type_symbol = NULL;
       
  7613 
       
  7614         {
       
  7615             identifier_c param_name("IN");
       
  7616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7618             
       
  7619             /* Get the value from a foo(<param_value>) style call */
       
  7620             if (IN_param_value == NULL)
       
  7621               IN_param_value = function_call_param_iterator.next();
       
  7622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7624             
       
  7625             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7626             {
       
  7627         
       
  7628                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7629                 return return_type_symbol;
       
  7630                 
       
  7631             }
       
  7632             
       
  7633             
       
  7634             ERROR;
       
  7635         }
       
  7636         
       
  7637     }/*function_uint_to_byte*/
       
  7638     break;
       
  7639 
       
  7640 /****
       
  7641  *UINT_TO_USINT
       
  7642  */
       
  7643     case function_uint_to_usint :
       
  7644     {
       
  7645         symbol_c *last_type_symbol = NULL;
       
  7646 
       
  7647         {
       
  7648             identifier_c param_name("IN");
       
  7649             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7650             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7651             
       
  7652             /* Get the value from a foo(<param_value>) style call */
       
  7653             if (IN_param_value == NULL)
       
  7654               IN_param_value = function_call_param_iterator.next();
       
  7655             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7656             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7657             
       
  7658             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7659             {
       
  7660         
       
  7661                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7662                 return return_type_symbol;
       
  7663                 
       
  7664             }
       
  7665             
       
  7666             
       
  7667             ERROR;
       
  7668         }
       
  7669         
       
  7670     }/*function_uint_to_usint*/
       
  7671     break;
       
  7672 
       
  7673 /****
       
  7674  *UINT_TO_ULINT
       
  7675  */
       
  7676     case function_uint_to_ulint :
       
  7677     {
       
  7678         symbol_c *last_type_symbol = NULL;
       
  7679 
       
  7680         {
       
  7681             identifier_c param_name("IN");
       
  7682             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7683             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7684             
       
  7685             /* Get the value from a foo(<param_value>) style call */
       
  7686             if (IN_param_value == NULL)
       
  7687               IN_param_value = function_call_param_iterator.next();
       
  7688             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7689             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7690             
       
  7691             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7692             {
       
  7693         
       
  7694                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7695                 return return_type_symbol;
       
  7696                 
       
  7697             }
       
  7698             
       
  7699             
       
  7700             ERROR;
       
  7701         }
       
  7702         
       
  7703     }/*function_uint_to_ulint*/
       
  7704     break;
       
  7705 
       
  7706 /****
       
  7707  *UINT_TO_BOOL
       
  7708  */
       
  7709     case function_uint_to_bool :
       
  7710     {
       
  7711         symbol_c *last_type_symbol = NULL;
       
  7712 
       
  7713         {
       
  7714             identifier_c param_name("IN");
       
  7715             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7716             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7717             
       
  7718             /* Get the value from a foo(<param_value>) style call */
       
  7719             if (IN_param_value == NULL)
       
  7720               IN_param_value = function_call_param_iterator.next();
       
  7721             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7722             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7723             
       
  7724             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7725             {
       
  7726         
       
  7727                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7728                 return return_type_symbol;
       
  7729                 
       
  7730             }
       
  7731             
       
  7732             
       
  7733             ERROR;
       
  7734         }
       
  7735         
       
  7736     }/*function_uint_to_bool*/
       
  7737     break;
       
  7738 
       
  7739 /****
       
  7740  *UINT_TO_TIME
       
  7741  */
       
  7742     case function_uint_to_time :
       
  7743     {
       
  7744         symbol_c *last_type_symbol = NULL;
       
  7745 
       
  7746         {
       
  7747             identifier_c param_name("IN");
       
  7748             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7749             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7750             
       
  7751             /* Get the value from a foo(<param_value>) style call */
       
  7752             if (IN_param_value == NULL)
       
  7753               IN_param_value = function_call_param_iterator.next();
       
  7754             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7755             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7756             
       
  7757             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7758             {
       
  7759         
       
  7760                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  7761                 return return_type_symbol;
       
  7762                 
       
  7763             }
       
  7764             
       
  7765             
       
  7766             ERROR;
       
  7767         }
       
  7768         
       
  7769     }/*function_uint_to_time*/
       
  7770     break;
       
  7771 
       
  7772 /****
       
  7773  *UINT_TO_INT
       
  7774  */
       
  7775     case function_uint_to_int :
       
  7776     {
       
  7777         symbol_c *last_type_symbol = NULL;
       
  7778 
       
  7779         {
       
  7780             identifier_c param_name("IN");
       
  7781             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7782             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7783             
       
  7784             /* Get the value from a foo(<param_value>) style call */
       
  7785             if (IN_param_value == NULL)
       
  7786               IN_param_value = function_call_param_iterator.next();
       
  7787             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7788             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7789             
       
  7790             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
  7791             {
       
  7792         
       
  7793                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7794                 return return_type_symbol;
       
  7795                 
       
  7796             }
       
  7797             
       
  7798             
       
  7799             ERROR;
       
  7800         }
       
  7801         
       
  7802     }/*function_uint_to_int*/
       
  7803     break;
       
  7804 
       
  7805 /****
       
  7806  *LREAL_TO_REAL
       
  7807  */
       
  7808     case function_lreal_to_real :
       
  7809     {
       
  7810         symbol_c *last_type_symbol = NULL;
       
  7811 
       
  7812         {
       
  7813             identifier_c param_name("IN");
       
  7814             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7815             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7816             
       
  7817             /* Get the value from a foo(<param_value>) style call */
       
  7818             if (IN_param_value == NULL)
       
  7819               IN_param_value = function_call_param_iterator.next();
       
  7820             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7821             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7822             
       
  7823             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  7824             {
       
  7825         
       
  7826                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7827                 return return_type_symbol;
       
  7828                 
       
  7829             }
       
  7830             
       
  7831             
       
  7832             ERROR;
       
  7833         }
       
  7834         
       
  7835     }/*function_lreal_to_real*/
       
  7836     break;
       
  7837 
       
  7838 /****
       
  7839  *LREAL_TO_SINT
       
  7840  */
       
  7841     case function_lreal_to_sint :
       
  7842     {
       
  7843         symbol_c *last_type_symbol = NULL;
       
  7844 
       
  7845         {
       
  7846             identifier_c param_name("IN");
       
  7847             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7848             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7849             
       
  7850             /* Get the value from a foo(<param_value>) style call */
       
  7851             if (IN_param_value == NULL)
       
  7852               IN_param_value = function_call_param_iterator.next();
       
  7853             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7854             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7855             
       
  7856             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  7857             {
       
  7858         
       
  7859                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7860                 return return_type_symbol;
       
  7861                 
       
  7862             }
       
  7863             
       
  7864             
       
  7865             ERROR;
       
  7866         }
       
  7867         
       
  7868     }/*function_lreal_to_sint*/
       
  7869     break;
       
  7870 
       
  7871 /****
       
  7872  *LREAL_TO_LINT
       
  7873  */
       
  7874     case function_lreal_to_lint :
       
  7875     {
       
  7876         symbol_c *last_type_symbol = NULL;
       
  7877 
       
  7878         {
       
  7879             identifier_c param_name("IN");
       
  7880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7882             
       
  7883             /* Get the value from a foo(<param_value>) style call */
       
  7884             if (IN_param_value == NULL)
       
  7885               IN_param_value = function_call_param_iterator.next();
       
  7886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7888             
       
  7889             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  7890             {
       
  7891         
       
  7892                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7893                 return return_type_symbol;
       
  7894                 
       
  7895             }
       
  7896             
       
  7897             
       
  7898             ERROR;
       
  7899         }
       
  7900         
       
  7901     }/*function_lreal_to_lint*/
       
  7902     break;
       
  7903 
       
  7904 /****
       
  7905  *LREAL_TO_DINT
       
  7906  */
       
  7907     case function_lreal_to_dint :
       
  7908     {
       
  7909         symbol_c *last_type_symbol = NULL;
       
  7910 
       
  7911         {
       
  7912             identifier_c param_name("IN");
       
  7913             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7914             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7915             
       
  7916             /* Get the value from a foo(<param_value>) style call */
       
  7917             if (IN_param_value == NULL)
       
  7918               IN_param_value = function_call_param_iterator.next();
       
  7919             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7920             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7921             
       
  7922             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  7923             {
       
  7924         
       
  7925                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7926                 return return_type_symbol;
       
  7927                 
       
  7928             }
       
  7929             
       
  7930             
       
  7931             ERROR;
       
  7932         }
       
  7933         
       
  7934     }/*function_lreal_to_dint*/
       
  7935     break;
       
  7936 
       
  7937 /****
       
  7938  *LREAL_TO_DATE
       
  7939  */
       
  7940     case function_lreal_to_date :
       
  7941     {
       
  7942         symbol_c *last_type_symbol = NULL;
       
  7943 
       
  7944         {
       
  7945             identifier_c param_name("IN");
       
  7946             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7947             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7948             
       
  7949             /* Get the value from a foo(<param_value>) style call */
       
  7950             if (IN_param_value == NULL)
       
  7951               IN_param_value = function_call_param_iterator.next();
       
  7952             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7953             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7954             
       
  7955             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  7956             {
       
  7957         
       
  7958                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  7959                 return return_type_symbol;
       
  7960                 
       
  7961             }
       
  7962             
       
  7963             
       
  7964             ERROR;
       
  7965         }
       
  7966         
       
  7967     }/*function_lreal_to_date*/
       
  7968     break;
       
  7969 
       
  7970 /****
       
  7971  *LREAL_TO_DWORD
       
  7972  */
       
  7973     case function_lreal_to_dword :
       
  7974     {
       
  7975         symbol_c *last_type_symbol = NULL;
       
  7976 
       
  7977         {
       
  7978             identifier_c param_name("IN");
       
  7979             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7980             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7981             
       
  7982             /* Get the value from a foo(<param_value>) style call */
       
  7983             if (IN_param_value == NULL)
       
  7984               IN_param_value = function_call_param_iterator.next();
       
  7985             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7986             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7987             
       
  7988             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  7989             {
       
  7990         
       
  7991                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7992                 return return_type_symbol;
       
  7993                 
       
  7994             }
       
  7995             
       
  7996             
       
  7997             ERROR;
       
  7998         }
       
  7999         
       
  8000     }/*function_lreal_to_dword*/
       
  8001     break;
       
  8002 
       
  8003 /****
       
  8004  *LREAL_TO_DT
       
  8005  */
       
  8006     case function_lreal_to_dt :
       
  8007     {
       
  8008         symbol_c *last_type_symbol = NULL;
       
  8009 
       
  8010         {
       
  8011             identifier_c param_name("IN");
       
  8012             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8013             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8014             
       
  8015             /* Get the value from a foo(<param_value>) style call */
       
  8016             if (IN_param_value == NULL)
       
  8017               IN_param_value = function_call_param_iterator.next();
       
  8018             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8019             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8020             
       
  8021             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8022             {
       
  8023         
       
  8024                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8025                 return return_type_symbol;
       
  8026                 
       
  8027             }
       
  8028             
       
  8029             
       
  8030             ERROR;
       
  8031         }
       
  8032         
       
  8033     }/*function_lreal_to_dt*/
       
  8034     break;
       
  8035 
       
  8036 /****
       
  8037  *LREAL_TO_TOD
       
  8038  */
       
  8039     case function_lreal_to_tod :
       
  8040     {
       
  8041         symbol_c *last_type_symbol = NULL;
       
  8042 
       
  8043         {
       
  8044             identifier_c param_name("IN");
       
  8045             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8046             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8047             
       
  8048             /* Get the value from a foo(<param_value>) style call */
       
  8049             if (IN_param_value == NULL)
       
  8050               IN_param_value = function_call_param_iterator.next();
       
  8051             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8052             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8053             
       
  8054             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8055             {
       
  8056         
       
  8057                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8058                 return return_type_symbol;
       
  8059                 
       
  8060             }
       
  8061             
       
  8062             
       
  8063             ERROR;
       
  8064         }
       
  8065         
       
  8066     }/*function_lreal_to_tod*/
       
  8067     break;
       
  8068 
       
  8069 /****
       
  8070  *LREAL_TO_UDINT
       
  8071  */
       
  8072     case function_lreal_to_udint :
       
  8073     {
       
  8074         symbol_c *last_type_symbol = NULL;
       
  8075 
       
  8076         {
       
  8077             identifier_c param_name("IN");
       
  8078             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8079             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8080             
       
  8081             /* Get the value from a foo(<param_value>) style call */
       
  8082             if (IN_param_value == NULL)
       
  8083               IN_param_value = function_call_param_iterator.next();
       
  8084             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8085             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8086             
       
  8087             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8088             {
       
  8089         
       
  8090                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8091                 return return_type_symbol;
       
  8092                 
       
  8093             }
       
  8094             
       
  8095             
       
  8096             ERROR;
       
  8097         }
       
  8098         
       
  8099     }/*function_lreal_to_udint*/
       
  8100     break;
       
  8101 
       
  8102 /****
       
  8103  *LREAL_TO_WORD
       
  8104  */
       
  8105     case function_lreal_to_word :
       
  8106     {
       
  8107         symbol_c *last_type_symbol = NULL;
       
  8108 
       
  8109         {
       
  8110             identifier_c param_name("IN");
       
  8111             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8112             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8113             
       
  8114             /* Get the value from a foo(<param_value>) style call */
       
  8115             if (IN_param_value == NULL)
       
  8116               IN_param_value = function_call_param_iterator.next();
       
  8117             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8118             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8119             
       
  8120             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8121             {
       
  8122         
       
  8123                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8124                 return return_type_symbol;
       
  8125                 
       
  8126             }
       
  8127             
       
  8128             
       
  8129             ERROR;
       
  8130         }
       
  8131         
       
  8132     }/*function_lreal_to_word*/
       
  8133     break;
       
  8134 
       
  8135 /****
       
  8136  *LREAL_TO_STRING
       
  8137  */
       
  8138     case function_lreal_to_string :
       
  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::lreal_type_name, last_type_symbol))
       
  8154             {
       
  8155         
       
  8156                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8157                 return return_type_symbol;
       
  8158                 
       
  8159             }
       
  8160             
       
  8161             
       
  8162             ERROR;
       
  8163         }
       
  8164         
       
  8165     }/*function_lreal_to_string*/
       
  8166     break;
       
  8167 
       
  8168 /****
       
  8169  *LREAL_TO_LWORD
       
  8170  */
       
  8171     case function_lreal_to_lword :
       
  8172     {
       
  8173         symbol_c *last_type_symbol = NULL;
       
  8174 
       
  8175         {
       
  8176             identifier_c param_name("IN");
       
  8177             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8178             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8179             
       
  8180             /* Get the value from a foo(<param_value>) style call */
       
  8181             if (IN_param_value == NULL)
       
  8182               IN_param_value = function_call_param_iterator.next();
       
  8183             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8184             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8185             
       
  8186             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8187             {
       
  8188         
       
  8189                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8190                 return return_type_symbol;
       
  8191                 
       
  8192             }
       
  8193             
       
  8194             
       
  8195             ERROR;
       
  8196         }
       
  8197         
       
  8198     }/*function_lreal_to_lword*/
       
  8199     break;
       
  8200 
       
  8201 /****
       
  8202  *LREAL_TO_UINT
       
  8203  */
       
  8204     case function_lreal_to_uint :
       
  8205     {
       
  8206         symbol_c *last_type_symbol = NULL;
       
  8207 
       
  8208         {
       
  8209             identifier_c param_name("IN");
       
  8210             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8211             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8212             
       
  8213             /* Get the value from a foo(<param_value>) style call */
       
  8214             if (IN_param_value == NULL)
       
  8215               IN_param_value = function_call_param_iterator.next();
       
  8216             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8217             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8218             
       
  8219             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8220             {
       
  8221         
       
  8222                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8223                 return return_type_symbol;
       
  8224                 
       
  8225             }
       
  8226             
       
  8227             
       
  8228             ERROR;
       
  8229         }
       
  8230         
       
  8231     }/*function_lreal_to_uint*/
       
  8232     break;
       
  8233 
       
  8234 /****
       
  8235  *LREAL_TO_BYTE
       
  8236  */
       
  8237     case function_lreal_to_byte :
       
  8238     {
       
  8239         symbol_c *last_type_symbol = NULL;
       
  8240 
       
  8241         {
       
  8242             identifier_c param_name("IN");
       
  8243             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8244             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8245             
       
  8246             /* Get the value from a foo(<param_value>) style call */
       
  8247             if (IN_param_value == NULL)
       
  8248               IN_param_value = function_call_param_iterator.next();
       
  8249             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8250             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8251             
       
  8252             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8253             {
       
  8254         
       
  8255                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8256                 return return_type_symbol;
       
  8257                 
       
  8258             }
       
  8259             
       
  8260             
       
  8261             ERROR;
       
  8262         }
       
  8263         
       
  8264     }/*function_lreal_to_byte*/
       
  8265     break;
       
  8266 
       
  8267 /****
       
  8268  *LREAL_TO_USINT
       
  8269  */
       
  8270     case function_lreal_to_usint :
       
  8271     {
       
  8272         symbol_c *last_type_symbol = NULL;
       
  8273 
       
  8274         {
       
  8275             identifier_c param_name("IN");
       
  8276             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8277             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8278             
       
  8279             /* Get the value from a foo(<param_value>) style call */
       
  8280             if (IN_param_value == NULL)
       
  8281               IN_param_value = function_call_param_iterator.next();
       
  8282             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8283             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8284             
       
  8285             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8286             {
       
  8287         
       
  8288                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8289                 return return_type_symbol;
       
  8290                 
       
  8291             }
       
  8292             
       
  8293             
       
  8294             ERROR;
       
  8295         }
       
  8296         
       
  8297     }/*function_lreal_to_usint*/
       
  8298     break;
       
  8299 
       
  8300 /****
       
  8301  *LREAL_TO_ULINT
       
  8302  */
       
  8303     case function_lreal_to_ulint :
       
  8304     {
       
  8305         symbol_c *last_type_symbol = NULL;
       
  8306 
       
  8307         {
       
  8308             identifier_c param_name("IN");
       
  8309             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8310             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8311             
       
  8312             /* Get the value from a foo(<param_value>) style call */
       
  8313             if (IN_param_value == NULL)
       
  8314               IN_param_value = function_call_param_iterator.next();
       
  8315             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8316             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8317             
       
  8318             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8319             {
       
  8320         
       
  8321                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8322                 return return_type_symbol;
       
  8323                 
       
  8324             }
       
  8325             
       
  8326             
       
  8327             ERROR;
       
  8328         }
       
  8329         
       
  8330     }/*function_lreal_to_ulint*/
       
  8331     break;
       
  8332 
       
  8333 /****
       
  8334  *LREAL_TO_BOOL
       
  8335  */
       
  8336     case function_lreal_to_bool :
       
  8337     {
       
  8338         symbol_c *last_type_symbol = NULL;
       
  8339 
       
  8340         {
       
  8341             identifier_c param_name("IN");
       
  8342             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8343             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8344             
       
  8345             /* Get the value from a foo(<param_value>) style call */
       
  8346             if (IN_param_value == NULL)
       
  8347               IN_param_value = function_call_param_iterator.next();
       
  8348             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8349             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8350             
       
  8351             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8352             {
       
  8353         
       
  8354                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8355                 return return_type_symbol;
       
  8356                 
       
  8357             }
       
  8358             
       
  8359             
       
  8360             ERROR;
       
  8361         }
       
  8362         
       
  8363     }/*function_lreal_to_bool*/
       
  8364     break;
       
  8365 
       
  8366 /****
       
  8367  *LREAL_TO_TIME
       
  8368  */
       
  8369     case function_lreal_to_time :
       
  8370     {
       
  8371         symbol_c *last_type_symbol = NULL;
       
  8372 
       
  8373         {
       
  8374             identifier_c param_name("IN");
       
  8375             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8376             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8377             
       
  8378             /* Get the value from a foo(<param_value>) style call */
       
  8379             if (IN_param_value == NULL)
       
  8380               IN_param_value = function_call_param_iterator.next();
       
  8381             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8382             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8383             
       
  8384             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8385             {
       
  8386         
       
  8387                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8388                 return return_type_symbol;
       
  8389                 
       
  8390             }
       
  8391             
       
  8392             
       
  8393             ERROR;
       
  8394         }
       
  8395         
       
  8396     }/*function_lreal_to_time*/
       
  8397     break;
       
  8398 
       
  8399 /****
       
  8400  *LREAL_TO_INT
       
  8401  */
       
  8402     case function_lreal_to_int :
       
  8403     {
       
  8404         symbol_c *last_type_symbol = NULL;
       
  8405 
       
  8406         {
       
  8407             identifier_c param_name("IN");
       
  8408             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8409             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8410             
       
  8411             /* Get the value from a foo(<param_value>) style call */
       
  8412             if (IN_param_value == NULL)
       
  8413               IN_param_value = function_call_param_iterator.next();
       
  8414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8416             
       
  8417             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
  8418             {
       
  8419         
       
  8420                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8421                 return return_type_symbol;
       
  8422                 
       
  8423             }
       
  8424             
       
  8425             
       
  8426             ERROR;
       
  8427         }
       
  8428         
       
  8429     }/*function_lreal_to_int*/
       
  8430     break;
       
  8431 
       
  8432 /****
       
  8433  *BYTE_TO_REAL
       
  8434  */
       
  8435     case function_byte_to_real :
       
  8436     {
       
  8437         symbol_c *last_type_symbol = NULL;
       
  8438 
       
  8439         {
       
  8440             identifier_c param_name("IN");
       
  8441             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8442             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8443             
       
  8444             /* Get the value from a foo(<param_value>) style call */
       
  8445             if (IN_param_value == NULL)
       
  8446               IN_param_value = function_call_param_iterator.next();
       
  8447             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8448             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8449             
       
  8450             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8451             {
       
  8452         
       
  8453                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8454                 return return_type_symbol;
       
  8455                 
       
  8456             }
       
  8457             
       
  8458             
       
  8459             ERROR;
       
  8460         }
       
  8461         
       
  8462     }/*function_byte_to_real*/
       
  8463     break;
       
  8464 
       
  8465 /****
       
  8466  *BYTE_TO_SINT
       
  8467  */
       
  8468     case function_byte_to_sint :
       
  8469     {
       
  8470         symbol_c *last_type_symbol = NULL;
       
  8471 
       
  8472         {
       
  8473             identifier_c param_name("IN");
       
  8474             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8475             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8476             
       
  8477             /* Get the value from a foo(<param_value>) style call */
       
  8478             if (IN_param_value == NULL)
       
  8479               IN_param_value = function_call_param_iterator.next();
       
  8480             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8481             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8482             
       
  8483             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8484             {
       
  8485         
       
  8486                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8487                 return return_type_symbol;
       
  8488                 
       
  8489             }
       
  8490             
       
  8491             
       
  8492             ERROR;
       
  8493         }
       
  8494         
       
  8495     }/*function_byte_to_sint*/
       
  8496     break;
       
  8497 
       
  8498 /****
       
  8499  *BYTE_TO_LINT
       
  8500  */
       
  8501     case function_byte_to_lint :
       
  8502     {
       
  8503         symbol_c *last_type_symbol = NULL;
       
  8504 
       
  8505         {
       
  8506             identifier_c param_name("IN");
       
  8507             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8508             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8509             
       
  8510             /* Get the value from a foo(<param_value>) style call */
       
  8511             if (IN_param_value == NULL)
       
  8512               IN_param_value = function_call_param_iterator.next();
       
  8513             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8514             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8515             
       
  8516             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8517             {
       
  8518         
       
  8519                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8520                 return return_type_symbol;
       
  8521                 
       
  8522             }
       
  8523             
       
  8524             
       
  8525             ERROR;
       
  8526         }
       
  8527         
       
  8528     }/*function_byte_to_lint*/
       
  8529     break;
       
  8530 
       
  8531 /****
       
  8532  *BYTE_TO_DINT
       
  8533  */
       
  8534     case function_byte_to_dint :
       
  8535     {
       
  8536         symbol_c *last_type_symbol = NULL;
       
  8537 
       
  8538         {
       
  8539             identifier_c param_name("IN");
       
  8540             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8541             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8542             
       
  8543             /* Get the value from a foo(<param_value>) style call */
       
  8544             if (IN_param_value == NULL)
       
  8545               IN_param_value = function_call_param_iterator.next();
       
  8546             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8547             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8548             
       
  8549             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8550             {
       
  8551         
       
  8552                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8553                 return return_type_symbol;
       
  8554                 
       
  8555             }
       
  8556             
       
  8557             
       
  8558             ERROR;
       
  8559         }
       
  8560         
       
  8561     }/*function_byte_to_dint*/
       
  8562     break;
       
  8563 
       
  8564 /****
       
  8565  *BYTE_TO_DATE
       
  8566  */
       
  8567     case function_byte_to_date :
       
  8568     {
       
  8569         symbol_c *last_type_symbol = NULL;
       
  8570 
       
  8571         {
       
  8572             identifier_c param_name("IN");
       
  8573             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8574             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8575             
       
  8576             /* Get the value from a foo(<param_value>) style call */
       
  8577             if (IN_param_value == NULL)
       
  8578               IN_param_value = function_call_param_iterator.next();
       
  8579             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8580             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8581             
       
  8582             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8583             {
       
  8584         
       
  8585                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  8586                 return return_type_symbol;
       
  8587                 
       
  8588             }
       
  8589             
       
  8590             
       
  8591             ERROR;
       
  8592         }
       
  8593         
       
  8594     }/*function_byte_to_date*/
       
  8595     break;
       
  8596 
       
  8597 /****
       
  8598  *BYTE_TO_DWORD
       
  8599  */
       
  8600     case function_byte_to_dword :
       
  8601     {
       
  8602         symbol_c *last_type_symbol = NULL;
       
  8603 
       
  8604         {
       
  8605             identifier_c param_name("IN");
       
  8606             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8607             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8608             
       
  8609             /* Get the value from a foo(<param_value>) style call */
       
  8610             if (IN_param_value == NULL)
       
  8611               IN_param_value = function_call_param_iterator.next();
       
  8612             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8613             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8614             
       
  8615             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8616             {
       
  8617         
       
  8618                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8619                 return return_type_symbol;
       
  8620                 
       
  8621             }
       
  8622             
       
  8623             
       
  8624             ERROR;
       
  8625         }
       
  8626         
       
  8627     }/*function_byte_to_dword*/
       
  8628     break;
       
  8629 
       
  8630 /****
       
  8631  *BYTE_TO_DT
       
  8632  */
       
  8633     case function_byte_to_dt :
       
  8634     {
       
  8635         symbol_c *last_type_symbol = NULL;
       
  8636 
       
  8637         {
       
  8638             identifier_c param_name("IN");
       
  8639             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8640             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8641             
       
  8642             /* Get the value from a foo(<param_value>) style call */
       
  8643             if (IN_param_value == NULL)
       
  8644               IN_param_value = function_call_param_iterator.next();
       
  8645             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8646             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8647             
       
  8648             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8649             {
       
  8650         
       
  8651                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  8652                 return return_type_symbol;
       
  8653                 
       
  8654             }
       
  8655             
       
  8656             
       
  8657             ERROR;
       
  8658         }
       
  8659         
       
  8660     }/*function_byte_to_dt*/
       
  8661     break;
       
  8662 
       
  8663 /****
       
  8664  *BYTE_TO_TOD
       
  8665  */
       
  8666     case function_byte_to_tod :
       
  8667     {
       
  8668         symbol_c *last_type_symbol = NULL;
       
  8669 
       
  8670         {
       
  8671             identifier_c param_name("IN");
       
  8672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8674             
       
  8675             /* Get the value from a foo(<param_value>) style call */
       
  8676             if (IN_param_value == NULL)
       
  8677               IN_param_value = function_call_param_iterator.next();
       
  8678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8680             
       
  8681             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8682             {
       
  8683         
       
  8684                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  8685                 return return_type_symbol;
       
  8686                 
       
  8687             }
       
  8688             
       
  8689             
       
  8690             ERROR;
       
  8691         }
       
  8692         
       
  8693     }/*function_byte_to_tod*/
       
  8694     break;
       
  8695 
       
  8696 /****
       
  8697  *BYTE_TO_UDINT
       
  8698  */
       
  8699     case function_byte_to_udint :
       
  8700     {
       
  8701         symbol_c *last_type_symbol = NULL;
       
  8702 
       
  8703         {
       
  8704             identifier_c param_name("IN");
       
  8705             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8706             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8707             
       
  8708             /* Get the value from a foo(<param_value>) style call */
       
  8709             if (IN_param_value == NULL)
       
  8710               IN_param_value = function_call_param_iterator.next();
       
  8711             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8712             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8713             
       
  8714             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8715             {
       
  8716         
       
  8717                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8718                 return return_type_symbol;
       
  8719                 
       
  8720             }
       
  8721             
       
  8722             
       
  8723             ERROR;
       
  8724         }
       
  8725         
       
  8726     }/*function_byte_to_udint*/
       
  8727     break;
       
  8728 
       
  8729 /****
       
  8730  *BYTE_TO_WORD
       
  8731  */
       
  8732     case function_byte_to_word :
       
  8733     {
       
  8734         symbol_c *last_type_symbol = NULL;
       
  8735 
       
  8736         {
       
  8737             identifier_c param_name("IN");
       
  8738             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8739             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8740             
       
  8741             /* Get the value from a foo(<param_value>) style call */
       
  8742             if (IN_param_value == NULL)
       
  8743               IN_param_value = function_call_param_iterator.next();
       
  8744             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8745             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8746             
       
  8747             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8748             {
       
  8749         
       
  8750                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8751                 return return_type_symbol;
       
  8752                 
       
  8753             }
       
  8754             
       
  8755             
       
  8756             ERROR;
       
  8757         }
       
  8758         
       
  8759     }/*function_byte_to_word*/
       
  8760     break;
       
  8761 
       
  8762 /****
       
  8763  *BYTE_TO_STRING
       
  8764  */
       
  8765     case function_byte_to_string :
       
  8766     {
       
  8767         symbol_c *last_type_symbol = NULL;
       
  8768 
       
  8769         {
       
  8770             identifier_c param_name("IN");
       
  8771             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8772             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8773             
       
  8774             /* Get the value from a foo(<param_value>) style call */
       
  8775             if (IN_param_value == NULL)
       
  8776               IN_param_value = function_call_param_iterator.next();
       
  8777             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8778             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8779             
       
  8780             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8781             {
       
  8782         
       
  8783                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8784                 return return_type_symbol;
       
  8785                 
       
  8786             }
       
  8787             
       
  8788             
       
  8789             ERROR;
       
  8790         }
       
  8791         
       
  8792     }/*function_byte_to_string*/
       
  8793     break;
       
  8794 
       
  8795 /****
       
  8796  *BYTE_TO_LWORD
       
  8797  */
       
  8798     case function_byte_to_lword :
       
  8799     {
       
  8800         symbol_c *last_type_symbol = NULL;
       
  8801 
       
  8802         {
       
  8803             identifier_c param_name("IN");
       
  8804             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8805             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8806             
       
  8807             /* Get the value from a foo(<param_value>) style call */
       
  8808             if (IN_param_value == NULL)
       
  8809               IN_param_value = function_call_param_iterator.next();
       
  8810             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8811             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8812             
       
  8813             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8814             {
       
  8815         
       
  8816                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8817                 return return_type_symbol;
       
  8818                 
       
  8819             }
       
  8820             
       
  8821             
       
  8822             ERROR;
       
  8823         }
       
  8824         
       
  8825     }/*function_byte_to_lword*/
       
  8826     break;
       
  8827 
       
  8828 /****
       
  8829  *BYTE_TO_UINT
       
  8830  */
       
  8831     case function_byte_to_uint :
       
  8832     {
       
  8833         symbol_c *last_type_symbol = NULL;
       
  8834 
       
  8835         {
       
  8836             identifier_c param_name("IN");
       
  8837             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8838             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8839             
       
  8840             /* Get the value from a foo(<param_value>) style call */
       
  8841             if (IN_param_value == NULL)
       
  8842               IN_param_value = function_call_param_iterator.next();
       
  8843             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8844             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8845             
       
  8846             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8847             {
       
  8848         
       
  8849                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8850                 return return_type_symbol;
       
  8851                 
       
  8852             }
       
  8853             
       
  8854             
       
  8855             ERROR;
       
  8856         }
       
  8857         
       
  8858     }/*function_byte_to_uint*/
       
  8859     break;
       
  8860 
       
  8861 /****
       
  8862  *BYTE_TO_LREAL
       
  8863  */
       
  8864     case function_byte_to_lreal :
       
  8865     {
       
  8866         symbol_c *last_type_symbol = NULL;
       
  8867 
       
  8868         {
       
  8869             identifier_c param_name("IN");
       
  8870             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8871             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8872             
       
  8873             /* Get the value from a foo(<param_value>) style call */
       
  8874             if (IN_param_value == NULL)
       
  8875               IN_param_value = function_call_param_iterator.next();
       
  8876             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8877             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8878             
       
  8879             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8880             {
       
  8881         
       
  8882                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8883                 return return_type_symbol;
       
  8884                 
       
  8885             }
       
  8886             
       
  8887             
       
  8888             ERROR;
       
  8889         }
       
  8890         
       
  8891     }/*function_byte_to_lreal*/
       
  8892     break;
       
  8893 
       
  8894 /****
       
  8895  *BYTE_TO_USINT
       
  8896  */
       
  8897     case function_byte_to_usint :
       
  8898     {
       
  8899         symbol_c *last_type_symbol = NULL;
       
  8900 
       
  8901         {
       
  8902             identifier_c param_name("IN");
       
  8903             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8904             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8905             
       
  8906             /* Get the value from a foo(<param_value>) style call */
       
  8907             if (IN_param_value == NULL)
       
  8908               IN_param_value = function_call_param_iterator.next();
       
  8909             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8910             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8911             
       
  8912             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8913             {
       
  8914         
       
  8915                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8916                 return return_type_symbol;
       
  8917                 
       
  8918             }
       
  8919             
       
  8920             
       
  8921             ERROR;
       
  8922         }
       
  8923         
       
  8924     }/*function_byte_to_usint*/
       
  8925     break;
       
  8926 
       
  8927 /****
       
  8928  *BYTE_TO_ULINT
       
  8929  */
       
  8930     case function_byte_to_ulint :
       
  8931     {
       
  8932         symbol_c *last_type_symbol = NULL;
       
  8933 
       
  8934         {
       
  8935             identifier_c param_name("IN");
       
  8936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8938             
       
  8939             /* Get the value from a foo(<param_value>) style call */
       
  8940             if (IN_param_value == NULL)
       
  8941               IN_param_value = function_call_param_iterator.next();
       
  8942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8944             
       
  8945             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8946             {
       
  8947         
       
  8948                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8949                 return return_type_symbol;
       
  8950                 
       
  8951             }
       
  8952             
       
  8953             
       
  8954             ERROR;
       
  8955         }
       
  8956         
       
  8957     }/*function_byte_to_ulint*/
       
  8958     break;
       
  8959 
       
  8960 /****
       
  8961  *BYTE_TO_BOOL
       
  8962  */
       
  8963     case function_byte_to_bool :
       
  8964     {
       
  8965         symbol_c *last_type_symbol = NULL;
       
  8966 
       
  8967         {
       
  8968             identifier_c param_name("IN");
       
  8969             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8970             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8971             
       
  8972             /* Get the value from a foo(<param_value>) style call */
       
  8973             if (IN_param_value == NULL)
       
  8974               IN_param_value = function_call_param_iterator.next();
       
  8975             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8976             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8977             
       
  8978             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  8979             {
       
  8980         
       
  8981                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8982                 return return_type_symbol;
       
  8983                 
       
  8984             }
       
  8985             
       
  8986             
       
  8987             ERROR;
       
  8988         }
       
  8989         
       
  8990     }/*function_byte_to_bool*/
       
  8991     break;
       
  8992 
       
  8993 /****
       
  8994  *BYTE_TO_TIME
       
  8995  */
       
  8996     case function_byte_to_time :
       
  8997     {
       
  8998         symbol_c *last_type_symbol = NULL;
       
  8999 
       
  9000         {
       
  9001             identifier_c param_name("IN");
       
  9002             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9003             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9004             
       
  9005             /* Get the value from a foo(<param_value>) style call */
       
  9006             if (IN_param_value == NULL)
       
  9007               IN_param_value = function_call_param_iterator.next();
       
  9008             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9009             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9010             
       
  9011             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9012             {
       
  9013         
       
  9014                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9015                 return return_type_symbol;
       
  9016                 
       
  9017             }
       
  9018             
       
  9019             
       
  9020             ERROR;
       
  9021         }
       
  9022         
       
  9023     }/*function_byte_to_time*/
       
  9024     break;
       
  9025 
       
  9026 /****
       
  9027  *BYTE_TO_INT
       
  9028  */
       
  9029     case function_byte_to_int :
       
  9030     {
       
  9031         symbol_c *last_type_symbol = NULL;
       
  9032 
       
  9033         {
       
  9034             identifier_c param_name("IN");
       
  9035             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9036             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9037             
       
  9038             /* Get the value from a foo(<param_value>) style call */
       
  9039             if (IN_param_value == NULL)
       
  9040               IN_param_value = function_call_param_iterator.next();
       
  9041             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9042             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9043             
       
  9044             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9045             {
       
  9046         
       
  9047                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9048                 return return_type_symbol;
       
  9049                 
       
  9050             }
       
  9051             
       
  9052             
       
  9053             ERROR;
       
  9054         }
       
  9055         
       
  9056     }/*function_byte_to_int*/
       
  9057     break;
       
  9058 
       
  9059 /****
       
  9060  *USINT_TO_REAL
       
  9061  */
       
  9062     case function_usint_to_real :
       
  9063     {
       
  9064         symbol_c *last_type_symbol = NULL;
       
  9065 
       
  9066         {
       
  9067             identifier_c param_name("IN");
       
  9068             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9069             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9070             
       
  9071             /* Get the value from a foo(<param_value>) style call */
       
  9072             if (IN_param_value == NULL)
       
  9073               IN_param_value = function_call_param_iterator.next();
       
  9074             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9075             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9076             
       
  9077             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9078             {
       
  9079         
       
  9080                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9081                 return return_type_symbol;
       
  9082                 
       
  9083             }
       
  9084             
       
  9085             
       
  9086             ERROR;
       
  9087         }
       
  9088         
       
  9089     }/*function_usint_to_real*/
       
  9090     break;
       
  9091 
       
  9092 /****
       
  9093  *USINT_TO_SINT
       
  9094  */
       
  9095     case function_usint_to_sint :
       
  9096     {
       
  9097         symbol_c *last_type_symbol = NULL;
       
  9098 
       
  9099         {
       
  9100             identifier_c param_name("IN");
       
  9101             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9102             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9103             
       
  9104             /* Get the value from a foo(<param_value>) style call */
       
  9105             if (IN_param_value == NULL)
       
  9106               IN_param_value = function_call_param_iterator.next();
       
  9107             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9108             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9109             
       
  9110             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9111             {
       
  9112         
       
  9113                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9114                 return return_type_symbol;
       
  9115                 
       
  9116             }
       
  9117             
       
  9118             
       
  9119             ERROR;
       
  9120         }
       
  9121         
       
  9122     }/*function_usint_to_sint*/
       
  9123     break;
       
  9124 
       
  9125 /****
       
  9126  *USINT_TO_LINT
       
  9127  */
       
  9128     case function_usint_to_lint :
       
  9129     {
       
  9130         symbol_c *last_type_symbol = NULL;
       
  9131 
       
  9132         {
       
  9133             identifier_c param_name("IN");
       
  9134             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9135             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9136             
       
  9137             /* Get the value from a foo(<param_value>) style call */
       
  9138             if (IN_param_value == NULL)
       
  9139               IN_param_value = function_call_param_iterator.next();
       
  9140             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9141             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9142             
       
  9143             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9144             {
       
  9145         
       
  9146                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9147                 return return_type_symbol;
       
  9148                 
       
  9149             }
       
  9150             
       
  9151             
       
  9152             ERROR;
       
  9153         }
       
  9154         
       
  9155     }/*function_usint_to_lint*/
       
  9156     break;
       
  9157 
       
  9158 /****
       
  9159  *USINT_TO_DINT
       
  9160  */
       
  9161     case function_usint_to_dint :
       
  9162     {
       
  9163         symbol_c *last_type_symbol = NULL;
       
  9164 
       
  9165         {
       
  9166             identifier_c param_name("IN");
       
  9167             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9168             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9169             
       
  9170             /* Get the value from a foo(<param_value>) style call */
       
  9171             if (IN_param_value == NULL)
       
  9172               IN_param_value = function_call_param_iterator.next();
       
  9173             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9174             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9175             
       
  9176             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9177             {
       
  9178         
       
  9179                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9180                 return return_type_symbol;
       
  9181                 
       
  9182             }
       
  9183             
       
  9184             
       
  9185             ERROR;
       
  9186         }
       
  9187         
       
  9188     }/*function_usint_to_dint*/
       
  9189     break;
       
  9190 
       
  9191 /****
       
  9192  *USINT_TO_DATE
       
  9193  */
       
  9194     case function_usint_to_date :
       
  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::usint_type_name, last_type_symbol))
       
  9210             {
       
  9211         
       
  9212                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9213                 return return_type_symbol;
       
  9214                 
       
  9215             }
       
  9216             
       
  9217             
       
  9218             ERROR;
       
  9219         }
       
  9220         
       
  9221     }/*function_usint_to_date*/
       
  9222     break;
       
  9223 
       
  9224 /****
       
  9225  *USINT_TO_DWORD
       
  9226  */
       
  9227     case function_usint_to_dword :
       
  9228     {
       
  9229         symbol_c *last_type_symbol = NULL;
       
  9230 
       
  9231         {
       
  9232             identifier_c param_name("IN");
       
  9233             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9234             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9235             
       
  9236             /* Get the value from a foo(<param_value>) style call */
       
  9237             if (IN_param_value == NULL)
       
  9238               IN_param_value = function_call_param_iterator.next();
       
  9239             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9240             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9241             
       
  9242             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9243             {
       
  9244         
       
  9245                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9246                 return return_type_symbol;
       
  9247                 
       
  9248             }
       
  9249             
       
  9250             
       
  9251             ERROR;
       
  9252         }
       
  9253         
       
  9254     }/*function_usint_to_dword*/
       
  9255     break;
       
  9256 
       
  9257 /****
       
  9258  *USINT_TO_DT
       
  9259  */
       
  9260     case function_usint_to_dt :
       
  9261     {
       
  9262         symbol_c *last_type_symbol = NULL;
       
  9263 
       
  9264         {
       
  9265             identifier_c param_name("IN");
       
  9266             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9267             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9268             
       
  9269             /* Get the value from a foo(<param_value>) style call */
       
  9270             if (IN_param_value == NULL)
       
  9271               IN_param_value = function_call_param_iterator.next();
       
  9272             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9273             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9274             
       
  9275             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9276             {
       
  9277         
       
  9278                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9279                 return return_type_symbol;
       
  9280                 
       
  9281             }
       
  9282             
       
  9283             
       
  9284             ERROR;
       
  9285         }
       
  9286         
       
  9287     }/*function_usint_to_dt*/
       
  9288     break;
       
  9289 
       
  9290 /****
       
  9291  *USINT_TO_TOD
       
  9292  */
       
  9293     case function_usint_to_tod :
       
  9294     {
       
  9295         symbol_c *last_type_symbol = NULL;
       
  9296 
       
  9297         {
       
  9298             identifier_c param_name("IN");
       
  9299             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9300             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9301             
       
  9302             /* Get the value from a foo(<param_value>) style call */
       
  9303             if (IN_param_value == NULL)
       
  9304               IN_param_value = function_call_param_iterator.next();
       
  9305             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9306             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9307             
       
  9308             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9309             {
       
  9310         
       
  9311                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9312                 return return_type_symbol;
       
  9313                 
       
  9314             }
       
  9315             
       
  9316             
       
  9317             ERROR;
       
  9318         }
       
  9319         
       
  9320     }/*function_usint_to_tod*/
       
  9321     break;
       
  9322 
       
  9323 /****
       
  9324  *USINT_TO_UDINT
       
  9325  */
       
  9326     case function_usint_to_udint :
       
  9327     {
       
  9328         symbol_c *last_type_symbol = NULL;
       
  9329 
       
  9330         {
       
  9331             identifier_c param_name("IN");
       
  9332             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9333             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9334             
       
  9335             /* Get the value from a foo(<param_value>) style call */
       
  9336             if (IN_param_value == NULL)
       
  9337               IN_param_value = function_call_param_iterator.next();
       
  9338             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9339             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9340             
       
  9341             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9342             {
       
  9343         
       
  9344                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9345                 return return_type_symbol;
       
  9346                 
       
  9347             }
       
  9348             
       
  9349             
       
  9350             ERROR;
       
  9351         }
       
  9352         
       
  9353     }/*function_usint_to_udint*/
       
  9354     break;
       
  9355 
       
  9356 /****
       
  9357  *USINT_TO_WORD
       
  9358  */
       
  9359     case function_usint_to_word :
       
  9360     {
       
  9361         symbol_c *last_type_symbol = NULL;
       
  9362 
       
  9363         {
       
  9364             identifier_c param_name("IN");
       
  9365             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9366             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9367             
       
  9368             /* Get the value from a foo(<param_value>) style call */
       
  9369             if (IN_param_value == NULL)
       
  9370               IN_param_value = function_call_param_iterator.next();
       
  9371             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9372             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9373             
       
  9374             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9375             {
       
  9376         
       
  9377                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9378                 return return_type_symbol;
       
  9379                 
       
  9380             }
       
  9381             
       
  9382             
       
  9383             ERROR;
       
  9384         }
       
  9385         
       
  9386     }/*function_usint_to_word*/
       
  9387     break;
       
  9388 
       
  9389 /****
       
  9390  *USINT_TO_STRING
       
  9391  */
       
  9392     case function_usint_to_string :
       
  9393     {
       
  9394         symbol_c *last_type_symbol = NULL;
       
  9395 
       
  9396         {
       
  9397             identifier_c param_name("IN");
       
  9398             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9399             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9400             
       
  9401             /* Get the value from a foo(<param_value>) style call */
       
  9402             if (IN_param_value == NULL)
       
  9403               IN_param_value = function_call_param_iterator.next();
       
  9404             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9405             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9406             
       
  9407             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9408             {
       
  9409         
       
  9410                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9411                 return return_type_symbol;
       
  9412                 
       
  9413             }
       
  9414             
       
  9415             
       
  9416             ERROR;
       
  9417         }
       
  9418         
       
  9419     }/*function_usint_to_string*/
       
  9420     break;
       
  9421 
       
  9422 /****
       
  9423  *USINT_TO_LWORD
       
  9424  */
       
  9425     case function_usint_to_lword :
       
  9426     {
       
  9427         symbol_c *last_type_symbol = NULL;
       
  9428 
       
  9429         {
       
  9430             identifier_c param_name("IN");
       
  9431             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9432             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9433             
       
  9434             /* Get the value from a foo(<param_value>) style call */
       
  9435             if (IN_param_value == NULL)
       
  9436               IN_param_value = function_call_param_iterator.next();
       
  9437             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9438             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9439             
       
  9440             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9441             {
       
  9442         
       
  9443                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9444                 return return_type_symbol;
       
  9445                 
       
  9446             }
       
  9447             
       
  9448             
       
  9449             ERROR;
       
  9450         }
       
  9451         
       
  9452     }/*function_usint_to_lword*/
       
  9453     break;
       
  9454 
       
  9455 /****
       
  9456  *USINT_TO_UINT
       
  9457  */
       
  9458     case function_usint_to_uint :
       
  9459     {
       
  9460         symbol_c *last_type_symbol = NULL;
       
  9461 
       
  9462         {
       
  9463             identifier_c param_name("IN");
       
  9464             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9465             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9466             
       
  9467             /* Get the value from a foo(<param_value>) style call */
       
  9468             if (IN_param_value == NULL)
       
  9469               IN_param_value = function_call_param_iterator.next();
       
  9470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9472             
       
  9473             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9474             {
       
  9475         
       
  9476                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9477                 return return_type_symbol;
       
  9478                 
       
  9479             }
       
  9480             
       
  9481             
       
  9482             ERROR;
       
  9483         }
       
  9484         
       
  9485     }/*function_usint_to_uint*/
       
  9486     break;
       
  9487 
       
  9488 /****
       
  9489  *USINT_TO_LREAL
       
  9490  */
       
  9491     case function_usint_to_lreal :
       
  9492     {
       
  9493         symbol_c *last_type_symbol = NULL;
       
  9494 
       
  9495         {
       
  9496             identifier_c param_name("IN");
       
  9497             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9498             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9499             
       
  9500             /* Get the value from a foo(<param_value>) style call */
       
  9501             if (IN_param_value == NULL)
       
  9502               IN_param_value = function_call_param_iterator.next();
       
  9503             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9504             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9505             
       
  9506             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9507             {
       
  9508         
       
  9509                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9510                 return return_type_symbol;
       
  9511                 
       
  9512             }
       
  9513             
       
  9514             
       
  9515             ERROR;
       
  9516         }
       
  9517         
       
  9518     }/*function_usint_to_lreal*/
       
  9519     break;
       
  9520 
       
  9521 /****
       
  9522  *USINT_TO_BYTE
       
  9523  */
       
  9524     case function_usint_to_byte :
       
  9525     {
       
  9526         symbol_c *last_type_symbol = NULL;
       
  9527 
       
  9528         {
       
  9529             identifier_c param_name("IN");
       
  9530             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9531             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9532             
       
  9533             /* Get the value from a foo(<param_value>) style call */
       
  9534             if (IN_param_value == NULL)
       
  9535               IN_param_value = function_call_param_iterator.next();
       
  9536             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9537             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9538             
       
  9539             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9540             {
       
  9541         
       
  9542                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9543                 return return_type_symbol;
       
  9544                 
       
  9545             }
       
  9546             
       
  9547             
       
  9548             ERROR;
       
  9549         }
       
  9550         
       
  9551     }/*function_usint_to_byte*/
       
  9552     break;
       
  9553 
       
  9554 /****
       
  9555  *USINT_TO_ULINT
       
  9556  */
       
  9557     case function_usint_to_ulint :
       
  9558     {
       
  9559         symbol_c *last_type_symbol = NULL;
       
  9560 
       
  9561         {
       
  9562             identifier_c param_name("IN");
       
  9563             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9564             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9565             
       
  9566             /* Get the value from a foo(<param_value>) style call */
       
  9567             if (IN_param_value == NULL)
       
  9568               IN_param_value = function_call_param_iterator.next();
       
  9569             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9570             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9571             
       
  9572             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9573             {
       
  9574         
       
  9575                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9576                 return return_type_symbol;
       
  9577                 
       
  9578             }
       
  9579             
       
  9580             
       
  9581             ERROR;
       
  9582         }
       
  9583         
       
  9584     }/*function_usint_to_ulint*/
       
  9585     break;
       
  9586 
       
  9587 /****
       
  9588  *USINT_TO_BOOL
       
  9589  */
       
  9590     case function_usint_to_bool :
       
  9591     {
       
  9592         symbol_c *last_type_symbol = NULL;
       
  9593 
       
  9594         {
       
  9595             identifier_c param_name("IN");
       
  9596             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9597             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9598             
       
  9599             /* Get the value from a foo(<param_value>) style call */
       
  9600             if (IN_param_value == NULL)
       
  9601               IN_param_value = function_call_param_iterator.next();
       
  9602             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9603             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9604             
       
  9605             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9606             {
       
  9607         
       
  9608                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9609                 return return_type_symbol;
       
  9610                 
       
  9611             }
       
  9612             
       
  9613             
       
  9614             ERROR;
       
  9615         }
       
  9616         
       
  9617     }/*function_usint_to_bool*/
       
  9618     break;
       
  9619 
       
  9620 /****
       
  9621  *USINT_TO_TIME
       
  9622  */
       
  9623     case function_usint_to_time :
       
  9624     {
       
  9625         symbol_c *last_type_symbol = NULL;
       
  9626 
       
  9627         {
       
  9628             identifier_c param_name("IN");
       
  9629             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9630             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9631             
       
  9632             /* Get the value from a foo(<param_value>) style call */
       
  9633             if (IN_param_value == NULL)
       
  9634               IN_param_value = function_call_param_iterator.next();
       
  9635             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9636             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9637             
       
  9638             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9639             {
       
  9640         
       
  9641                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9642                 return return_type_symbol;
       
  9643                 
       
  9644             }
       
  9645             
       
  9646             
       
  9647             ERROR;
       
  9648         }
       
  9649         
       
  9650     }/*function_usint_to_time*/
       
  9651     break;
       
  9652 
       
  9653 /****
       
  9654  *USINT_TO_INT
       
  9655  */
       
  9656     case function_usint_to_int :
       
  9657     {
       
  9658         symbol_c *last_type_symbol = NULL;
       
  9659 
       
  9660         {
       
  9661             identifier_c param_name("IN");
       
  9662             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9663             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9664             
       
  9665             /* Get the value from a foo(<param_value>) style call */
       
  9666             if (IN_param_value == NULL)
       
  9667               IN_param_value = function_call_param_iterator.next();
       
  9668             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9669             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9670             
       
  9671             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
  9672             {
       
  9673         
       
  9674                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9675                 return return_type_symbol;
       
  9676                 
       
  9677             }
       
  9678             
       
  9679             
       
  9680             ERROR;
       
  9681         }
       
  9682         
       
  9683     }/*function_usint_to_int*/
       
  9684     break;
       
  9685 
       
  9686 /****
       
  9687  *ULINT_TO_REAL
       
  9688  */
       
  9689     case function_ulint_to_real :
       
  9690     {
       
  9691         symbol_c *last_type_symbol = NULL;
       
  9692 
       
  9693         {
       
  9694             identifier_c param_name("IN");
       
  9695             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9696             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9697             
       
  9698             /* Get the value from a foo(<param_value>) style call */
       
  9699             if (IN_param_value == NULL)
       
  9700               IN_param_value = function_call_param_iterator.next();
       
  9701             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9702             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9703             
       
  9704             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  9705             {
       
  9706         
       
  9707                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9708                 return return_type_symbol;
       
  9709                 
       
  9710             }
       
  9711             
       
  9712             
       
  9713             ERROR;
       
  9714         }
       
  9715         
       
  9716     }/*function_ulint_to_real*/
       
  9717     break;
       
  9718 
       
  9719 /****
       
  9720  *ULINT_TO_SINT
       
  9721  */
       
  9722     case function_ulint_to_sint :
       
  9723     {
       
  9724         symbol_c *last_type_symbol = NULL;
       
  9725 
       
  9726         {
       
  9727             identifier_c param_name("IN");
       
  9728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9730             
       
  9731             /* Get the value from a foo(<param_value>) style call */
       
  9732             if (IN_param_value == NULL)
       
  9733               IN_param_value = function_call_param_iterator.next();
       
  9734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9736             
       
  9737             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  9738             {
       
  9739         
       
  9740                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9741                 return return_type_symbol;
       
  9742                 
       
  9743             }
       
  9744             
       
  9745             
       
  9746             ERROR;
       
  9747         }
       
  9748         
       
  9749     }/*function_ulint_to_sint*/
       
  9750     break;
       
  9751 
       
  9752 /****
       
  9753  *ULINT_TO_LINT
       
  9754  */
       
  9755     case function_ulint_to_lint :
       
  9756     {
       
  9757         symbol_c *last_type_symbol = NULL;
       
  9758 
       
  9759         {
       
  9760             identifier_c param_name("IN");
       
  9761             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9762             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9763             
       
  9764             /* Get the value from a foo(<param_value>) style call */
       
  9765             if (IN_param_value == NULL)
       
  9766               IN_param_value = function_call_param_iterator.next();
       
  9767             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9768             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9769             
       
  9770             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  9771             {
       
  9772         
       
  9773                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9774                 return return_type_symbol;
       
  9775                 
       
  9776             }
       
  9777             
       
  9778             
       
  9779             ERROR;
       
  9780         }
       
  9781         
       
  9782     }/*function_ulint_to_lint*/
       
  9783     break;
       
  9784 
       
  9785 /****
       
  9786  *ULINT_TO_DINT
       
  9787  */
       
  9788     case function_ulint_to_dint :
       
  9789     {
       
  9790         symbol_c *last_type_symbol = NULL;
       
  9791 
       
  9792         {
       
  9793             identifier_c param_name("IN");
       
  9794             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9795             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9796             
       
  9797             /* Get the value from a foo(<param_value>) style call */
       
  9798             if (IN_param_value == NULL)
       
  9799               IN_param_value = function_call_param_iterator.next();
       
  9800             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9801             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9802             
       
  9803             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  9804             {
       
  9805         
       
  9806                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9807                 return return_type_symbol;
       
  9808                 
       
  9809             }
       
  9810             
       
  9811             
       
  9812             ERROR;
       
  9813         }
       
  9814         
       
  9815     }/*function_ulint_to_dint*/
       
  9816     break;
       
  9817 
       
  9818 /****
       
  9819  *ULINT_TO_DATE
       
  9820  */
       
  9821     case function_ulint_to_date :
       
  9822     {
       
  9823         symbol_c *last_type_symbol = NULL;
       
  9824 
       
  9825         {
       
  9826             identifier_c param_name("IN");
       
  9827             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9828             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9829             
       
  9830             /* Get the value from a foo(<param_value>) style call */
       
  9831             if (IN_param_value == NULL)
       
  9832               IN_param_value = function_call_param_iterator.next();
       
  9833             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9834             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9835             
       
  9836             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  9837             {
       
  9838         
       
  9839                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9840                 return return_type_symbol;
       
  9841                 
       
  9842             }
       
  9843             
       
  9844             
       
  9845             ERROR;
       
  9846         }
       
  9847         
       
  9848     }/*function_ulint_to_date*/
       
  9849     break;
       
  9850 
       
  9851 /****
       
  9852  *ULINT_TO_DWORD
       
  9853  */
       
  9854     case function_ulint_to_dword :
       
  9855     {
       
  9856         symbol_c *last_type_symbol = NULL;
       
  9857 
       
  9858         {
       
  9859             identifier_c param_name("IN");
       
  9860             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9861             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9862             
       
  9863             /* Get the value from a foo(<param_value>) style call */
       
  9864             if (IN_param_value == NULL)
       
  9865               IN_param_value = function_call_param_iterator.next();
       
  9866             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9867             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9868             
       
  9869             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  9870             {
       
  9871         
       
  9872                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9873                 return return_type_symbol;
       
  9874                 
       
  9875             }
       
  9876             
       
  9877             
       
  9878             ERROR;
       
  9879         }
       
  9880         
       
  9881     }/*function_ulint_to_dword*/
       
  9882     break;
       
  9883 
       
  9884 /****
       
  9885  *ULINT_TO_DT
       
  9886  */
       
  9887     case function_ulint_to_dt :
       
  9888     {
       
  9889         symbol_c *last_type_symbol = NULL;
       
  9890 
       
  9891         {
       
  9892             identifier_c param_name("IN");
       
  9893             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9894             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9895             
       
  9896             /* Get the value from a foo(<param_value>) style call */
       
  9897             if (IN_param_value == NULL)
       
  9898               IN_param_value = function_call_param_iterator.next();
       
  9899             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9900             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9901             
       
  9902             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  9903             {
       
  9904         
       
  9905                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9906                 return return_type_symbol;
       
  9907                 
       
  9908             }
       
  9909             
       
  9910             
       
  9911             ERROR;
       
  9912         }
       
  9913         
       
  9914     }/*function_ulint_to_dt*/
       
  9915     break;
       
  9916 
       
  9917 /****
       
  9918  *ULINT_TO_TOD
       
  9919  */
       
  9920     case function_ulint_to_tod :
       
  9921     {
       
  9922         symbol_c *last_type_symbol = NULL;
       
  9923 
       
  9924         {
       
  9925             identifier_c param_name("IN");
       
  9926             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9927             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9928             
       
  9929             /* Get the value from a foo(<param_value>) style call */
       
  9930             if (IN_param_value == NULL)
       
  9931               IN_param_value = function_call_param_iterator.next();
       
  9932             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9933             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9934             
       
  9935             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  9936             {
       
  9937         
       
  9938                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9939                 return return_type_symbol;
       
  9940                 
       
  9941             }
       
  9942             
       
  9943             
       
  9944             ERROR;
       
  9945         }
       
  9946         
       
  9947     }/*function_ulint_to_tod*/
       
  9948     break;
       
  9949 
       
  9950 /****
       
  9951  *ULINT_TO_UDINT
       
  9952  */
       
  9953     case function_ulint_to_udint :
       
  9954     {
       
  9955         symbol_c *last_type_symbol = NULL;
       
  9956 
       
  9957         {
       
  9958             identifier_c param_name("IN");
       
  9959             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9960             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9961             
       
  9962             /* Get the value from a foo(<param_value>) style call */
       
  9963             if (IN_param_value == NULL)
       
  9964               IN_param_value = function_call_param_iterator.next();
       
  9965             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9966             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9967             
       
  9968             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
  9969             {
       
  9970         
       
  9971                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9972                 return return_type_symbol;
       
  9973                 
       
  9974             }
       
  9975             
       
  9976             
       
  9977             ERROR;
       
  9978         }
       
  9979         
       
  9980     }/*function_ulint_to_udint*/
       
  9981     break;
       
  9982 
       
  9983 /****
       
  9984  *ULINT_TO_WORD
       
  9985  */
       
  9986     case function_ulint_to_word :
       
  9987     {
       
  9988         symbol_c *last_type_symbol = NULL;
       
  9989 
       
  9990         {
       
  9991             identifier_c param_name("IN");
       
  9992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9994             
       
  9995             /* Get the value from a foo(<param_value>) style call */
       
  9996             if (IN_param_value == NULL)
       
  9997               IN_param_value = function_call_param_iterator.next();
       
  9998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10000             
       
 10001             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10002             {
       
 10003         
       
 10004                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10005                 return return_type_symbol;
       
 10006                 
       
 10007             }
       
 10008             
       
 10009             
       
 10010             ERROR;
       
 10011         }
       
 10012         
       
 10013     }/*function_ulint_to_word*/
       
 10014     break;
       
 10015 
       
 10016 /****
       
 10017  *ULINT_TO_STRING
       
 10018  */
       
 10019     case function_ulint_to_string :
       
 10020     {
       
 10021         symbol_c *last_type_symbol = NULL;
       
 10022 
       
 10023         {
       
 10024             identifier_c param_name("IN");
       
 10025             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10026             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10027             
       
 10028             /* Get the value from a foo(<param_value>) style call */
       
 10029             if (IN_param_value == NULL)
       
 10030               IN_param_value = function_call_param_iterator.next();
       
 10031             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10032             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10033             
       
 10034             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10035             {
       
 10036         
       
 10037                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10038                 return return_type_symbol;
       
 10039                 
       
 10040             }
       
 10041             
       
 10042             
       
 10043             ERROR;
       
 10044         }
       
 10045         
       
 10046     }/*function_ulint_to_string*/
       
 10047     break;
       
 10048 
       
 10049 /****
       
 10050  *ULINT_TO_LWORD
       
 10051  */
       
 10052     case function_ulint_to_lword :
       
 10053     {
       
 10054         symbol_c *last_type_symbol = NULL;
       
 10055 
       
 10056         {
       
 10057             identifier_c param_name("IN");
       
 10058             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10059             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10060             
       
 10061             /* Get the value from a foo(<param_value>) style call */
       
 10062             if (IN_param_value == NULL)
       
 10063               IN_param_value = function_call_param_iterator.next();
       
 10064             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10065             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10066             
       
 10067             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10068             {
       
 10069         
       
 10070                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10071                 return return_type_symbol;
       
 10072                 
       
 10073             }
       
 10074             
       
 10075             
       
 10076             ERROR;
       
 10077         }
       
 10078         
       
 10079     }/*function_ulint_to_lword*/
       
 10080     break;
       
 10081 
       
 10082 /****
       
 10083  *ULINT_TO_UINT
       
 10084  */
       
 10085     case function_ulint_to_uint :
       
 10086     {
       
 10087         symbol_c *last_type_symbol = NULL;
       
 10088 
       
 10089         {
       
 10090             identifier_c param_name("IN");
       
 10091             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10092             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10093             
       
 10094             /* Get the value from a foo(<param_value>) style call */
       
 10095             if (IN_param_value == NULL)
       
 10096               IN_param_value = function_call_param_iterator.next();
       
 10097             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10098             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10099             
       
 10100             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10101             {
       
 10102         
       
 10103                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10104                 return return_type_symbol;
       
 10105                 
       
 10106             }
       
 10107             
       
 10108             
       
 10109             ERROR;
       
 10110         }
       
 10111         
       
 10112     }/*function_ulint_to_uint*/
       
 10113     break;
       
 10114 
       
 10115 /****
       
 10116  *ULINT_TO_LREAL
       
 10117  */
       
 10118     case function_ulint_to_lreal :
       
 10119     {
       
 10120         symbol_c *last_type_symbol = NULL;
       
 10121 
       
 10122         {
       
 10123             identifier_c param_name("IN");
       
 10124             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10125             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10126             
       
 10127             /* Get the value from a foo(<param_value>) style call */
       
 10128             if (IN_param_value == NULL)
       
 10129               IN_param_value = function_call_param_iterator.next();
       
 10130             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10131             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10132             
       
 10133             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10134             {
       
 10135         
       
 10136                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10137                 return return_type_symbol;
       
 10138                 
       
 10139             }
       
 10140             
       
 10141             
       
 10142             ERROR;
       
 10143         }
       
 10144         
       
 10145     }/*function_ulint_to_lreal*/
       
 10146     break;
       
 10147 
       
 10148 /****
       
 10149  *ULINT_TO_BYTE
       
 10150  */
       
 10151     case function_ulint_to_byte :
       
 10152     {
       
 10153         symbol_c *last_type_symbol = NULL;
       
 10154 
       
 10155         {
       
 10156             identifier_c param_name("IN");
       
 10157             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10158             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10159             
       
 10160             /* Get the value from a foo(<param_value>) style call */
       
 10161             if (IN_param_value == NULL)
       
 10162               IN_param_value = function_call_param_iterator.next();
       
 10163             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10164             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10165             
       
 10166             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10167             {
       
 10168         
       
 10169                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10170                 return return_type_symbol;
       
 10171                 
       
 10172             }
       
 10173             
       
 10174             
       
 10175             ERROR;
       
 10176         }
       
 10177         
       
 10178     }/*function_ulint_to_byte*/
       
 10179     break;
       
 10180 
       
 10181 /****
       
 10182  *ULINT_TO_USINT
       
 10183  */
       
 10184     case function_ulint_to_usint :
       
 10185     {
       
 10186         symbol_c *last_type_symbol = NULL;
       
 10187 
       
 10188         {
       
 10189             identifier_c param_name("IN");
       
 10190             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10191             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10192             
       
 10193             /* Get the value from a foo(<param_value>) style call */
       
 10194             if (IN_param_value == NULL)
       
 10195               IN_param_value = function_call_param_iterator.next();
       
 10196             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10197             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10198             
       
 10199             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10200             {
       
 10201         
       
 10202                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10203                 return return_type_symbol;
       
 10204                 
       
 10205             }
       
 10206             
       
 10207             
       
 10208             ERROR;
       
 10209         }
       
 10210         
       
 10211     }/*function_ulint_to_usint*/
       
 10212     break;
       
 10213 
       
 10214 /****
       
 10215  *ULINT_TO_BOOL
       
 10216  */
       
 10217     case function_ulint_to_bool :
       
 10218     {
       
 10219         symbol_c *last_type_symbol = NULL;
       
 10220 
       
 10221         {
       
 10222             identifier_c param_name("IN");
       
 10223             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10224             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10225             
       
 10226             /* Get the value from a foo(<param_value>) style call */
       
 10227             if (IN_param_value == NULL)
       
 10228               IN_param_value = function_call_param_iterator.next();
       
 10229             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10230             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10231             
       
 10232             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10233             {
       
 10234         
       
 10235                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10236                 return return_type_symbol;
       
 10237                 
       
 10238             }
       
 10239             
       
 10240             
       
 10241             ERROR;
       
 10242         }
       
 10243         
       
 10244     }/*function_ulint_to_bool*/
       
 10245     break;
       
 10246 
       
 10247 /****
       
 10248  *ULINT_TO_TIME
       
 10249  */
       
 10250     case function_ulint_to_time :
       
 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::ulint_type_name, last_type_symbol))
       
 10266             {
       
 10267         
       
 10268                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10269                 return return_type_symbol;
       
 10270                 
       
 10271             }
       
 10272             
       
 10273             
       
 10274             ERROR;
       
 10275         }
       
 10276         
       
 10277     }/*function_ulint_to_time*/
       
 10278     break;
       
 10279 
       
 10280 /****
       
 10281  *ULINT_TO_INT
       
 10282  */
       
 10283     case function_ulint_to_int :
       
 10284     {
       
 10285         symbol_c *last_type_symbol = NULL;
       
 10286 
       
 10287         {
       
 10288             identifier_c param_name("IN");
       
 10289             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10290             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10291             
       
 10292             /* Get the value from a foo(<param_value>) style call */
       
 10293             if (IN_param_value == NULL)
       
 10294               IN_param_value = function_call_param_iterator.next();
       
 10295             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10296             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10297             
       
 10298             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 10299             {
       
 10300         
       
 10301                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10302                 return return_type_symbol;
       
 10303                 
       
 10304             }
       
 10305             
       
 10306             
       
 10307             ERROR;
       
 10308         }
       
 10309         
       
 10310     }/*function_ulint_to_int*/
       
 10311     break;
       
 10312 
       
 10313 /****
       
 10314  *BOOL_TO_REAL
       
 10315  */
       
 10316     case function_bool_to_real :
       
 10317     {
       
 10318         symbol_c *last_type_symbol = NULL;
       
 10319 
       
 10320         {
       
 10321             identifier_c param_name("IN");
       
 10322             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10323             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10324             
       
 10325             /* Get the value from a foo(<param_value>) style call */
       
 10326             if (IN_param_value == NULL)
       
 10327               IN_param_value = function_call_param_iterator.next();
       
 10328             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10329             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10330             
       
 10331             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10332             {
       
 10333         
       
 10334                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10335                 return return_type_symbol;
       
 10336                 
       
 10337             }
       
 10338             
       
 10339             
       
 10340             ERROR;
       
 10341         }
       
 10342         
       
 10343     }/*function_bool_to_real*/
       
 10344     break;
       
 10345 
       
 10346 /****
    40  *BOOL_TO_SINT
 10347  *BOOL_TO_SINT
    41  */
 10348  */
    42     case function_bool_to_sint :
 10349     case function_bool_to_sint :
    43     {
 10350     {
    44         symbol_c *last_type_symbol = NULL;
 10351         symbol_c *last_type_symbol = NULL;
    60                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 10367                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    61                 return return_type_symbol;
 10368                 return return_type_symbol;
    62                 
 10369                 
    63             }
 10370             }
    64             
 10371             
       
 10372             
    65             ERROR;
 10373             ERROR;
    66         }
 10374         }
    67         
 10375         
    68     }/*function_bool_to_sint*/
 10376     }/*function_bool_to_sint*/
    69     break;
 10377     break;
    70 
 10378 
    71 /****
 10379 /****
       
 10380  *BOOL_TO_LINT
       
 10381  */
       
 10382     case function_bool_to_lint :
       
 10383     {
       
 10384         symbol_c *last_type_symbol = NULL;
       
 10385 
       
 10386         {
       
 10387             identifier_c param_name("IN");
       
 10388             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10389             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10390             
       
 10391             /* Get the value from a foo(<param_value>) style call */
       
 10392             if (IN_param_value == NULL)
       
 10393               IN_param_value = function_call_param_iterator.next();
       
 10394             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10395             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10396             
       
 10397             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10398             {
       
 10399         
       
 10400                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10401                 return return_type_symbol;
       
 10402                 
       
 10403             }
       
 10404             
       
 10405             
       
 10406             ERROR;
       
 10407         }
       
 10408         
       
 10409     }/*function_bool_to_lint*/
       
 10410     break;
       
 10411 
       
 10412 /****
       
 10413  *BOOL_TO_DINT
       
 10414  */
       
 10415     case function_bool_to_dint :
       
 10416     {
       
 10417         symbol_c *last_type_symbol = NULL;
       
 10418 
       
 10419         {
       
 10420             identifier_c param_name("IN");
       
 10421             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10422             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10423             
       
 10424             /* Get the value from a foo(<param_value>) style call */
       
 10425             if (IN_param_value == NULL)
       
 10426               IN_param_value = function_call_param_iterator.next();
       
 10427             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10428             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10429             
       
 10430             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10431             {
       
 10432         
       
 10433                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10434                 return return_type_symbol;
       
 10435                 
       
 10436             }
       
 10437             
       
 10438             
       
 10439             ERROR;
       
 10440         }
       
 10441         
       
 10442     }/*function_bool_to_dint*/
       
 10443     break;
       
 10444 
       
 10445 /****
       
 10446  *BOOL_TO_DATE
       
 10447  */
       
 10448     case function_bool_to_date :
       
 10449     {
       
 10450         symbol_c *last_type_symbol = NULL;
       
 10451 
       
 10452         {
       
 10453             identifier_c param_name("IN");
       
 10454             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10455             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10456             
       
 10457             /* Get the value from a foo(<param_value>) style call */
       
 10458             if (IN_param_value == NULL)
       
 10459               IN_param_value = function_call_param_iterator.next();
       
 10460             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10461             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10462             
       
 10463             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10464             {
       
 10465         
       
 10466                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10467                 return return_type_symbol;
       
 10468                 
       
 10469             }
       
 10470             
       
 10471             
       
 10472             ERROR;
       
 10473         }
       
 10474         
       
 10475     }/*function_bool_to_date*/
       
 10476     break;
       
 10477 
       
 10478 /****
       
 10479  *BOOL_TO_DWORD
       
 10480  */
       
 10481     case function_bool_to_dword :
       
 10482     {
       
 10483         symbol_c *last_type_symbol = NULL;
       
 10484 
       
 10485         {
       
 10486             identifier_c param_name("IN");
       
 10487             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10488             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10489             
       
 10490             /* Get the value from a foo(<param_value>) style call */
       
 10491             if (IN_param_value == NULL)
       
 10492               IN_param_value = function_call_param_iterator.next();
       
 10493             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10494             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10495             
       
 10496             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10497             {
       
 10498         
       
 10499                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10500                 return return_type_symbol;
       
 10501                 
       
 10502             }
       
 10503             
       
 10504             
       
 10505             ERROR;
       
 10506         }
       
 10507         
       
 10508     }/*function_bool_to_dword*/
       
 10509     break;
       
 10510 
       
 10511 /****
       
 10512  *BOOL_TO_DT
       
 10513  */
       
 10514     case function_bool_to_dt :
       
 10515     {
       
 10516         symbol_c *last_type_symbol = NULL;
       
 10517 
       
 10518         {
       
 10519             identifier_c param_name("IN");
       
 10520             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10521             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10522             
       
 10523             /* Get the value from a foo(<param_value>) style call */
       
 10524             if (IN_param_value == NULL)
       
 10525               IN_param_value = function_call_param_iterator.next();
       
 10526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10528             
       
 10529             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10530             {
       
 10531         
       
 10532                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10533                 return return_type_symbol;
       
 10534                 
       
 10535             }
       
 10536             
       
 10537             
       
 10538             ERROR;
       
 10539         }
       
 10540         
       
 10541     }/*function_bool_to_dt*/
       
 10542     break;
       
 10543 
       
 10544 /****
       
 10545  *BOOL_TO_TOD
       
 10546  */
       
 10547     case function_bool_to_tod :
       
 10548     {
       
 10549         symbol_c *last_type_symbol = NULL;
       
 10550 
       
 10551         {
       
 10552             identifier_c param_name("IN");
       
 10553             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10554             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10555             
       
 10556             /* Get the value from a foo(<param_value>) style call */
       
 10557             if (IN_param_value == NULL)
       
 10558               IN_param_value = function_call_param_iterator.next();
       
 10559             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10560             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10561             
       
 10562             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10563             {
       
 10564         
       
 10565                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10566                 return return_type_symbol;
       
 10567                 
       
 10568             }
       
 10569             
       
 10570             
       
 10571             ERROR;
       
 10572         }
       
 10573         
       
 10574     }/*function_bool_to_tod*/
       
 10575     break;
       
 10576 
       
 10577 /****
       
 10578  *BOOL_TO_UDINT
       
 10579  */
       
 10580     case function_bool_to_udint :
       
 10581     {
       
 10582         symbol_c *last_type_symbol = NULL;
       
 10583 
       
 10584         {
       
 10585             identifier_c param_name("IN");
       
 10586             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10587             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10588             
       
 10589             /* Get the value from a foo(<param_value>) style call */
       
 10590             if (IN_param_value == NULL)
       
 10591               IN_param_value = function_call_param_iterator.next();
       
 10592             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10593             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10594             
       
 10595             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10596             {
       
 10597         
       
 10598                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10599                 return return_type_symbol;
       
 10600                 
       
 10601             }
       
 10602             
       
 10603             
       
 10604             ERROR;
       
 10605         }
       
 10606         
       
 10607     }/*function_bool_to_udint*/
       
 10608     break;
       
 10609 
       
 10610 /****
       
 10611  *BOOL_TO_WORD
       
 10612  */
       
 10613     case function_bool_to_word :
       
 10614     {
       
 10615         symbol_c *last_type_symbol = NULL;
       
 10616 
       
 10617         {
       
 10618             identifier_c param_name("IN");
       
 10619             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10620             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10621             
       
 10622             /* Get the value from a foo(<param_value>) style call */
       
 10623             if (IN_param_value == NULL)
       
 10624               IN_param_value = function_call_param_iterator.next();
       
 10625             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10626             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10627             
       
 10628             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10629             {
       
 10630         
       
 10631                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 10632                 return return_type_symbol;
       
 10633                 
       
 10634             }
       
 10635             
       
 10636             
       
 10637             ERROR;
       
 10638         }
       
 10639         
       
 10640     }/*function_bool_to_word*/
       
 10641     break;
       
 10642 
       
 10643 /****
       
 10644  *BOOL_TO_STRING
       
 10645  */
       
 10646     case function_bool_to_string :
       
 10647     {
       
 10648         symbol_c *last_type_symbol = NULL;
       
 10649 
       
 10650         {
       
 10651             identifier_c param_name("IN");
       
 10652             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10653             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10654             
       
 10655             /* Get the value from a foo(<param_value>) style call */
       
 10656             if (IN_param_value == NULL)
       
 10657               IN_param_value = function_call_param_iterator.next();
       
 10658             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10659             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10660             
       
 10661             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10662             {
       
 10663         
       
 10664                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10665                 return return_type_symbol;
       
 10666                 
       
 10667             }
       
 10668             
       
 10669             
       
 10670             ERROR;
       
 10671         }
       
 10672         
       
 10673     }/*function_bool_to_string*/
       
 10674     break;
       
 10675 
       
 10676 /****
       
 10677  *BOOL_TO_LWORD
       
 10678  */
       
 10679     case function_bool_to_lword :
       
 10680     {
       
 10681         symbol_c *last_type_symbol = NULL;
       
 10682 
       
 10683         {
       
 10684             identifier_c param_name("IN");
       
 10685             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10686             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10687             
       
 10688             /* Get the value from a foo(<param_value>) style call */
       
 10689             if (IN_param_value == NULL)
       
 10690               IN_param_value = function_call_param_iterator.next();
       
 10691             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10692             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10693             
       
 10694             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10695             {
       
 10696         
       
 10697                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10698                 return return_type_symbol;
       
 10699                 
       
 10700             }
       
 10701             
       
 10702             
       
 10703             ERROR;
       
 10704         }
       
 10705         
       
 10706     }/*function_bool_to_lword*/
       
 10707     break;
       
 10708 
       
 10709 /****
       
 10710  *BOOL_TO_UINT
       
 10711  */
       
 10712     case function_bool_to_uint :
       
 10713     {
       
 10714         symbol_c *last_type_symbol = NULL;
       
 10715 
       
 10716         {
       
 10717             identifier_c param_name("IN");
       
 10718             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10719             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10720             
       
 10721             /* Get the value from a foo(<param_value>) style call */
       
 10722             if (IN_param_value == NULL)
       
 10723               IN_param_value = function_call_param_iterator.next();
       
 10724             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10725             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10726             
       
 10727             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10728             {
       
 10729         
       
 10730                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10731                 return return_type_symbol;
       
 10732                 
       
 10733             }
       
 10734             
       
 10735             
       
 10736             ERROR;
       
 10737         }
       
 10738         
       
 10739     }/*function_bool_to_uint*/
       
 10740     break;
       
 10741 
       
 10742 /****
       
 10743  *BOOL_TO_LREAL
       
 10744  */
       
 10745     case function_bool_to_lreal :
       
 10746     {
       
 10747         symbol_c *last_type_symbol = NULL;
       
 10748 
       
 10749         {
       
 10750             identifier_c param_name("IN");
       
 10751             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10752             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10753             
       
 10754             /* Get the value from a foo(<param_value>) style call */
       
 10755             if (IN_param_value == NULL)
       
 10756               IN_param_value = function_call_param_iterator.next();
       
 10757             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10758             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10759             
       
 10760             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10761             {
       
 10762         
       
 10763                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10764                 return return_type_symbol;
       
 10765                 
       
 10766             }
       
 10767             
       
 10768             
       
 10769             ERROR;
       
 10770         }
       
 10771         
       
 10772     }/*function_bool_to_lreal*/
       
 10773     break;
       
 10774 
       
 10775 /****
       
 10776  *BOOL_TO_BYTE
       
 10777  */
       
 10778     case function_bool_to_byte :
       
 10779     {
       
 10780         symbol_c *last_type_symbol = NULL;
       
 10781 
       
 10782         {
       
 10783             identifier_c param_name("IN");
       
 10784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10786             
       
 10787             /* Get the value from a foo(<param_value>) style call */
       
 10788             if (IN_param_value == NULL)
       
 10789               IN_param_value = function_call_param_iterator.next();
       
 10790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10792             
       
 10793             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10794             {
       
 10795         
       
 10796                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10797                 return return_type_symbol;
       
 10798                 
       
 10799             }
       
 10800             
       
 10801             
       
 10802             ERROR;
       
 10803         }
       
 10804         
       
 10805     }/*function_bool_to_byte*/
       
 10806     break;
       
 10807 
       
 10808 /****
       
 10809  *BOOL_TO_USINT
       
 10810  */
       
 10811     case function_bool_to_usint :
       
 10812     {
       
 10813         symbol_c *last_type_symbol = NULL;
       
 10814 
       
 10815         {
       
 10816             identifier_c param_name("IN");
       
 10817             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10818             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10819             
       
 10820             /* Get the value from a foo(<param_value>) style call */
       
 10821             if (IN_param_value == NULL)
       
 10822               IN_param_value = function_call_param_iterator.next();
       
 10823             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10824             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10825             
       
 10826             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10827             {
       
 10828         
       
 10829                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10830                 return return_type_symbol;
       
 10831                 
       
 10832             }
       
 10833             
       
 10834             
       
 10835             ERROR;
       
 10836         }
       
 10837         
       
 10838     }/*function_bool_to_usint*/
       
 10839     break;
       
 10840 
       
 10841 /****
       
 10842  *BOOL_TO_ULINT
       
 10843  */
       
 10844     case function_bool_to_ulint :
       
 10845     {
       
 10846         symbol_c *last_type_symbol = NULL;
       
 10847 
       
 10848         {
       
 10849             identifier_c param_name("IN");
       
 10850             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10851             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10852             
       
 10853             /* Get the value from a foo(<param_value>) style call */
       
 10854             if (IN_param_value == NULL)
       
 10855               IN_param_value = function_call_param_iterator.next();
       
 10856             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10857             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10858             
       
 10859             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10860             {
       
 10861         
       
 10862                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10863                 return return_type_symbol;
       
 10864                 
       
 10865             }
       
 10866             
       
 10867             
       
 10868             ERROR;
       
 10869         }
       
 10870         
       
 10871     }/*function_bool_to_ulint*/
       
 10872     break;
       
 10873 
       
 10874 /****
       
 10875  *BOOL_TO_TIME
       
 10876  */
       
 10877     case function_bool_to_time :
       
 10878     {
       
 10879         symbol_c *last_type_symbol = NULL;
       
 10880 
       
 10881         {
       
 10882             identifier_c param_name("IN");
       
 10883             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10884             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10885             
       
 10886             /* Get the value from a foo(<param_value>) style call */
       
 10887             if (IN_param_value == NULL)
       
 10888               IN_param_value = function_call_param_iterator.next();
       
 10889             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10890             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10891             
       
 10892             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 10893             {
       
 10894         
       
 10895                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10896                 return return_type_symbol;
       
 10897                 
       
 10898             }
       
 10899             
       
 10900             
       
 10901             ERROR;
       
 10902         }
       
 10903         
       
 10904     }/*function_bool_to_time*/
       
 10905     break;
       
 10906 
       
 10907 /****
    72  *BOOL_TO_INT
 10908  *BOOL_TO_INT
    73  */
 10909  */
    74     case function_bool_to_int :
 10910     case function_bool_to_int :
    75     {
 10911     {
    76         symbol_c *last_type_symbol = NULL;
 10912         symbol_c *last_type_symbol = NULL;
    92                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 10928                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
    93                 return return_type_symbol;
 10929                 return return_type_symbol;
    94                 
 10930                 
    95             }
 10931             }
    96             
 10932             
       
 10933             
    97             ERROR;
 10934             ERROR;
    98         }
 10935         }
    99         
 10936         
   100     }/*function_bool_to_int*/
 10937     }/*function_bool_to_int*/
   101     break;
 10938     break;
   102 
 10939 
   103 /****
 10940 /****
   104  *BOOL_TO_DINT
 10941  *TIME_TO_REAL
   105  */
 10942  */
   106     case function_bool_to_dint :
 10943     case function_time_to_real :
   107     {
 10944     {
   108         symbol_c *last_type_symbol = NULL;
 10945         symbol_c *last_type_symbol = NULL;
   109 
 10946 
   110         {
 10947         {
   111             identifier_c param_name("IN");
 10948             identifier_c param_name("IN");
   112             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10949             /* 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);
 10950             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   114             
 10951             
   115             /* Get the value from a foo(<param_value>) style call */
 10952             /* Get the value from a foo(<param_value>) style call */
   116             if (IN_param_value == NULL)
 10953             if (IN_param_value == NULL)
   117               IN_param_value = function_call_param_iterator.next();
 10954               IN_param_value = function_call_param_iterator.next();
   118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10955             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 ;
 10956             last_type_symbol = last_type_symbol && search_expression_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             
 10957             
   121             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 10958             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 10959             {
       
 10960         
       
 10961                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10962                 return return_type_symbol;
       
 10963                 
       
 10964             }
       
 10965             
       
 10966             
       
 10967             ERROR;
       
 10968         }
       
 10969         
       
 10970     }/*function_time_to_real*/
       
 10971     break;
       
 10972 
       
 10973 /****
       
 10974  *TIME_TO_SINT
       
 10975  */
       
 10976     case function_time_to_sint :
       
 10977     {
       
 10978         symbol_c *last_type_symbol = NULL;
       
 10979 
       
 10980         {
       
 10981             identifier_c param_name("IN");
       
 10982             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10983             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10984             
       
 10985             /* Get the value from a foo(<param_value>) style call */
       
 10986             if (IN_param_value == NULL)
       
 10987               IN_param_value = function_call_param_iterator.next();
       
 10988             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10989             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10990             
       
 10991             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 10992             {
       
 10993         
       
 10994                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10995                 return return_type_symbol;
       
 10996                 
       
 10997             }
       
 10998             
       
 10999             
       
 11000             ERROR;
       
 11001         }
       
 11002         
       
 11003     }/*function_time_to_sint*/
       
 11004     break;
       
 11005 
       
 11006 /****
       
 11007  *TIME_TO_LINT
       
 11008  */
       
 11009     case function_time_to_lint :
       
 11010     {
       
 11011         symbol_c *last_type_symbol = NULL;
       
 11012 
       
 11013         {
       
 11014             identifier_c param_name("IN");
       
 11015             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11016             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11017             
       
 11018             /* Get the value from a foo(<param_value>) style call */
       
 11019             if (IN_param_value == NULL)
       
 11020               IN_param_value = function_call_param_iterator.next();
       
 11021             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11022             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11023             
       
 11024             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11025             {
       
 11026         
       
 11027                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11028                 return return_type_symbol;
       
 11029                 
       
 11030             }
       
 11031             
       
 11032             
       
 11033             ERROR;
       
 11034         }
       
 11035         
       
 11036     }/*function_time_to_lint*/
       
 11037     break;
       
 11038 
       
 11039 /****
       
 11040  *TIME_TO_DINT
       
 11041  */
       
 11042     case function_time_to_dint :
       
 11043     {
       
 11044         symbol_c *last_type_symbol = NULL;
       
 11045 
       
 11046         {
       
 11047             identifier_c param_name("IN");
       
 11048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11050             
       
 11051             /* Get the value from a foo(<param_value>) style call */
       
 11052             if (IN_param_value == NULL)
       
 11053               IN_param_value = function_call_param_iterator.next();
       
 11054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11056             
       
 11057             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
   122             {
 11058             {
   123         
 11059         
   124                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 11060                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   125                 return return_type_symbol;
 11061                 return return_type_symbol;
   126                 
 11062                 
   127             }
 11063             }
   128             
 11064             
   129             ERROR;
 11065             
   130         }
 11066             ERROR;
   131         
 11067         }
   132     }/*function_bool_to_dint*/
 11068         
   133     break;
 11069     }/*function_time_to_dint*/
   134 
 11070     break;
   135 /****
 11071 
   136  *BOOL_TO_LINT
 11072 /****
   137  */
 11073  *TIME_TO_DWORD
   138     case function_bool_to_lint :
 11074  */
   139     {
 11075     case function_time_to_dword :
   140         symbol_c *last_type_symbol = NULL;
 11076     {
   141 
 11077         symbol_c *last_type_symbol = NULL;
   142         {
 11078 
   143             identifier_c param_name("IN");
 11079         {
   144             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11080             identifier_c param_name("IN");
   145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11081             /* Get the value from a foo(<param_name> = <param_value>) style call */
   146             
 11082             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   147             /* Get the value from a foo(<param_value>) style call */
 11083             
   148             if (IN_param_value == NULL)
 11084             /* Get the value from a foo(<param_value>) style call */
   149               IN_param_value = function_call_param_iterator.next();
 11085             if (IN_param_value == NULL)
   150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11086               IN_param_value = function_call_param_iterator.next();
   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 ;
 11087             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   152             
 11088             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   153             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 11089             
       
 11090             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11091             {
       
 11092         
       
 11093                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11094                 return return_type_symbol;
       
 11095                 
       
 11096             }
       
 11097             
       
 11098             
       
 11099             ERROR;
       
 11100         }
       
 11101         
       
 11102     }/*function_time_to_dword*/
       
 11103     break;
       
 11104 
       
 11105 /****
       
 11106  *TIME_TO_UDINT
       
 11107  */
       
 11108     case function_time_to_udint :
       
 11109     {
       
 11110         symbol_c *last_type_symbol = NULL;
       
 11111 
       
 11112         {
       
 11113             identifier_c param_name("IN");
       
 11114             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11115             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11116             
       
 11117             /* Get the value from a foo(<param_value>) style call */
       
 11118             if (IN_param_value == NULL)
       
 11119               IN_param_value = function_call_param_iterator.next();
       
 11120             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11121             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11122             
       
 11123             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11124             {
       
 11125         
       
 11126                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11127                 return return_type_symbol;
       
 11128                 
       
 11129             }
       
 11130             
       
 11131             
       
 11132             ERROR;
       
 11133         }
       
 11134         
       
 11135     }/*function_time_to_udint*/
       
 11136     break;
       
 11137 
       
 11138 /****
       
 11139  *TIME_TO_WORD
       
 11140  */
       
 11141     case function_time_to_word :
       
 11142     {
       
 11143         symbol_c *last_type_symbol = NULL;
       
 11144 
       
 11145         {
       
 11146             identifier_c param_name("IN");
       
 11147             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11148             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11149             
       
 11150             /* Get the value from a foo(<param_value>) style call */
       
 11151             if (IN_param_value == NULL)
       
 11152               IN_param_value = function_call_param_iterator.next();
       
 11153             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11154             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11155             
       
 11156             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11157             {
       
 11158         
       
 11159                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11160                 return return_type_symbol;
       
 11161                 
       
 11162             }
       
 11163             
       
 11164             
       
 11165             ERROR;
       
 11166         }
       
 11167         
       
 11168     }/*function_time_to_word*/
       
 11169     break;
       
 11170 
       
 11171 /****
       
 11172  *TIME_TO_STRING
       
 11173  */
       
 11174     case function_time_to_string :
       
 11175     {
       
 11176         symbol_c *last_type_symbol = NULL;
       
 11177 
       
 11178         {
       
 11179             identifier_c param_name("IN");
       
 11180             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11181             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11182             
       
 11183             /* Get the value from a foo(<param_value>) style call */
       
 11184             if (IN_param_value == NULL)
       
 11185               IN_param_value = function_call_param_iterator.next();
       
 11186             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11187             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11188             
       
 11189             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11190             {
       
 11191         
       
 11192                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11193                 return return_type_symbol;
       
 11194                 
       
 11195             }
       
 11196             
       
 11197             
       
 11198             ERROR;
       
 11199         }
       
 11200         
       
 11201     }/*function_time_to_string*/
       
 11202     break;
       
 11203 
       
 11204 /****
       
 11205  *TIME_TO_LWORD
       
 11206  */
       
 11207     case function_time_to_lword :
       
 11208     {
       
 11209         symbol_c *last_type_symbol = NULL;
       
 11210 
       
 11211         {
       
 11212             identifier_c param_name("IN");
       
 11213             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11214             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11215             
       
 11216             /* Get the value from a foo(<param_value>) style call */
       
 11217             if (IN_param_value == NULL)
       
 11218               IN_param_value = function_call_param_iterator.next();
       
 11219             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11220             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11221             
       
 11222             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11223             {
       
 11224         
       
 11225                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11226                 return return_type_symbol;
       
 11227                 
       
 11228             }
       
 11229             
       
 11230             
       
 11231             ERROR;
       
 11232         }
       
 11233         
       
 11234     }/*function_time_to_lword*/
       
 11235     break;
       
 11236 
       
 11237 /****
       
 11238  *TIME_TO_UINT
       
 11239  */
       
 11240     case function_time_to_uint :
       
 11241     {
       
 11242         symbol_c *last_type_symbol = NULL;
       
 11243 
       
 11244         {
       
 11245             identifier_c param_name("IN");
       
 11246             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11247             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11248             
       
 11249             /* Get the value from a foo(<param_value>) style call */
       
 11250             if (IN_param_value == NULL)
       
 11251               IN_param_value = function_call_param_iterator.next();
       
 11252             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11253             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11254             
       
 11255             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11256             {
       
 11257         
       
 11258                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11259                 return return_type_symbol;
       
 11260                 
       
 11261             }
       
 11262             
       
 11263             
       
 11264             ERROR;
       
 11265         }
       
 11266         
       
 11267     }/*function_time_to_uint*/
       
 11268     break;
       
 11269 
       
 11270 /****
       
 11271  *TIME_TO_LREAL
       
 11272  */
       
 11273     case function_time_to_lreal :
       
 11274     {
       
 11275         symbol_c *last_type_symbol = NULL;
       
 11276 
       
 11277         {
       
 11278             identifier_c param_name("IN");
       
 11279             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11280             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11281             
       
 11282             /* Get the value from a foo(<param_value>) style call */
       
 11283             if (IN_param_value == NULL)
       
 11284               IN_param_value = function_call_param_iterator.next();
       
 11285             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11286             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11287             
       
 11288             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11289             {
       
 11290         
       
 11291                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11292                 return return_type_symbol;
       
 11293                 
       
 11294             }
       
 11295             
       
 11296             
       
 11297             ERROR;
       
 11298         }
       
 11299         
       
 11300     }/*function_time_to_lreal*/
       
 11301     break;
       
 11302 
       
 11303 /****
       
 11304  *TIME_TO_BYTE
       
 11305  */
       
 11306     case function_time_to_byte :
       
 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::time_type_name, last_type_symbol))
       
 11322             {
       
 11323         
       
 11324                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11325                 return return_type_symbol;
       
 11326                 
       
 11327             }
       
 11328             
       
 11329             
       
 11330             ERROR;
       
 11331         }
       
 11332         
       
 11333     }/*function_time_to_byte*/
       
 11334     break;
       
 11335 
       
 11336 /****
       
 11337  *TIME_TO_USINT
       
 11338  */
       
 11339     case function_time_to_usint :
       
 11340     {
       
 11341         symbol_c *last_type_symbol = NULL;
       
 11342 
       
 11343         {
       
 11344             identifier_c param_name("IN");
       
 11345             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11346             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11347             
       
 11348             /* Get the value from a foo(<param_value>) style call */
       
 11349             if (IN_param_value == NULL)
       
 11350               IN_param_value = function_call_param_iterator.next();
       
 11351             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11352             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11353             
       
 11354             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11355             {
       
 11356         
       
 11357                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11358                 return return_type_symbol;
       
 11359                 
       
 11360             }
       
 11361             
       
 11362             
       
 11363             ERROR;
       
 11364         }
       
 11365         
       
 11366     }/*function_time_to_usint*/
       
 11367     break;
       
 11368 
       
 11369 /****
       
 11370  *TIME_TO_ULINT
       
 11371  */
       
 11372     case function_time_to_ulint :
       
 11373     {
       
 11374         symbol_c *last_type_symbol = NULL;
       
 11375 
       
 11376         {
       
 11377             identifier_c param_name("IN");
       
 11378             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11379             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11380             
       
 11381             /* Get the value from a foo(<param_value>) style call */
       
 11382             if (IN_param_value == NULL)
       
 11383               IN_param_value = function_call_param_iterator.next();
       
 11384             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11385             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11386             
       
 11387             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11388             {
       
 11389         
       
 11390                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11391                 return return_type_symbol;
       
 11392                 
       
 11393             }
       
 11394             
       
 11395             
       
 11396             ERROR;
       
 11397         }
       
 11398         
       
 11399     }/*function_time_to_ulint*/
       
 11400     break;
       
 11401 
       
 11402 /****
       
 11403  *TIME_TO_INT
       
 11404  */
       
 11405     case function_time_to_int :
       
 11406     {
       
 11407         symbol_c *last_type_symbol = NULL;
       
 11408 
       
 11409         {
       
 11410             identifier_c param_name("IN");
       
 11411             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11412             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11413             
       
 11414             /* Get the value from a foo(<param_value>) style call */
       
 11415             if (IN_param_value == NULL)
       
 11416               IN_param_value = function_call_param_iterator.next();
       
 11417             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11418             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11419             
       
 11420             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 11421             {
       
 11422         
       
 11423                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11424                 return return_type_symbol;
       
 11425                 
       
 11426             }
       
 11427             
       
 11428             
       
 11429             ERROR;
       
 11430         }
       
 11431         
       
 11432     }/*function_time_to_int*/
       
 11433     break;
       
 11434 
       
 11435 /****
       
 11436  *INT_TO_REAL
       
 11437  */
       
 11438     case function_int_to_real :
       
 11439     {
       
 11440         symbol_c *last_type_symbol = NULL;
       
 11441 
       
 11442         {
       
 11443             identifier_c param_name("IN");
       
 11444             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11445             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11446             
       
 11447             /* Get the value from a foo(<param_value>) style call */
       
 11448             if (IN_param_value == NULL)
       
 11449               IN_param_value = function_call_param_iterator.next();
       
 11450             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11451             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11452             
       
 11453             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11454             {
       
 11455         
       
 11456                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11457                 return return_type_symbol;
       
 11458                 
       
 11459             }
       
 11460             
       
 11461             
       
 11462             ERROR;
       
 11463         }
       
 11464         
       
 11465     }/*function_int_to_real*/
       
 11466     break;
       
 11467 
       
 11468 /****
       
 11469  *INT_TO_SINT
       
 11470  */
       
 11471     case function_int_to_sint :
       
 11472     {
       
 11473         symbol_c *last_type_symbol = NULL;
       
 11474 
       
 11475         {
       
 11476             identifier_c param_name("IN");
       
 11477             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11478             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11479             
       
 11480             /* Get the value from a foo(<param_value>) style call */
       
 11481             if (IN_param_value == NULL)
       
 11482               IN_param_value = function_call_param_iterator.next();
       
 11483             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11484             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11485             
       
 11486             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11487             {
       
 11488         
       
 11489                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11490                 return return_type_symbol;
       
 11491                 
       
 11492             }
       
 11493             
       
 11494             
       
 11495             ERROR;
       
 11496         }
       
 11497         
       
 11498     }/*function_int_to_sint*/
       
 11499     break;
       
 11500 
       
 11501 /****
       
 11502  *INT_TO_LINT
       
 11503  */
       
 11504     case function_int_to_lint :
       
 11505     {
       
 11506         symbol_c *last_type_symbol = NULL;
       
 11507 
       
 11508         {
       
 11509             identifier_c param_name("IN");
       
 11510             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11511             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11512             
       
 11513             /* Get the value from a foo(<param_value>) style call */
       
 11514             if (IN_param_value == NULL)
       
 11515               IN_param_value = function_call_param_iterator.next();
       
 11516             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11517             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11518             
       
 11519             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
   154             {
 11520             {
   155         
 11521         
   156                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 11522                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   157                 return return_type_symbol;
 11523                 return return_type_symbol;
   158                 
 11524                 
   159             }
 11525             }
   160             
 11526             
   161             ERROR;
 11527             
   162         }
 11528             ERROR;
   163         
 11529         }
   164     }/*function_bool_to_lint*/
 11530         
   165     break;
 11531     }/*function_int_to_lint*/
   166 
 11532     break;
   167 /****
 11533 
   168  *BOOL_TO_USINT
 11534 /****
   169  */
 11535  *INT_TO_DINT
   170     case function_bool_to_usint :
 11536  */
   171     {
 11537     case function_int_to_dint :
   172         symbol_c *last_type_symbol = NULL;
 11538     {
   173 
 11539         symbol_c *last_type_symbol = NULL;
   174         {
 11540 
   175             identifier_c param_name("IN");
 11541         {
   176             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11542             identifier_c param_name("IN");
   177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11543             /* Get the value from a foo(<param_name> = <param_value>) style call */
   178             
 11544             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   179             /* Get the value from a foo(<param_value>) style call */
 11545             
   180             if (IN_param_value == NULL)
 11546             /* Get the value from a foo(<param_value>) style call */
   181               IN_param_value = function_call_param_iterator.next();
 11547             if (IN_param_value == NULL)
   182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11548               IN_param_value = function_call_param_iterator.next();
   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 ;
 11549             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   184             
 11550             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   185             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 11551             
       
 11552             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11553             {
       
 11554         
       
 11555                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11556                 return return_type_symbol;
       
 11557                 
       
 11558             }
       
 11559             
       
 11560             
       
 11561             ERROR;
       
 11562         }
       
 11563         
       
 11564     }/*function_int_to_dint*/
       
 11565     break;
       
 11566 
       
 11567 /****
       
 11568  *INT_TO_DATE
       
 11569  */
       
 11570     case function_int_to_date :
       
 11571     {
       
 11572         symbol_c *last_type_symbol = NULL;
       
 11573 
       
 11574         {
       
 11575             identifier_c param_name("IN");
       
 11576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11578             
       
 11579             /* Get the value from a foo(<param_value>) style call */
       
 11580             if (IN_param_value == NULL)
       
 11581               IN_param_value = function_call_param_iterator.next();
       
 11582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11584             
       
 11585             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11586             {
       
 11587         
       
 11588                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11589                 return return_type_symbol;
       
 11590                 
       
 11591             }
       
 11592             
       
 11593             
       
 11594             ERROR;
       
 11595         }
       
 11596         
       
 11597     }/*function_int_to_date*/
       
 11598     break;
       
 11599 
       
 11600 /****
       
 11601  *INT_TO_DWORD
       
 11602  */
       
 11603     case function_int_to_dword :
       
 11604     {
       
 11605         symbol_c *last_type_symbol = NULL;
       
 11606 
       
 11607         {
       
 11608             identifier_c param_name("IN");
       
 11609             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11610             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11611             
       
 11612             /* Get the value from a foo(<param_value>) style call */
       
 11613             if (IN_param_value == NULL)
       
 11614               IN_param_value = function_call_param_iterator.next();
       
 11615             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11616             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11617             
       
 11618             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11619             {
       
 11620         
       
 11621                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11622                 return return_type_symbol;
       
 11623                 
       
 11624             }
       
 11625             
       
 11626             
       
 11627             ERROR;
       
 11628         }
       
 11629         
       
 11630     }/*function_int_to_dword*/
       
 11631     break;
       
 11632 
       
 11633 /****
       
 11634  *INT_TO_DT
       
 11635  */
       
 11636     case function_int_to_dt :
       
 11637     {
       
 11638         symbol_c *last_type_symbol = NULL;
       
 11639 
       
 11640         {
       
 11641             identifier_c param_name("IN");
       
 11642             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11643             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11644             
       
 11645             /* Get the value from a foo(<param_value>) style call */
       
 11646             if (IN_param_value == NULL)
       
 11647               IN_param_value = function_call_param_iterator.next();
       
 11648             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11649             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11650             
       
 11651             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11652             {
       
 11653         
       
 11654                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11655                 return return_type_symbol;
       
 11656                 
       
 11657             }
       
 11658             
       
 11659             
       
 11660             ERROR;
       
 11661         }
       
 11662         
       
 11663     }/*function_int_to_dt*/
       
 11664     break;
       
 11665 
       
 11666 /****
       
 11667  *INT_TO_TOD
       
 11668  */
       
 11669     case function_int_to_tod :
       
 11670     {
       
 11671         symbol_c *last_type_symbol = NULL;
       
 11672 
       
 11673         {
       
 11674             identifier_c param_name("IN");
       
 11675             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11676             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11677             
       
 11678             /* Get the value from a foo(<param_value>) style call */
       
 11679             if (IN_param_value == NULL)
       
 11680               IN_param_value = function_call_param_iterator.next();
       
 11681             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11682             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11683             
       
 11684             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11685             {
       
 11686         
       
 11687                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11688                 return return_type_symbol;
       
 11689                 
       
 11690             }
       
 11691             
       
 11692             
       
 11693             ERROR;
       
 11694         }
       
 11695         
       
 11696     }/*function_int_to_tod*/
       
 11697     break;
       
 11698 
       
 11699 /****
       
 11700  *INT_TO_UDINT
       
 11701  */
       
 11702     case function_int_to_udint :
       
 11703     {
       
 11704         symbol_c *last_type_symbol = NULL;
       
 11705 
       
 11706         {
       
 11707             identifier_c param_name("IN");
       
 11708             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11709             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11710             
       
 11711             /* Get the value from a foo(<param_value>) style call */
       
 11712             if (IN_param_value == NULL)
       
 11713               IN_param_value = function_call_param_iterator.next();
       
 11714             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11715             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11716             
       
 11717             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11718             {
       
 11719         
       
 11720                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11721                 return return_type_symbol;
       
 11722                 
       
 11723             }
       
 11724             
       
 11725             
       
 11726             ERROR;
       
 11727         }
       
 11728         
       
 11729     }/*function_int_to_udint*/
       
 11730     break;
       
 11731 
       
 11732 /****
       
 11733  *INT_TO_WORD
       
 11734  */
       
 11735     case function_int_to_word :
       
 11736     {
       
 11737         symbol_c *last_type_symbol = NULL;
       
 11738 
       
 11739         {
       
 11740             identifier_c param_name("IN");
       
 11741             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11742             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11743             
       
 11744             /* Get the value from a foo(<param_value>) style call */
       
 11745             if (IN_param_value == NULL)
       
 11746               IN_param_value = function_call_param_iterator.next();
       
 11747             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11748             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11749             
       
 11750             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11751             {
       
 11752         
       
 11753                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11754                 return return_type_symbol;
       
 11755                 
       
 11756             }
       
 11757             
       
 11758             
       
 11759             ERROR;
       
 11760         }
       
 11761         
       
 11762     }/*function_int_to_word*/
       
 11763     break;
       
 11764 
       
 11765 /****
       
 11766  *INT_TO_STRING
       
 11767  */
       
 11768     case function_int_to_string :
       
 11769     {
       
 11770         symbol_c *last_type_symbol = NULL;
       
 11771 
       
 11772         {
       
 11773             identifier_c param_name("IN");
       
 11774             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11775             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11776             
       
 11777             /* Get the value from a foo(<param_value>) style call */
       
 11778             if (IN_param_value == NULL)
       
 11779               IN_param_value = function_call_param_iterator.next();
       
 11780             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11781             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11782             
       
 11783             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11784             {
       
 11785         
       
 11786                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11787                 return return_type_symbol;
       
 11788                 
       
 11789             }
       
 11790             
       
 11791             
       
 11792             ERROR;
       
 11793         }
       
 11794         
       
 11795     }/*function_int_to_string*/
       
 11796     break;
       
 11797 
       
 11798 /****
       
 11799  *INT_TO_LWORD
       
 11800  */
       
 11801     case function_int_to_lword :
       
 11802     {
       
 11803         symbol_c *last_type_symbol = NULL;
       
 11804 
       
 11805         {
       
 11806             identifier_c param_name("IN");
       
 11807             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11808             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11809             
       
 11810             /* Get the value from a foo(<param_value>) style call */
       
 11811             if (IN_param_value == NULL)
       
 11812               IN_param_value = function_call_param_iterator.next();
       
 11813             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11814             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11815             
       
 11816             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11817             {
       
 11818         
       
 11819                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11820                 return return_type_symbol;
       
 11821                 
       
 11822             }
       
 11823             
       
 11824             
       
 11825             ERROR;
       
 11826         }
       
 11827         
       
 11828     }/*function_int_to_lword*/
       
 11829     break;
       
 11830 
       
 11831 /****
       
 11832  *INT_TO_UINT
       
 11833  */
       
 11834     case function_int_to_uint :
       
 11835     {
       
 11836         symbol_c *last_type_symbol = NULL;
       
 11837 
       
 11838         {
       
 11839             identifier_c param_name("IN");
       
 11840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11842             
       
 11843             /* Get the value from a foo(<param_value>) style call */
       
 11844             if (IN_param_value == NULL)
       
 11845               IN_param_value = function_call_param_iterator.next();
       
 11846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11848             
       
 11849             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11850             {
       
 11851         
       
 11852                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11853                 return return_type_symbol;
       
 11854                 
       
 11855             }
       
 11856             
       
 11857             
       
 11858             ERROR;
       
 11859         }
       
 11860         
       
 11861     }/*function_int_to_uint*/
       
 11862     break;
       
 11863 
       
 11864 /****
       
 11865  *INT_TO_LREAL
       
 11866  */
       
 11867     case function_int_to_lreal :
       
 11868     {
       
 11869         symbol_c *last_type_symbol = NULL;
       
 11870 
       
 11871         {
       
 11872             identifier_c param_name("IN");
       
 11873             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11874             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11875             
       
 11876             /* Get the value from a foo(<param_value>) style call */
       
 11877             if (IN_param_value == NULL)
       
 11878               IN_param_value = function_call_param_iterator.next();
       
 11879             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11880             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11881             
       
 11882             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11883             {
       
 11884         
       
 11885                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11886                 return return_type_symbol;
       
 11887                 
       
 11888             }
       
 11889             
       
 11890             
       
 11891             ERROR;
       
 11892         }
       
 11893         
       
 11894     }/*function_int_to_lreal*/
       
 11895     break;
       
 11896 
       
 11897 /****
       
 11898  *INT_TO_BYTE
       
 11899  */
       
 11900     case function_int_to_byte :
       
 11901     {
       
 11902         symbol_c *last_type_symbol = NULL;
       
 11903 
       
 11904         {
       
 11905             identifier_c param_name("IN");
       
 11906             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11907             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11908             
       
 11909             /* Get the value from a foo(<param_value>) style call */
       
 11910             if (IN_param_value == NULL)
       
 11911               IN_param_value = function_call_param_iterator.next();
       
 11912             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11913             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11914             
       
 11915             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11916             {
       
 11917         
       
 11918                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11919                 return return_type_symbol;
       
 11920                 
       
 11921             }
       
 11922             
       
 11923             
       
 11924             ERROR;
       
 11925         }
       
 11926         
       
 11927     }/*function_int_to_byte*/
       
 11928     break;
       
 11929 
       
 11930 /****
       
 11931  *INT_TO_USINT
       
 11932  */
       
 11933     case function_int_to_usint :
       
 11934     {
       
 11935         symbol_c *last_type_symbol = NULL;
       
 11936 
       
 11937         {
       
 11938             identifier_c param_name("IN");
       
 11939             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11940             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11941             
       
 11942             /* Get the value from a foo(<param_value>) style call */
       
 11943             if (IN_param_value == NULL)
       
 11944               IN_param_value = function_call_param_iterator.next();
       
 11945             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11946             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11947             
       
 11948             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
   186             {
 11949             {
   187         
 11950         
   188                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 11951                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   189                 return return_type_symbol;
 11952                 return return_type_symbol;
   190                 
 11953                 
   191             }
 11954             }
   192             
 11955             
   193             ERROR;
 11956             
   194         }
 11957             ERROR;
   195         
 11958         }
   196     }/*function_bool_to_usint*/
 11959         
   197     break;
 11960     }/*function_int_to_usint*/
   198 
 11961     break;
   199 /****
 11962 
   200  *BOOL_TO_UINT
 11963 /****
   201  */
 11964  *INT_TO_ULINT
   202     case function_bool_to_uint :
 11965  */
   203     {
 11966     case function_int_to_ulint :
   204         symbol_c *last_type_symbol = NULL;
 11967     {
   205 
 11968         symbol_c *last_type_symbol = NULL;
   206         {
 11969 
   207             identifier_c param_name("IN");
 11970         {
   208             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11971             identifier_c param_name("IN");
   209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11972             /* Get the value from a foo(<param_name> = <param_value>) style call */
   210             
 11973             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   211             /* Get the value from a foo(<param_value>) style call */
 11974             
   212             if (IN_param_value == NULL)
 11975             /* Get the value from a foo(<param_value>) style call */
   213               IN_param_value = function_call_param_iterator.next();
 11976             if (IN_param_value == NULL)
   214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11977               IN_param_value = function_call_param_iterator.next();
   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 ;
 11978             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   216             
 11979             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   217             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 11980             
       
 11981             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 11982             {
       
 11983         
       
 11984                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11985                 return return_type_symbol;
       
 11986                 
       
 11987             }
       
 11988             
       
 11989             
       
 11990             ERROR;
       
 11991         }
       
 11992         
       
 11993     }/*function_int_to_ulint*/
       
 11994     break;
       
 11995 
       
 11996 /****
       
 11997  *INT_TO_BOOL
       
 11998  */
       
 11999     case function_int_to_bool :
       
 12000     {
       
 12001         symbol_c *last_type_symbol = NULL;
       
 12002 
       
 12003         {
       
 12004             identifier_c param_name("IN");
       
 12005             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12006             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12007             
       
 12008             /* Get the value from a foo(<param_value>) style call */
       
 12009             if (IN_param_value == NULL)
       
 12010               IN_param_value = function_call_param_iterator.next();
       
 12011             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12012             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12013             
       
 12014             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12015             {
       
 12016         
       
 12017                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 12018                 return return_type_symbol;
       
 12019                 
       
 12020             }
       
 12021             
       
 12022             
       
 12023             ERROR;
       
 12024         }
       
 12025         
       
 12026     }/*function_int_to_bool*/
       
 12027     break;
       
 12028 
       
 12029 /****
       
 12030  *INT_TO_TIME
       
 12031  */
       
 12032     case function_int_to_time :
       
 12033     {
       
 12034         symbol_c *last_type_symbol = NULL;
       
 12035 
       
 12036         {
       
 12037             identifier_c param_name("IN");
       
 12038             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12039             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12040             
       
 12041             /* Get the value from a foo(<param_value>) style call */
       
 12042             if (IN_param_value == NULL)
       
 12043               IN_param_value = function_call_param_iterator.next();
       
 12044             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12045             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12046             
       
 12047             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 12048             {
       
 12049         
       
 12050                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 12051                 return return_type_symbol;
       
 12052                 
       
 12053             }
       
 12054             
       
 12055             
       
 12056             ERROR;
       
 12057         }
       
 12058         
       
 12059     }/*function_int_to_time*/
       
 12060     break;
       
 12061 
       
 12062 /****
       
 12063  *TRUNC
       
 12064  */
       
 12065     case function_trunc :
       
 12066     {
       
 12067         symbol_c *last_type_symbol = NULL;
       
 12068 
       
 12069         {
       
 12070             identifier_c param_name("IN");
       
 12071             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12072             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12073             
       
 12074             /* Get the value from a foo(<param_value>) style call */
       
 12075             if (IN_param_value == NULL)
       
 12076               IN_param_value = function_call_param_iterator.next();
       
 12077             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12078             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12079             
       
 12080             if(search_expression_type->is_real_type(IN_type_symbol))
       
 12081             {
       
 12082         
       
 12083                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 12084                 return return_type_symbol;
       
 12085                 
       
 12086             }
       
 12087             
       
 12088             
       
 12089             ERROR;
       
 12090         }
       
 12091         
       
 12092     }/*function_trunc*/
       
 12093     break;
       
 12094 
       
 12095 /****
       
 12096  *BCD_TO_UDINT
       
 12097  */
       
 12098     case function_bcd_to_udint :
       
 12099     {
       
 12100         symbol_c *last_type_symbol = NULL;
       
 12101 
       
 12102         {
       
 12103             identifier_c param_name("IN");
       
 12104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12106             
       
 12107             /* Get the value from a foo(<param_value>) style call */
       
 12108             if (IN_param_value == NULL)
       
 12109               IN_param_value = function_call_param_iterator.next();
       
 12110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12112             
       
 12113             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 12114             {
       
 12115         
       
 12116                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 12117                 return return_type_symbol;
       
 12118                 
       
 12119             }
       
 12120             
       
 12121             
       
 12122             ERROR;
       
 12123         }
       
 12124         
       
 12125     }/*function_bcd_to_udint*/
       
 12126     break;
       
 12127 
       
 12128 /****
       
 12129  *BCD_TO_UINT
       
 12130  */
       
 12131     case function_bcd_to_uint :
       
 12132     {
       
 12133         symbol_c *last_type_symbol = NULL;
       
 12134 
       
 12135         {
       
 12136             identifier_c param_name("IN");
       
 12137             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12138             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12139             
       
 12140             /* Get the value from a foo(<param_value>) style call */
       
 12141             if (IN_param_value == NULL)
       
 12142               IN_param_value = function_call_param_iterator.next();
       
 12143             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12144             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12145             
       
 12146             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
   218             {
 12147             {
   219         
 12148         
   220                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 12149                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   221                 return return_type_symbol;
 12150                 return return_type_symbol;
   222                 
 12151                 
   223             }
 12152             }
   224             
 12153             
   225             ERROR;
 12154             
   226         }
 12155             ERROR;
   227         
 12156         }
   228     }/*function_bool_to_uint*/
 12157         
   229     break;
 12158     }/*function_bcd_to_uint*/
   230 
 12159     break;
   231 /****
 12160 
   232  *BOOL_TO_UDINT
 12161 /****
   233  */
 12162  *BCD_TO_ULINT
   234     case function_bool_to_udint :
 12163  */
   235     {
 12164     case function_bcd_to_ulint :
   236         symbol_c *last_type_symbol = NULL;
 12165     {
   237 
 12166         symbol_c *last_type_symbol = NULL;
   238         {
 12167 
   239             identifier_c param_name("IN");
 12168         {
   240             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12169             identifier_c param_name("IN");
   241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12170             /* Get the value from a foo(<param_name> = <param_value>) style call */
   242             
 12171             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   243             /* Get the value from a foo(<param_value>) style call */
 12172             
   244             if (IN_param_value == NULL)
 12173             /* Get the value from a foo(<param_value>) style call */
   245               IN_param_value = function_call_param_iterator.next();
 12174             if (IN_param_value == NULL)
   246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12175               IN_param_value = function_call_param_iterator.next();
   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 ;
 12176             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   248             
 12177             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   249             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 12178             
   250             {
 12179             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
   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             {
 12180             {
   283         
 12181         
   284                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 12182                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   285                 return return_type_symbol;
 12183                 return return_type_symbol;
   286                 
 12184                 
   287             }
 12185             }
   288             
 12186             
   289             ERROR;
 12187             
   290         }
 12188             ERROR;
   291         
 12189         }
   292     }/*function_bool_to_ulint*/
 12190         
   293     break;
 12191     }/*function_bcd_to_ulint*/
   294 
 12192     break;
   295 /****
 12193 
   296  *BOOL_TO_REAL
 12194 /****
   297  */
 12195  *BCD_TO_USINT
   298     case function_bool_to_real :
 12196  */
   299     {
 12197     case function_bcd_to_usint :
   300         symbol_c *last_type_symbol = NULL;
 12198     {
   301 
 12199         symbol_c *last_type_symbol = NULL;
   302         {
 12200 
   303             identifier_c param_name("IN");
 12201         {
   304             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12202             identifier_c param_name("IN");
   305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12203             /* Get the value from a foo(<param_name> = <param_value>) style call */
   306             
 12204             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   307             /* Get the value from a foo(<param_value>) style call */
 12205             
   308             if (IN_param_value == NULL)
 12206             /* Get the value from a foo(<param_value>) style call */
   309               IN_param_value = function_call_param_iterator.next();
 12207             if (IN_param_value == NULL)
   310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12208               IN_param_value = function_call_param_iterator.next();
   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 ;
 12209             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   312             
 12210             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   313             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 12211             
   314             {
 12212             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
   315         
 12213             {
   316                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 12214         
   317                 return return_type_symbol;
 12215                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   318                 
 12216                 return return_type_symbol;
   319             }
 12217                 
   320             
 12218             }
   321             ERROR;
 12219             
   322         }
 12220             
   323         
 12221             ERROR;
   324     }/*function_bool_to_real*/
 12222         }
   325     break;
 12223         
   326 
 12224     }/*function_bcd_to_usint*/
   327 /****
 12225     break;
   328  *BOOL_TO_LREAL
 12226 
   329  */
 12227 /****
   330     case function_bool_to_lreal :
 12228  *UDINT_TO_BCD
   331     {
 12229  */
   332         symbol_c *last_type_symbol = NULL;
 12230     case function_udint_to_bcd :
   333 
 12231     {
   334         {
 12232         symbol_c *last_type_symbol = NULL;
   335             identifier_c param_name("IN");
 12233 
   336             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12234         {
   337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12235             identifier_c param_name("IN");
   338             
 12236             /* Get the value from a foo(<param_name> = <param_value>) style call */
   339             /* Get the value from a foo(<param_value>) style call */
 12237             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   340             if (IN_param_value == NULL)
 12238             
   341               IN_param_value = function_call_param_iterator.next();
 12239             /* Get the value from a foo(<param_value>) style call */
   342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12240             if (IN_param_value == NULL)
   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 ;
 12241               IN_param_value = function_call_param_iterator.next();
   344             
 12242             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   345             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 12243             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   346             {
 12244             
   347         
 12245             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
   348                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 12246             {
   349                 return return_type_symbol;
 12247         
   350                 
 12248                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
   351             }
 12249                 return return_type_symbol;
   352             
 12250                 
   353             ERROR;
 12251             }
   354         }
 12252             
   355         
 12253             
   356     }/*function_bool_to_lreal*/
 12254             ERROR;
   357     break;
 12255         }
   358 
 12256         
   359 /****
 12257     }/*function_udint_to_bcd*/
   360  *BOOL_TO_TIME
 12258     break;
   361  */
 12259 
   362     case function_bool_to_time :
 12260 /****
   363     {
 12261  *UINT_TO_BCD
   364         symbol_c *last_type_symbol = NULL;
 12262  */
   365 
 12263     case function_uint_to_bcd :
   366         {
 12264     {
   367             identifier_c param_name("IN");
 12265         symbol_c *last_type_symbol = NULL;
   368             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12266 
   369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12267         {
   370             
 12268             identifier_c param_name("IN");
   371             /* Get the value from a foo(<param_value>) style call */
 12269             /* Get the value from a foo(<param_name> = <param_value>) style call */
   372             if (IN_param_value == NULL)
 12270             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   373               IN_param_value = function_call_param_iterator.next();
 12271             
   374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12272             /* Get the value from a foo(<param_value>) style call */
   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 ;
 12273             if (IN_param_value == NULL)
   376             
 12274               IN_param_value = function_call_param_iterator.next();
   377             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 12275             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   378             {
 12276             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   379         
 12277             
   380                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12278             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
   381                 return return_type_symbol;
 12279             {
   382                 
 12280         
   383             }
 12281                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
   384             
 12282                 return return_type_symbol;
   385             ERROR;
 12283                 
   386         }
 12284             }
   387         
 12285             
   388     }/*function_bool_to_time*/
 12286             
   389     break;
 12287             ERROR;
   390 
 12288         }
   391 /****
 12289         
   392  *BOOL_TO_DATE
 12290     }/*function_uint_to_bcd*/
   393  */
 12291     break;
   394     case function_bool_to_date :
 12292 
   395     {
 12293 /****
   396         symbol_c *last_type_symbol = NULL;
 12294  *USINT_TO_BCD
   397 
 12295  */
   398         {
 12296     case function_usint_to_bcd :
   399             identifier_c param_name("IN");
 12297     {
   400             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12298         symbol_c *last_type_symbol = NULL;
   401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12299 
   402             
 12300         {
   403             /* Get the value from a foo(<param_value>) style call */
 12301             identifier_c param_name("IN");
   404             if (IN_param_value == NULL)
 12302             /* Get the value from a foo(<param_name> = <param_value>) style call */
   405               IN_param_value = function_call_param_iterator.next();
 12303             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12304             
   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 ;
 12305             /* Get the value from a foo(<param_value>) style call */
   408             
 12306             if (IN_param_value == NULL)
   409             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 12307               IN_param_value = function_call_param_iterator.next();
       
 12308             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12309             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12310             
       
 12311             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 12312             {
       
 12313         
       
 12314                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 12315                 return return_type_symbol;
       
 12316                 
       
 12317             }
       
 12318             
       
 12319             
       
 12320             ERROR;
       
 12321         }
       
 12322         
       
 12323     }/*function_usint_to_bcd*/
       
 12324     break;
       
 12325 
       
 12326 /****
       
 12327  *ULINT_TO_BCD
       
 12328  */
       
 12329     case function_ulint_to_bcd :
       
 12330     {
       
 12331         symbol_c *last_type_symbol = NULL;
       
 12332 
       
 12333         {
       
 12334             identifier_c param_name("IN");
       
 12335             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12336             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12337             
       
 12338             /* Get the value from a foo(<param_value>) style call */
       
 12339             if (IN_param_value == NULL)
       
 12340               IN_param_value = function_call_param_iterator.next();
       
 12341             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12342             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12343             
       
 12344             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 12345             {
       
 12346         
       
 12347                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 12348                 return return_type_symbol;
       
 12349                 
       
 12350             }
       
 12351             
       
 12352             
       
 12353             ERROR;
       
 12354         }
       
 12355         
       
 12356     }/*function_ulint_to_bcd*/
       
 12357     break;
       
 12358 
       
 12359 /****
       
 12360  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 12361  */
       
 12362     case function_date_and_time_to_time_of_day :
       
 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_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 12378             {
       
 12379         
       
 12380                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12381                 return return_type_symbol;
       
 12382                 
       
 12383             }
       
 12384             
       
 12385             
       
 12386             ERROR;
       
 12387         }
       
 12388         
       
 12389     }/*function_date_and_time_to_time_of_day*/
       
 12390     break;
       
 12391 
       
 12392 /****
       
 12393  *DATE_AND_TIME_TO_DATE
       
 12394  */
       
 12395     case function_date_and_time_to_date :
       
 12396     {
       
 12397         symbol_c *last_type_symbol = NULL;
       
 12398 
       
 12399         {
       
 12400             identifier_c param_name("IN");
       
 12401             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12402             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12403             
       
 12404             /* Get the value from a foo(<param_value>) style call */
       
 12405             if (IN_param_value == NULL)
       
 12406               IN_param_value = function_call_param_iterator.next();
       
 12407             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12408             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12409             
       
 12410             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
   410             {
 12411             {
   411         
 12412         
   412                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 12413                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   413                 return return_type_symbol;
 12414                 return return_type_symbol;
   414                 
 12415                 
   415             }
 12416             }
   416             
 12417             
   417             ERROR;
 12418             
   418         }
 12419             ERROR;
   419         
 12420         }
   420     }/*function_bool_to_date*/
 12421         
   421     break;
 12422     }/*function_date_and_time_to_date*/
   422 
 12423     break;
   423 /****
 12424 
   424  *BOOL_TO_TOD
 12425 /****
   425  */
 12426  *ABS
   426     case function_bool_to_tod :
 12427  */
   427     {
 12428     case function_abs :
   428         symbol_c *last_type_symbol = NULL;
 12429     {
   429 
 12430         symbol_c *last_type_symbol = NULL;
   430         {
 12431 
   431             identifier_c param_name("IN");
 12432         {
   432             /* Get the value from a foo(<param_name> = <param_value>) style call */
 12433             identifier_c param_name("IN");
   433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 12434             /* Get the value from a foo(<param_name> = <param_value>) style call */
   434             
 12435             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
   435             /* Get the value from a foo(<param_value>) style call */
 12436             
   436             if (IN_param_value == NULL)
 12437             /* Get the value from a foo(<param_value>) style call */
   437               IN_param_value = function_call_param_iterator.next();
 12438             if (IN_param_value == NULL)
   438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12439               IN_param_value = function_call_param_iterator.next();
   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 ;
 12440             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   440             
 12441             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   441             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 12442             
   442             {
 12443             if(search_expression_type->is_num_type(IN_type_symbol))
   443         
 12444             {
   444                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 12445         
   445                 return return_type_symbol;
 12446                 symbol_c * return_type_symbol = IN_type_symbol;
   446                 
 12447                 return return_type_symbol;
   447             }
 12448                 
   448             
 12449             }
   449             ERROR;
 12450             
   450         }
 12451             
   451         
 12452             ERROR;
   452     }/*function_bool_to_tod*/
 12453         }
   453     break;
 12454         
   454 
 12455     }/*function_abs*/
   455 /****
 12456     break;
   456  *BOOL_TO_DT
 12457 
   457  */
 12458 /****
   458     case function_bool_to_dt :
 12459  *SQRT
   459     {
 12460  */
   460         symbol_c *last_type_symbol = NULL;
 12461     case function_sqrt :
   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     {
 12462     {
 11692         symbol_c *last_type_symbol = NULL;
 12463         symbol_c *last_type_symbol = NULL;
 11693 
 12464 
 11694         {
 12465         {
 11695             identifier_c param_name("IN");
 12466             identifier_c param_name("IN");
 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 ;
 12474             last_type_symbol = last_type_symbol && search_expression_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             
 12475             
 11705             if(search_expression_type->is_real_type(IN_type_symbol))
 12476             if(search_expression_type->is_real_type(IN_type_symbol))
 11706             {
 12477             {
 11707         
 12478         
 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;
 12479                 symbol_c * return_type_symbol = IN_type_symbol;
 12061                 return return_type_symbol;
 12480                 return return_type_symbol;
 12062                 
 12481                 
 12063             }
 12482             }
 12064             
 12483             
 12065             ERROR;
 12484             
 12066         }
 12485             ERROR;
 12067         
 12486         }
 12068     }/*function_abs*/
 12487         
 12069     break;
 12488     }/*function_sqrt*/
 12070 
 12489     break;
 12071 /****
 12490 
 12072  *SQRT
 12491 /****
 12073  */
 12492  *LN
 12074     case function_sqrt :
 12493  */
       
 12494     case function_ln :
 12075     {
 12495     {
 12076         symbol_c *last_type_symbol = NULL;
 12496         symbol_c *last_type_symbol = NULL;
 12077 
 12497 
 12078         {
 12498         {
 12079             identifier_c param_name("IN");
 12499             identifier_c param_name("IN");
 12092                 symbol_c * return_type_symbol = IN_type_symbol;
 12512                 symbol_c * return_type_symbol = IN_type_symbol;
 12093                 return return_type_symbol;
 12513                 return return_type_symbol;
 12094                 
 12514                 
 12095             }
 12515             }
 12096             
 12516             
 12097             ERROR;
 12517             
 12098         }
 12518             ERROR;
 12099         
 12519         }
 12100     }/*function_sqrt*/
 12520         
 12101     break;
 12521     }/*function_ln*/
 12102 
 12522     break;
 12103 /****
 12523 
 12104  *LN
 12524 /****
 12105  */
 12525  *LOG
 12106     case function_ln :
 12526  */
       
 12527     case function_log :
 12107     {
 12528     {
 12108         symbol_c *last_type_symbol = NULL;
 12529         symbol_c *last_type_symbol = NULL;
 12109 
 12530 
 12110         {
 12531         {
 12111             identifier_c param_name("IN");
 12532             identifier_c param_name("IN");
 12124                 symbol_c * return_type_symbol = IN_type_symbol;
 12545                 symbol_c * return_type_symbol = IN_type_symbol;
 12125                 return return_type_symbol;
 12546                 return return_type_symbol;
 12126                 
 12547                 
 12127             }
 12548             }
 12128             
 12549             
 12129             ERROR;
 12550             
 12130         }
 12551             ERROR;
 12131         
 12552         }
 12132     }/*function_ln*/
 12553         
 12133     break;
 12554     }/*function_log*/
 12134 
 12555     break;
 12135 /****
 12556 
 12136  *LOG
 12557 /****
 12137  */
 12558  *EXP
 12138     case function_log :
 12559  */
       
 12560     case function_exp :
 12139     {
 12561     {
 12140         symbol_c *last_type_symbol = NULL;
 12562         symbol_c *last_type_symbol = NULL;
 12141 
 12563 
 12142         {
 12564         {
 12143             identifier_c param_name("IN");
 12565             identifier_c param_name("IN");
 12156                 symbol_c * return_type_symbol = IN_type_symbol;
 12578                 symbol_c * return_type_symbol = IN_type_symbol;
 12157                 return return_type_symbol;
 12579                 return return_type_symbol;
 12158                 
 12580                 
 12159             }
 12581             }
 12160             
 12582             
 12161             ERROR;
 12583             
 12162         }
 12584             ERROR;
 12163         
 12585         }
 12164     }/*function_log*/
 12586         
 12165     break;
 12587     }/*function_exp*/
 12166 
 12588     break;
 12167 /****
 12589 
 12168  *EXP
 12590 /****
 12169  */
 12591  *SIN
 12170     case function_exp :
 12592  */
       
 12593     case function_sin :
 12171     {
 12594     {
 12172         symbol_c *last_type_symbol = NULL;
 12595         symbol_c *last_type_symbol = NULL;
 12173 
 12596 
 12174         {
 12597         {
 12175             identifier_c param_name("IN");
 12598             identifier_c param_name("IN");
 12188                 symbol_c * return_type_symbol = IN_type_symbol;
 12611                 symbol_c * return_type_symbol = IN_type_symbol;
 12189                 return return_type_symbol;
 12612                 return return_type_symbol;
 12190                 
 12613                 
 12191             }
 12614             }
 12192             
 12615             
 12193             ERROR;
 12616             
 12194         }
 12617             ERROR;
 12195         
 12618         }
 12196     }/*function_exp*/
 12619         
 12197     break;
 12620     }/*function_sin*/
 12198 
 12621     break;
 12199 /****
 12622 
 12200  *SIN
 12623 /****
 12201  */
 12624  *COS
 12202     case function_sin :
 12625  */
       
 12626     case function_cos :
 12203     {
 12627     {
 12204         symbol_c *last_type_symbol = NULL;
 12628         symbol_c *last_type_symbol = NULL;
 12205 
 12629 
 12206         {
 12630         {
 12207             identifier_c param_name("IN");
 12631             identifier_c param_name("IN");
 12220                 symbol_c * return_type_symbol = IN_type_symbol;
 12644                 symbol_c * return_type_symbol = IN_type_symbol;
 12221                 return return_type_symbol;
 12645                 return return_type_symbol;
 12222                 
 12646                 
 12223             }
 12647             }
 12224             
 12648             
 12225             ERROR;
 12649             
 12226         }
 12650             ERROR;
 12227         
 12651         }
 12228     }/*function_sin*/
 12652         
 12229     break;
 12653     }/*function_cos*/
 12230 
 12654     break;
 12231 /****
 12655 
 12232  *COS
 12656 /****
 12233  */
 12657  *TAN
 12234     case function_cos :
 12658  */
       
 12659     case function_tan :
 12235     {
 12660     {
 12236         symbol_c *last_type_symbol = NULL;
 12661         symbol_c *last_type_symbol = NULL;
 12237 
 12662 
 12238         {
 12663         {
 12239             identifier_c param_name("IN");
 12664             identifier_c param_name("IN");
 12252                 symbol_c * return_type_symbol = IN_type_symbol;
 12677                 symbol_c * return_type_symbol = IN_type_symbol;
 12253                 return return_type_symbol;
 12678                 return return_type_symbol;
 12254                 
 12679                 
 12255             }
 12680             }
 12256             
 12681             
 12257             ERROR;
 12682             
 12258         }
 12683             ERROR;
 12259         
 12684         }
 12260     }/*function_cos*/
 12685         
 12261     break;
 12686     }/*function_tan*/
 12262 
 12687     break;
 12263 /****
 12688 
 12264  *TAN
 12689 /****
 12265  */
 12690  *ASIN
 12266     case function_tan :
 12691  */
       
 12692     case function_asin :
 12267     {
 12693     {
 12268         symbol_c *last_type_symbol = NULL;
 12694         symbol_c *last_type_symbol = NULL;
 12269 
 12695 
 12270         {
 12696         {
 12271             identifier_c param_name("IN");
 12697             identifier_c param_name("IN");
 12284                 symbol_c * return_type_symbol = IN_type_symbol;
 12710                 symbol_c * return_type_symbol = IN_type_symbol;
 12285                 return return_type_symbol;
 12711                 return return_type_symbol;
 12286                 
 12712                 
 12287             }
 12713             }
 12288             
 12714             
 12289             ERROR;
 12715             
 12290         }
 12716             ERROR;
 12291         
 12717         }
 12292     }/*function_tan*/
 12718         
 12293     break;
 12719     }/*function_asin*/
 12294 
 12720     break;
 12295 /****
 12721 
 12296  *ASIN
 12722 /****
 12297  */
 12723  *ACOS
 12298     case function_asin :
 12724  */
       
 12725     case function_acos :
 12299     {
 12726     {
 12300         symbol_c *last_type_symbol = NULL;
 12727         symbol_c *last_type_symbol = NULL;
 12301 
 12728 
 12302         {
 12729         {
 12303             identifier_c param_name("IN");
 12730             identifier_c param_name("IN");
 12316                 symbol_c * return_type_symbol = IN_type_symbol;
 12743                 symbol_c * return_type_symbol = IN_type_symbol;
 12317                 return return_type_symbol;
 12744                 return return_type_symbol;
 12318                 
 12745                 
 12319             }
 12746             }
 12320             
 12747             
 12321             ERROR;
 12748             
 12322         }
 12749             ERROR;
 12323         
 12750         }
 12324     }/*function_asin*/
 12751         
 12325     break;
 12752     }/*function_acos*/
 12326 
 12753     break;
 12327 /****
 12754 
 12328  *ACOS
 12755 /****
 12329  */
 12756  *ATAN
 12330     case function_acos :
 12757  */
       
 12758     case function_atan :
 12331     {
 12759     {
 12332         symbol_c *last_type_symbol = NULL;
 12760         symbol_c *last_type_symbol = NULL;
 12333 
 12761 
 12334         {
 12762         {
 12335             identifier_c param_name("IN");
 12763             identifier_c param_name("IN");
 12348                 symbol_c * return_type_symbol = IN_type_symbol;
 12776                 symbol_c * return_type_symbol = IN_type_symbol;
 12349                 return return_type_symbol;
 12777                 return return_type_symbol;
 12350                 
 12778                 
 12351             }
 12779             }
 12352             
 12780             
 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             
 12781             
 12385             ERROR;
 12782             ERROR;
 12386         }
 12783         }
 12387         
 12784         
 12388     }/*function_atan*/
 12785     }/*function_atan*/
 12426                         symbol_c * return_type_symbol = last_type_symbol;
 12823                         symbol_c * return_type_symbol = last_type_symbol;
 12427                         return return_type_symbol;
 12824                         return return_type_symbol;
 12428                         
 12825                         
 12429                     }
 12826                     }
 12430                     
 12827                     
       
 12828                     
 12431                     ERROR;
 12829                     ERROR;
 12432                 }
 12830                 }
 12433                 
 12831                 
 12434             }
 12832             }
 12435             
 12833             
 12453                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 12851                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 12454                         return return_type_symbol;
 12852                         return return_type_symbol;
 12455                         
 12853                         
 12456                     }
 12854                     }
 12457                     
 12855                     
       
 12856                     
 12458                     ERROR;
 12857                     ERROR;
 12459                 }
 12858                 }
 12460                 
 12859                 
 12461             }
 12860             }
 12462             
 12861             
 12480                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 12879                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 12481                         return return_type_symbol;
 12880                         return return_type_symbol;
 12482                         
 12881                         
 12483                     }
 12882                     }
 12484                     
 12883                     
       
 12884                     
 12485                     ERROR;
 12885                     ERROR;
 12486                 }
 12886                 }
 12487                 
 12887                 
 12488             }
 12888             }
 12489             
 12889             
 12507                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12907                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12508                         return return_type_symbol;
 12908                         return return_type_symbol;
 12509                         
 12909                         
 12510                     }
 12910                     }
 12511                     
 12911                     
       
 12912                     
 12512                     ERROR;
 12913                     ERROR;
 12513                 }
 12914                 }
 12514                 
 12915                 
 12515             }
 12916             }
       
 12917             
 12516             
 12918             
 12517             ERROR;
 12919             ERROR;
 12518         }
 12920         }
 12519         
 12921         
 12520     }/*function_add*/
 12922     }/*function_add*/
 12558                         symbol_c * return_type_symbol = last_type_symbol;
 12960                         symbol_c * return_type_symbol = last_type_symbol;
 12559                         return return_type_symbol;
 12961                         return return_type_symbol;
 12560                         
 12962                         
 12561                     }
 12963                     }
 12562                     
 12964                     
       
 12965                     
 12563                     ERROR;
 12966                     ERROR;
 12564                 }
 12967                 }
 12565                 
 12968                 
 12566             }
 12969             }
 12567             
 12970             
 12585                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12988                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12586                         return return_type_symbol;
 12989                         return return_type_symbol;
 12587                         
 12990                         
 12588                     }
 12991                     }
 12589                     
 12992                     
       
 12993                     
 12590                     ERROR;
 12994                     ERROR;
 12591                 }
 12995                 }
 12592                 
 12996                 
 12593             }
 12997             }
       
 12998             
 12594             
 12999             
 12595             ERROR;
 13000             ERROR;
 12596         }
 13001         }
 12597         
 13002         
 12598     }/*function_mul*/
 13003     }/*function_mul*/
 12636                         symbol_c * return_type_symbol = last_type_symbol;
 13041                         symbol_c * return_type_symbol = last_type_symbol;
 12637                         return return_type_symbol;
 13042                         return return_type_symbol;
 12638                         
 13043                         
 12639                     }
 13044                     }
 12640                     
 13045                     
       
 13046                     
 12641                     ERROR;
 13047                     ERROR;
 12642                 }
 13048                 }
 12643                 
 13049                 
 12644             }
 13050             }
 12645             
 13051             
 12663                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 13069                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12664                         return return_type_symbol;
 13070                         return return_type_symbol;
 12665                         
 13071                         
 12666                     }
 13072                     }
 12667                     
 13073                     
       
 13074                     
 12668                     ERROR;
 13075                     ERROR;
 12669                 }
 13076                 }
 12670                 
 13077                 
 12671             }
 13078             }
 12672             
 13079             
 12698                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 13105                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 12699                         return return_type_symbol;
 13106                         return return_type_symbol;
 12700                         
 13107                         
 12701                     }
 13108                     }
 12702                     
 13109                     
       
 13110                     
 12703                     ERROR;
 13111                     ERROR;
 12704                 }
 13112                 }
 12705                 
 13113                 
 12706             }
 13114             }
 12707             
 13115             
 12733                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 13141                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 12734                         return return_type_symbol;
 13142                         return return_type_symbol;
 12735                         
 13143                         
 12736                     }
 13144                     }
 12737                     
 13145                     
       
 13146                     
 12738                     ERROR;
 13147                     ERROR;
 12739                 }
 13148                 }
 12740                 
 13149                 
 12741             }
 13150             }
 12742             
 13151             
 12760                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 13169                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12761                         return return_type_symbol;
 13170                         return return_type_symbol;
 12762                         
 13171                         
 12763                     }
 13172                     }
 12764                     
 13173                     
       
 13174                     
 12765                     ERROR;
 13175                     ERROR;
 12766                 }
 13176                 }
 12767                 
 13177                 
 12768             }
 13178             }
       
 13179             
 12769             
 13180             
 12770             ERROR;
 13181             ERROR;
 12771         }
 13182         }
 12772         
 13183         
 12773     }/*function_sub*/
 13184     }/*function_sub*/
 12811                         symbol_c * return_type_symbol = last_type_symbol;
 13222                         symbol_c * return_type_symbol = last_type_symbol;
 12812                         return return_type_symbol;
 13223                         return return_type_symbol;
 12813                         
 13224                         
 12814                     }
 13225                     }
 12815                     
 13226                     
       
 13227                     
 12816                     ERROR;
 13228                     ERROR;
 12817                 }
 13229                 }
 12818                 
 13230                 
 12819             }
 13231             }
 12820             
 13232             
 12838                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 13250                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12839                         return return_type_symbol;
 13251                         return return_type_symbol;
 12840                         
 13252                         
 12841                     }
 13253                     }
 12842                     
 13254                     
       
 13255                     
 12843                     ERROR;
 13256                     ERROR;
 12844                 }
 13257                 }
 12845                 
 13258                 
 12846             }
 13259             }
       
 13260             
 12847             
 13261             
 12848             ERROR;
 13262             ERROR;
 12849         }
 13263         }
 12850         
 13264         
 12851     }/*function_div*/
 13265     }/*function_div*/
 12889                         symbol_c * return_type_symbol = last_type_symbol;
 13303                         symbol_c * return_type_symbol = last_type_symbol;
 12890                         return return_type_symbol;
 13304                         return return_type_symbol;
 12891                         
 13305                         
 12892                     }
 13306                     }
 12893                     
 13307                     
       
 13308                     
 12894                     ERROR;
 13309                     ERROR;
 12895                 }
 13310                 }
 12896                 
 13311                 
 12897             }
 13312             }
       
 13313             
 12898             
 13314             
 12899             ERROR;
 13315             ERROR;
 12900         }
 13316         }
 12901         
 13317         
 12902     }/*function_mod*/
 13318     }/*function_mod*/
 12940                         symbol_c * return_type_symbol = last_type_symbol;
 13356                         symbol_c * return_type_symbol = last_type_symbol;
 12941                         return return_type_symbol;
 13357                         return return_type_symbol;
 12942                         
 13358                         
 12943                     }
 13359                     }
 12944                     
 13360                     
       
 13361                     
 12945                     ERROR;
 13362                     ERROR;
 12946                 }
 13363                 }
 12947                 
 13364                 
 12948             }
 13365             }
 12949             
 13366             
       
 13367             
 12950             ERROR;
 13368             ERROR;
 12951         }
 13369         }
 12952         
 13370         
 12953     }/*function_expt*/
 13371     }/*function_expt*/
 12954     break;
 13372     break;
 12976         
 13394         
 12977                 symbol_c * return_type_symbol = last_type_symbol;
 13395                 symbol_c * return_type_symbol = last_type_symbol;
 12978                 return return_type_symbol;
 13396                 return return_type_symbol;
 12979                 
 13397                 
 12980             }
 13398             }
       
 13399             
 12981             
 13400             
 12982             ERROR;
 13401             ERROR;
 12983         }
 13402         }
 12984         
 13403         
 12985     }/*function_move*/
 13404     }/*function_move*/
 13023                         symbol_c * return_type_symbol = IN_type_symbol;
 13442                         symbol_c * return_type_symbol = IN_type_symbol;
 13024                         return return_type_symbol;
 13443                         return return_type_symbol;
 13025                         
 13444                         
 13026                     }
 13445                     }
 13027                     
 13446                     
       
 13447                     
 13028                     ERROR;
 13448                     ERROR;
 13029                 }
 13449                 }
 13030                 
 13450                 
 13031             }
 13451             }
       
 13452             
 13032             
 13453             
 13033             ERROR;
 13454             ERROR;
 13034         }
 13455         }
 13035         
 13456         
 13036     }/*function_shl*/
 13457     }/*function_shl*/
 13074                         symbol_c * return_type_symbol = IN_type_symbol;
 13495                         symbol_c * return_type_symbol = IN_type_symbol;
 13075                         return return_type_symbol;
 13496                         return return_type_symbol;
 13076                         
 13497                         
 13077                     }
 13498                     }
 13078                     
 13499                     
       
 13500                     
 13079                     ERROR;
 13501                     ERROR;
 13080                 }
 13502                 }
 13081                 
 13503                 
 13082             }
 13504             }
       
 13505             
 13083             
 13506             
 13084             ERROR;
 13507             ERROR;
 13085         }
 13508         }
 13086         
 13509         
 13087     }/*function_shr*/
 13510     }/*function_shr*/
 13125                         symbol_c * return_type_symbol = IN_type_symbol;
 13548                         symbol_c * return_type_symbol = IN_type_symbol;
 13126                         return return_type_symbol;
 13549                         return return_type_symbol;
 13127                         
 13550                         
 13128                     }
 13551                     }
 13129                     
 13552                     
       
 13553                     
 13130                     ERROR;
 13554                     ERROR;
 13131                 }
 13555                 }
 13132                 
 13556                 
 13133             }
 13557             }
       
 13558             
 13134             
 13559             
 13135             ERROR;
 13560             ERROR;
 13136         }
 13561         }
 13137         
 13562         
 13138     }/*function_ror*/
 13563     }/*function_ror*/
 13176                         symbol_c * return_type_symbol = IN_type_symbol;
 13601                         symbol_c * return_type_symbol = IN_type_symbol;
 13177                         return return_type_symbol;
 13602                         return return_type_symbol;
 13178                         
 13603                         
 13179                     }
 13604                     }
 13180                     
 13605                     
       
 13606                     
 13181                     ERROR;
 13607                     ERROR;
 13182                 }
 13608                 }
 13183                 
 13609                 
 13184             }
 13610             }
       
 13611             
 13185             
 13612             
 13186             ERROR;
 13613             ERROR;
 13187         }
 13614         }
 13188         
 13615         
 13189     }/*function_rol*/
 13616     }/*function_rol*/
 13227                         symbol_c * return_type_symbol = last_type_symbol;
 13654                         symbol_c * return_type_symbol = last_type_symbol;
 13228                         return return_type_symbol;
 13655                         return return_type_symbol;
 13229                         
 13656                         
 13230                     }
 13657                     }
 13231                     
 13658                     
       
 13659                     
 13232                     ERROR;
 13660                     ERROR;
 13233                 }
 13661                 }
 13234                 
 13662                 
 13235             }
 13663             }
       
 13664             
 13236             
 13665             
 13237             ERROR;
 13666             ERROR;
 13238         }
 13667         }
 13239         
 13668         
 13240     }/*function_and*/
 13669     }/*function_and*/
 13278                         symbol_c * return_type_symbol = last_type_symbol;
 13707                         symbol_c * return_type_symbol = last_type_symbol;
 13279                         return return_type_symbol;
 13708                         return return_type_symbol;
 13280                         
 13709                         
 13281                     }
 13710                     }
 13282                     
 13711                     
       
 13712                     
 13283                     ERROR;
 13713                     ERROR;
 13284                 }
 13714                 }
 13285                 
 13715                 
 13286             }
 13716             }
       
 13717             
 13287             
 13718             
 13288             ERROR;
 13719             ERROR;
 13289         }
 13720         }
 13290         
 13721         
 13291     }/*function_or*/
 13722     }/*function_or*/
 13329                         symbol_c * return_type_symbol = last_type_symbol;
 13760                         symbol_c * return_type_symbol = last_type_symbol;
 13330                         return return_type_symbol;
 13761                         return return_type_symbol;
 13331                         
 13762                         
 13332                     }
 13763                     }
 13333                     
 13764                     
       
 13765                     
 13334                     ERROR;
 13766                     ERROR;
 13335                 }
 13767                 }
 13336                 
 13768                 
 13337             }
 13769             }
 13338             
 13770             
       
 13771             
 13339             ERROR;
 13772             ERROR;
 13340         }
 13773         }
 13341         
 13774         
 13342     }/*function_xor*/
 13775     }/*function_xor*/
 13343     break;
 13776     break;
 13365         
 13798         
 13366                 symbol_c * return_type_symbol = IN_type_symbol;
 13799                 symbol_c * return_type_symbol = IN_type_symbol;
 13367                 return return_type_symbol;
 13800                 return return_type_symbol;
 13368                 
 13801                 
 13369             }
 13802             }
       
 13803             
 13370             
 13804             
 13371             ERROR;
 13805             ERROR;
 13372         }
 13806         }
 13373         
 13807         
 13374     }/*function_not*/
 13808     }/*function_not*/
 13426                                 symbol_c * return_type_symbol = last_type_symbol;
 13860                                 symbol_c * return_type_symbol = last_type_symbol;
 13427                                 return return_type_symbol;
 13861                                 return return_type_symbol;
 13428                                 
 13862                                 
 13429                             }
 13863                             }
 13430                             
 13864                             
       
 13865                             
 13431                             ERROR;
 13866                             ERROR;
 13432                         }
 13867                         }
 13433                         
 13868                         
 13434                     }
 13869                     }
 13435                     
 13870                     
       
 13871                     
 13436                     ERROR;
 13872                     ERROR;
 13437                 }
 13873                 }
 13438                 
 13874                 
 13439             }
 13875             }
       
 13876             
 13440             
 13877             
 13441             ERROR;
 13878             ERROR;
 13442         }
 13879         }
 13443         
 13880         
 13444     }/*function_sel*/
 13881     }/*function_sel*/
 13482                         symbol_c * return_type_symbol = last_type_symbol;
 13919                         symbol_c * return_type_symbol = last_type_symbol;
 13483                         return return_type_symbol;
 13920                         return return_type_symbol;
 13484                         
 13921                         
 13485                     }
 13922                     }
 13486                     
 13923                     
       
 13924                     
 13487                     ERROR;
 13925                     ERROR;
 13488                 }
 13926                 }
 13489                 
 13927                 
 13490             }
 13928             }
       
 13929             
 13491             
 13930             
 13492             ERROR;
 13931             ERROR;
 13493         }
 13932         }
 13494         
 13933         
 13495     }/*function_max*/
 13934     }/*function_max*/
 13533                         symbol_c * return_type_symbol = last_type_symbol;
 13972                         symbol_c * return_type_symbol = last_type_symbol;
 13534                         return return_type_symbol;
 13973                         return return_type_symbol;
 13535                         
 13974                         
 13536                     }
 13975                     }
 13537                     
 13976                     
       
 13977                     
 13538                     ERROR;
 13978                     ERROR;
 13539                 }
 13979                 }
 13540                 
 13980                 
 13541             }
 13981             }
       
 13982             
 13542             
 13983             
 13543             ERROR;
 13984             ERROR;
 13544         }
 13985         }
 13545         
 13986         
 13546     }/*function_min*/
 13987     }/*function_min*/
 13598                                 symbol_c * return_type_symbol = IN_type_symbol;
 14039                                 symbol_c * return_type_symbol = IN_type_symbol;
 13599                                 return return_type_symbol;
 14040                                 return return_type_symbol;
 13600                                 
 14041                                 
 13601                             }
 14042                             }
 13602                             
 14043                             
       
 14044                             
 13603                             ERROR;
 14045                             ERROR;
 13604                         }
 14046                         }
 13605                         
 14047                         
 13606                     }
 14048                     }
 13607                     
 14049                     
       
 14050                     
 13608                     ERROR;
 14051                     ERROR;
 13609                 }
 14052                 }
 13610                 
 14053                 
 13611             }
 14054             }
       
 14055             
 13612             
 14056             
 13613             ERROR;
 14057             ERROR;
 13614         }
 14058         }
 13615         
 14059         
 13616     }/*function_limit*/
 14060     }/*function_limit*/
 13668                                 symbol_c * return_type_symbol = last_type_symbol;
 14112                                 symbol_c * return_type_symbol = last_type_symbol;
 13669                                 return return_type_symbol;
 14113                                 return return_type_symbol;
 13670                                 
 14114                                 
 13671                             }
 14115                             }
 13672                             
 14116                             
       
 14117                             
 13673                             ERROR;
 14118                             ERROR;
 13674                         }
 14119                         }
 13675                         
 14120                         
 13676                     }
 14121                     }
 13677                     
 14122                     
       
 14123                     
 13678                     ERROR;
 14124                     ERROR;
 13679                 }
 14125                 }
 13680                 
 14126                 
 13681             }
 14127             }
       
 14128             
 13682             
 14129             
 13683             ERROR;
 14130             ERROR;
 13684         }
 14131         }
 13685         
 14132         
 13686     }/*function_mux*/
 14133     }/*function_mux*/
 13724                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 14171                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 13725                         return return_type_symbol;
 14172                         return return_type_symbol;
 13726                         
 14173                         
 13727                     }
 14174                     }
 13728                     
 14175                     
       
 14176                     
 13729                     ERROR;
 14177                     ERROR;
 13730                 }
 14178                 }
 13731                 
 14179                 
 13732             }
 14180             }
       
 14181             
 13733             
 14182             
 13734             ERROR;
 14183             ERROR;
 13735         }
 14184         }
 13736         
 14185         
 13737     }/*function_gt*/
 14186     }/*function_gt*/
 13775                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 14224                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 13776                         return return_type_symbol;
 14225                         return return_type_symbol;
 13777                         
 14226                         
 13778                     }
 14227                     }
 13779                     
 14228                     
       
 14229                     
 13780                     ERROR;
 14230                     ERROR;
 13781                 }
 14231                 }
 13782                 
 14232                 
 13783             }
 14233             }
       
 14234             
 13784             
 14235             
 13785             ERROR;
 14236             ERROR;
 13786         }
 14237         }
 13787         
 14238         
 13788     }/*function_ge*/
 14239     }/*function_ge*/
 13826                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 14277                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 13827                         return return_type_symbol;
 14278                         return return_type_symbol;
 13828                         
 14279                         
 13829                     }
 14280                     }
 13830                     
 14281                     
       
 14282                     
 13831                     ERROR;
 14283                     ERROR;
 13832                 }
 14284                 }
 13833                 
 14285                 
 13834             }
 14286             }
       
 14287             
 13835             
 14288             
 13836             ERROR;
 14289             ERROR;
 13837         }
 14290         }
 13838         
 14291         
 13839     }/*function_eq*/
 14292     }/*function_eq*/
 13877                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 14330                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 13878                         return return_type_symbol;
 14331                         return return_type_symbol;
 13879                         
 14332                         
 13880                     }
 14333                     }
 13881                     
 14334                     
       
 14335                     
 13882                     ERROR;
 14336                     ERROR;
 13883                 }
 14337                 }
 13884                 
 14338                 
 13885             }
 14339             }
       
 14340             
 13886             
 14341             
 13887             ERROR;
 14342             ERROR;
 13888         }
 14343         }
 13889         
 14344         
 13890     }/*function_lt*/
 14345     }/*function_lt*/
 13928                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 14383                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 13929                         return return_type_symbol;
 14384                         return return_type_symbol;
 13930                         
 14385                         
 13931                     }
 14386                     }
 13932                     
 14387                     
       
 14388                     
 13933                     ERROR;
 14389                     ERROR;
 13934                 }
 14390                 }
 13935                 
 14391                 
 13936             }
 14392             }
       
 14393             
 13937             
 14394             
 13938             ERROR;
 14395             ERROR;
 13939         }
 14396         }
 13940         
 14397         
 13941     }/*function_le*/
 14398     }/*function_le*/
 13979                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 14436                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 13980                         return return_type_symbol;
 14437                         return return_type_symbol;
 13981                         
 14438                         
 13982                     }
 14439                     }
 13983                     
 14440                     
       
 14441                     
 13984                     ERROR;
 14442                     ERROR;
 13985                 }
 14443                 }
 13986                 
 14444                 
 13987             }
 14445             }
 13988             
 14446             
       
 14447             
 13989             ERROR;
 14448             ERROR;
 13990         }
 14449         }
 13991         
 14450         
 13992     }/*function_ne*/
 14451     }/*function_ne*/
 13993     break;
 14452     break;
 14015         
 14474         
 14016                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 14475                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 14017                 return return_type_symbol;
 14476                 return return_type_symbol;
 14018                 
 14477                 
 14019             }
 14478             }
       
 14479             
 14020             
 14480             
 14021             ERROR;
 14481             ERROR;
 14022         }
 14482         }
 14023         
 14483         
 14024     }/*function_len*/
 14484     }/*function_len*/
 14062                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14522                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14063                         return return_type_symbol;
 14523                         return return_type_symbol;
 14064                         
 14524                         
 14065                     }
 14525                     }
 14066                     
 14526                     
       
 14527                     
 14067                     ERROR;
 14528                     ERROR;
 14068                 }
 14529                 }
 14069                 
 14530                 
 14070             }
 14531             }
       
 14532             
 14071             
 14533             
 14072             ERROR;
 14534             ERROR;
 14073         }
 14535         }
 14074         
 14536         
 14075     }/*function_left*/
 14537     }/*function_left*/
 14113                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14575                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14114                         return return_type_symbol;
 14576                         return return_type_symbol;
 14115                         
 14577                         
 14116                     }
 14578                     }
 14117                     
 14579                     
       
 14580                     
 14118                     ERROR;
 14581                     ERROR;
 14119                 }
 14582                 }
 14120                 
 14583                 
 14121             }
 14584             }
       
 14585             
 14122             
 14586             
 14123             ERROR;
 14587             ERROR;
 14124         }
 14588         }
 14125         
 14589         
 14126     }/*function_right*/
 14590     }/*function_right*/
 14178                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14642                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14179                                 return return_type_symbol;
 14643                                 return return_type_symbol;
 14180                                 
 14644                                 
 14181                             }
 14645                             }
 14182                             
 14646                             
       
 14647                             
 14183                             ERROR;
 14648                             ERROR;
 14184                         }
 14649                         }
 14185                         
 14650                         
 14186                     }
 14651                     }
 14187                     
 14652                     
       
 14653                     
 14188                     ERROR;
 14654                     ERROR;
 14189                 }
 14655                 }
 14190                 
 14656                 
 14191             }
 14657             }
       
 14658             
 14192             
 14659             
 14193             ERROR;
 14660             ERROR;
 14194         }
 14661         }
 14195         
 14662         
 14196     }/*function_mid*/
 14663     }/*function_mid*/
 14234                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14701                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14235                         return return_type_symbol;
 14702                         return return_type_symbol;
 14236                         
 14703                         
 14237                     }
 14704                     }
 14238                     
 14705                     
       
 14706                     
 14239                     ERROR;
 14707                     ERROR;
 14240                 }
 14708                 }
 14241                 
 14709                 
 14242             }
 14710             }
 14243             
 14711             
 14261                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14729                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14262                         return return_type_symbol;
 14730                         return return_type_symbol;
 14263                         
 14731                         
 14264                     }
 14732                     }
 14265                     
 14733                     
       
 14734                     
 14266                     ERROR;
 14735                     ERROR;
 14267                 }
 14736                 }
 14268                 
 14737                 
 14269             }
 14738             }
       
 14739             
 14270             
 14740             
 14271             ERROR;
 14741             ERROR;
 14272         }
 14742         }
 14273         
 14743         
 14274     }/*function_concat*/
 14744     }/*function_concat*/
 14326                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14796                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14327                                 return return_type_symbol;
 14797                                 return return_type_symbol;
 14328                                 
 14798                                 
 14329                             }
 14799                             }
 14330                             
 14800                             
       
 14801                             
 14331                             ERROR;
 14802                             ERROR;
 14332                         }
 14803                         }
 14333                         
 14804                         
 14334                     }
 14805                     }
 14335                     
 14806                     
       
 14807                     
 14336                     ERROR;
 14808                     ERROR;
 14337                 }
 14809                 }
 14338                 
 14810                 
 14339             }
 14811             }
       
 14812             
 14340             
 14813             
 14341             ERROR;
 14814             ERROR;
 14342         }
 14815         }
 14343         
 14816         
 14344     }/*function_insert*/
 14817     }/*function_insert*/
 14396                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14869                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14397                                 return return_type_symbol;
 14870                                 return return_type_symbol;
 14398                                 
 14871                                 
 14399                             }
 14872                             }
 14400                             
 14873                             
       
 14874                             
 14401                             ERROR;
 14875                             ERROR;
 14402                         }
 14876                         }
 14403                         
 14877                         
 14404                     }
 14878                     }
 14405                     
 14879                     
       
 14880                     
 14406                     ERROR;
 14881                     ERROR;
 14407                 }
 14882                 }
 14408                 
 14883                 
 14409             }
 14884             }
       
 14885             
 14410             
 14886             
 14411             ERROR;
 14887             ERROR;
 14412         }
 14888         }
 14413         
 14889         
 14414     }/*function_delete*/
 14890     }/*function_delete*/
 14480                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14956                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14481                                         return return_type_symbol;
 14957                                         return return_type_symbol;
 14482                                         
 14958                                         
 14483                                     }
 14959                                     }
 14484                                     
 14960                                     
       
 14961                                     
 14485                                     ERROR;
 14962                                     ERROR;
 14486                                 }
 14963                                 }
 14487                                 
 14964                                 
 14488                             }
 14965                             }
 14489                             
 14966                             
       
 14967                             
 14490                             ERROR;
 14968                             ERROR;
 14491                         }
 14969                         }
 14492                         
 14970                         
 14493                     }
 14971                     }
 14494                     
 14972                     
       
 14973                     
 14495                     ERROR;
 14974                     ERROR;
 14496                 }
 14975                 }
 14497                 
 14976                 
 14498             }
 14977             }
       
 14978             
 14499             
 14979             
 14500             ERROR;
 14980             ERROR;
 14501         }
 14981         }
 14502         
 14982         
 14503     }/*function_replace*/
 14983     }/*function_replace*/
 14541                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 15021                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 14542                         return return_type_symbol;
 15022                         return return_type_symbol;
 14543                         
 15023                         
 14544                     }
 15024                     }
 14545                     
 15025                     
       
 15026                     
 14546                     ERROR;
 15027                     ERROR;
 14547                 }
 15028                 }
 14548                 
 15029                 
 14549             }
 15030             }
       
 15031             
 14550             
 15032             
 14551             ERROR;
 15033             ERROR;
 14552         }
 15034         }
 14553         
 15035         
 14554     }/*function_find*/
 15036     }/*function_find*/
 14567   search_expression_type_c* search_expression_type = this;
 15049   search_expression_type_c* search_expression_type = this;
 14568 
 15050 
 14569   switch(current_function_type){
 15051   switch(current_function_type){
 14570 
 15052 
 14571 /****
 15053 /****
       
 15054  *REAL_TO_SINT
       
 15055  */
       
 15056     case function_real_to_sint :
       
 15057     {
       
 15058         symbol_c *last_type_symbol = NULL;
       
 15059 
       
 15060         {
       
 15061             symbol_c *IN_type_symbol = param_data_type;
       
 15062             last_type_symbol = param_data_type;
       
 15063             
       
 15064             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15065             {
       
 15066         
       
 15067                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 15068                 return return_type_symbol;
       
 15069                 
       
 15070             }
       
 15071             
       
 15072             
       
 15073             ERROR;
       
 15074         }
       
 15075         
       
 15076     }/*function_real_to_sint*/
       
 15077     break;
       
 15078 
       
 15079 /****
       
 15080  *REAL_TO_LINT
       
 15081  */
       
 15082     case function_real_to_lint :
       
 15083     {
       
 15084         symbol_c *last_type_symbol = NULL;
       
 15085 
       
 15086         {
       
 15087             symbol_c *IN_type_symbol = param_data_type;
       
 15088             last_type_symbol = param_data_type;
       
 15089             
       
 15090             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15091             {
       
 15092         
       
 15093                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15094                 return return_type_symbol;
       
 15095                 
       
 15096             }
       
 15097             
       
 15098             
       
 15099             ERROR;
       
 15100         }
       
 15101         
       
 15102     }/*function_real_to_lint*/
       
 15103     break;
       
 15104 
       
 15105 /****
       
 15106  *REAL_TO_DINT
       
 15107  */
       
 15108     case function_real_to_dint :
       
 15109     {
       
 15110         symbol_c *last_type_symbol = NULL;
       
 15111 
       
 15112         {
       
 15113             symbol_c *IN_type_symbol = param_data_type;
       
 15114             last_type_symbol = param_data_type;
       
 15115             
       
 15116             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15117             {
       
 15118         
       
 15119                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 15120                 return return_type_symbol;
       
 15121                 
       
 15122             }
       
 15123             
       
 15124             
       
 15125             ERROR;
       
 15126         }
       
 15127         
       
 15128     }/*function_real_to_dint*/
       
 15129     break;
       
 15130 
       
 15131 /****
       
 15132  *REAL_TO_DATE
       
 15133  */
       
 15134     case function_real_to_date :
       
 15135     {
       
 15136         symbol_c *last_type_symbol = NULL;
       
 15137 
       
 15138         {
       
 15139             symbol_c *IN_type_symbol = param_data_type;
       
 15140             last_type_symbol = param_data_type;
       
 15141             
       
 15142             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15143             {
       
 15144         
       
 15145                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 15146                 return return_type_symbol;
       
 15147                 
       
 15148             }
       
 15149             
       
 15150             
       
 15151             ERROR;
       
 15152         }
       
 15153         
       
 15154     }/*function_real_to_date*/
       
 15155     break;
       
 15156 
       
 15157 /****
       
 15158  *REAL_TO_DWORD
       
 15159  */
       
 15160     case function_real_to_dword :
       
 15161     {
       
 15162         symbol_c *last_type_symbol = NULL;
       
 15163 
       
 15164         {
       
 15165             symbol_c *IN_type_symbol = param_data_type;
       
 15166             last_type_symbol = param_data_type;
       
 15167             
       
 15168             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15169             {
       
 15170         
       
 15171                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 15172                 return return_type_symbol;
       
 15173                 
       
 15174             }
       
 15175             
       
 15176             
       
 15177             ERROR;
       
 15178         }
       
 15179         
       
 15180     }/*function_real_to_dword*/
       
 15181     break;
       
 15182 
       
 15183 /****
       
 15184  *REAL_TO_DT
       
 15185  */
       
 15186     case function_real_to_dt :
       
 15187     {
       
 15188         symbol_c *last_type_symbol = NULL;
       
 15189 
       
 15190         {
       
 15191             symbol_c *IN_type_symbol = param_data_type;
       
 15192             last_type_symbol = param_data_type;
       
 15193             
       
 15194             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15195             {
       
 15196         
       
 15197                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 15198                 return return_type_symbol;
       
 15199                 
       
 15200             }
       
 15201             
       
 15202             
       
 15203             ERROR;
       
 15204         }
       
 15205         
       
 15206     }/*function_real_to_dt*/
       
 15207     break;
       
 15208 
       
 15209 /****
       
 15210  *REAL_TO_TOD
       
 15211  */
       
 15212     case function_real_to_tod :
       
 15213     {
       
 15214         symbol_c *last_type_symbol = NULL;
       
 15215 
       
 15216         {
       
 15217             symbol_c *IN_type_symbol = param_data_type;
       
 15218             last_type_symbol = param_data_type;
       
 15219             
       
 15220             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15221             {
       
 15222         
       
 15223                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 15224                 return return_type_symbol;
       
 15225                 
       
 15226             }
       
 15227             
       
 15228             
       
 15229             ERROR;
       
 15230         }
       
 15231         
       
 15232     }/*function_real_to_tod*/
       
 15233     break;
       
 15234 
       
 15235 /****
       
 15236  *REAL_TO_UDINT
       
 15237  */
       
 15238     case function_real_to_udint :
       
 15239     {
       
 15240         symbol_c *last_type_symbol = NULL;
       
 15241 
       
 15242         {
       
 15243             symbol_c *IN_type_symbol = param_data_type;
       
 15244             last_type_symbol = param_data_type;
       
 15245             
       
 15246             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15247             {
       
 15248         
       
 15249                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 15250                 return return_type_symbol;
       
 15251                 
       
 15252             }
       
 15253             
       
 15254             
       
 15255             ERROR;
       
 15256         }
       
 15257         
       
 15258     }/*function_real_to_udint*/
       
 15259     break;
       
 15260 
       
 15261 /****
       
 15262  *REAL_TO_WORD
       
 15263  */
       
 15264     case function_real_to_word :
       
 15265     {
       
 15266         symbol_c *last_type_symbol = NULL;
       
 15267 
       
 15268         {
       
 15269             symbol_c *IN_type_symbol = param_data_type;
       
 15270             last_type_symbol = param_data_type;
       
 15271             
       
 15272             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15273             {
       
 15274         
       
 15275                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 15276                 return return_type_symbol;
       
 15277                 
       
 15278             }
       
 15279             
       
 15280             
       
 15281             ERROR;
       
 15282         }
       
 15283         
       
 15284     }/*function_real_to_word*/
       
 15285     break;
       
 15286 
       
 15287 /****
       
 15288  *REAL_TO_STRING
       
 15289  */
       
 15290     case function_real_to_string :
       
 15291     {
       
 15292         symbol_c *last_type_symbol = NULL;
       
 15293 
       
 15294         {
       
 15295             symbol_c *IN_type_symbol = param_data_type;
       
 15296             last_type_symbol = param_data_type;
       
 15297             
       
 15298             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15299             {
       
 15300         
       
 15301                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15302                 return return_type_symbol;
       
 15303                 
       
 15304             }
       
 15305             
       
 15306             
       
 15307             ERROR;
       
 15308         }
       
 15309         
       
 15310     }/*function_real_to_string*/
       
 15311     break;
       
 15312 
       
 15313 /****
       
 15314  *REAL_TO_LWORD
       
 15315  */
       
 15316     case function_real_to_lword :
       
 15317     {
       
 15318         symbol_c *last_type_symbol = NULL;
       
 15319 
       
 15320         {
       
 15321             symbol_c *IN_type_symbol = param_data_type;
       
 15322             last_type_symbol = param_data_type;
       
 15323             
       
 15324             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15325             {
       
 15326         
       
 15327                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15328                 return return_type_symbol;
       
 15329                 
       
 15330             }
       
 15331             
       
 15332             
       
 15333             ERROR;
       
 15334         }
       
 15335         
       
 15336     }/*function_real_to_lword*/
       
 15337     break;
       
 15338 
       
 15339 /****
       
 15340  *REAL_TO_UINT
       
 15341  */
       
 15342     case function_real_to_uint :
       
 15343     {
       
 15344         symbol_c *last_type_symbol = NULL;
       
 15345 
       
 15346         {
       
 15347             symbol_c *IN_type_symbol = param_data_type;
       
 15348             last_type_symbol = param_data_type;
       
 15349             
       
 15350             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15351             {
       
 15352         
       
 15353                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15354                 return return_type_symbol;
       
 15355                 
       
 15356             }
       
 15357             
       
 15358             
       
 15359             ERROR;
       
 15360         }
       
 15361         
       
 15362     }/*function_real_to_uint*/
       
 15363     break;
       
 15364 
       
 15365 /****
       
 15366  *REAL_TO_LREAL
       
 15367  */
       
 15368     case function_real_to_lreal :
       
 15369     {
       
 15370         symbol_c *last_type_symbol = NULL;
       
 15371 
       
 15372         {
       
 15373             symbol_c *IN_type_symbol = param_data_type;
       
 15374             last_type_symbol = param_data_type;
       
 15375             
       
 15376             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15377             {
       
 15378         
       
 15379                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15380                 return return_type_symbol;
       
 15381                 
       
 15382             }
       
 15383             
       
 15384             
       
 15385             ERROR;
       
 15386         }
       
 15387         
       
 15388     }/*function_real_to_lreal*/
       
 15389     break;
       
 15390 
       
 15391 /****
       
 15392  *REAL_TO_BYTE
       
 15393  */
       
 15394     case function_real_to_byte :
       
 15395     {
       
 15396         symbol_c *last_type_symbol = NULL;
       
 15397 
       
 15398         {
       
 15399             symbol_c *IN_type_symbol = param_data_type;
       
 15400             last_type_symbol = param_data_type;
       
 15401             
       
 15402             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15403             {
       
 15404         
       
 15405                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15406                 return return_type_symbol;
       
 15407                 
       
 15408             }
       
 15409             
       
 15410             
       
 15411             ERROR;
       
 15412         }
       
 15413         
       
 15414     }/*function_real_to_byte*/
       
 15415     break;
       
 15416 
       
 15417 /****
       
 15418  *REAL_TO_USINT
       
 15419  */
       
 15420     case function_real_to_usint :
       
 15421     {
       
 15422         symbol_c *last_type_symbol = NULL;
       
 15423 
       
 15424         {
       
 15425             symbol_c *IN_type_symbol = param_data_type;
       
 15426             last_type_symbol = param_data_type;
       
 15427             
       
 15428             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15429             {
       
 15430         
       
 15431                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15432                 return return_type_symbol;
       
 15433                 
       
 15434             }
       
 15435             
       
 15436             
       
 15437             ERROR;
       
 15438         }
       
 15439         
       
 15440     }/*function_real_to_usint*/
       
 15441     break;
       
 15442 
       
 15443 /****
       
 15444  *REAL_TO_ULINT
       
 15445  */
       
 15446     case function_real_to_ulint :
       
 15447     {
       
 15448         symbol_c *last_type_symbol = NULL;
       
 15449 
       
 15450         {
       
 15451             symbol_c *IN_type_symbol = param_data_type;
       
 15452             last_type_symbol = param_data_type;
       
 15453             
       
 15454             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15455             {
       
 15456         
       
 15457                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15458                 return return_type_symbol;
       
 15459                 
       
 15460             }
       
 15461             
       
 15462             
       
 15463             ERROR;
       
 15464         }
       
 15465         
       
 15466     }/*function_real_to_ulint*/
       
 15467     break;
       
 15468 
       
 15469 /****
       
 15470  *REAL_TO_BOOL
       
 15471  */
       
 15472     case function_real_to_bool :
       
 15473     {
       
 15474         symbol_c *last_type_symbol = NULL;
       
 15475 
       
 15476         {
       
 15477             symbol_c *IN_type_symbol = param_data_type;
       
 15478             last_type_symbol = param_data_type;
       
 15479             
       
 15480             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15481             {
       
 15482         
       
 15483                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15484                 return return_type_symbol;
       
 15485                 
       
 15486             }
       
 15487             
       
 15488             
       
 15489             ERROR;
       
 15490         }
       
 15491         
       
 15492     }/*function_real_to_bool*/
       
 15493     break;
       
 15494 
       
 15495 /****
       
 15496  *REAL_TO_TIME
       
 15497  */
       
 15498     case function_real_to_time :
       
 15499     {
       
 15500         symbol_c *last_type_symbol = NULL;
       
 15501 
       
 15502         {
       
 15503             symbol_c *IN_type_symbol = param_data_type;
       
 15504             last_type_symbol = param_data_type;
       
 15505             
       
 15506             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
       
 15507             {
       
 15508         
       
 15509                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 15510                 return return_type_symbol;
       
 15511                 
       
 15512             }
       
 15513             
       
 15514             
       
 15515             ERROR;
       
 15516         }
       
 15517         
       
 15518     }/*function_real_to_time*/
       
 15519     break;
       
 15520 
       
 15521 /****
       
 15522  *REAL_TO_INT
       
 15523  */
       
 15524     case function_real_to_int :
       
 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::real_type_name, last_type_symbol))
       
 15533             {
       
 15534         
       
 15535                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 15536                 return return_type_symbol;
       
 15537                 
       
 15538             }
       
 15539             
       
 15540             
       
 15541             ERROR;
       
 15542         }
       
 15543         
       
 15544     }/*function_real_to_int*/
       
 15545     break;
       
 15546 
       
 15547 /****
       
 15548  *SINT_TO_REAL
       
 15549  */
       
 15550     case function_sint_to_real :
       
 15551     {
       
 15552         symbol_c *last_type_symbol = NULL;
       
 15553 
       
 15554         {
       
 15555             symbol_c *IN_type_symbol = param_data_type;
       
 15556             last_type_symbol = param_data_type;
       
 15557             
       
 15558             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15559             {
       
 15560         
       
 15561                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 15562                 return return_type_symbol;
       
 15563                 
       
 15564             }
       
 15565             
       
 15566             
       
 15567             ERROR;
       
 15568         }
       
 15569         
       
 15570     }/*function_sint_to_real*/
       
 15571     break;
       
 15572 
       
 15573 /****
       
 15574  *SINT_TO_LINT
       
 15575  */
       
 15576     case function_sint_to_lint :
       
 15577     {
       
 15578         symbol_c *last_type_symbol = NULL;
       
 15579 
       
 15580         {
       
 15581             symbol_c *IN_type_symbol = param_data_type;
       
 15582             last_type_symbol = param_data_type;
       
 15583             
       
 15584             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15585             {
       
 15586         
       
 15587                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 15588                 return return_type_symbol;
       
 15589                 
       
 15590             }
       
 15591             
       
 15592             
       
 15593             ERROR;
       
 15594         }
       
 15595         
       
 15596     }/*function_sint_to_lint*/
       
 15597     break;
       
 15598 
       
 15599 /****
       
 15600  *SINT_TO_DINT
       
 15601  */
       
 15602     case function_sint_to_dint :
       
 15603     {
       
 15604         symbol_c *last_type_symbol = NULL;
       
 15605 
       
 15606         {
       
 15607             symbol_c *IN_type_symbol = param_data_type;
       
 15608             last_type_symbol = param_data_type;
       
 15609             
       
 15610             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15611             {
       
 15612         
       
 15613                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 15614                 return return_type_symbol;
       
 15615                 
       
 15616             }
       
 15617             
       
 15618             
       
 15619             ERROR;
       
 15620         }
       
 15621         
       
 15622     }/*function_sint_to_dint*/
       
 15623     break;
       
 15624 
       
 15625 /****
       
 15626  *SINT_TO_DATE
       
 15627  */
       
 15628     case function_sint_to_date :
       
 15629     {
       
 15630         symbol_c *last_type_symbol = NULL;
       
 15631 
       
 15632         {
       
 15633             symbol_c *IN_type_symbol = param_data_type;
       
 15634             last_type_symbol = param_data_type;
       
 15635             
       
 15636             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15637             {
       
 15638         
       
 15639                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 15640                 return return_type_symbol;
       
 15641                 
       
 15642             }
       
 15643             
       
 15644             
       
 15645             ERROR;
       
 15646         }
       
 15647         
       
 15648     }/*function_sint_to_date*/
       
 15649     break;
       
 15650 
       
 15651 /****
       
 15652  *SINT_TO_DWORD
       
 15653  */
       
 15654     case function_sint_to_dword :
       
 15655     {
       
 15656         symbol_c *last_type_symbol = NULL;
       
 15657 
       
 15658         {
       
 15659             symbol_c *IN_type_symbol = param_data_type;
       
 15660             last_type_symbol = param_data_type;
       
 15661             
       
 15662             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15663             {
       
 15664         
       
 15665                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 15666                 return return_type_symbol;
       
 15667                 
       
 15668             }
       
 15669             
       
 15670             
       
 15671             ERROR;
       
 15672         }
       
 15673         
       
 15674     }/*function_sint_to_dword*/
       
 15675     break;
       
 15676 
       
 15677 /****
       
 15678  *SINT_TO_DT
       
 15679  */
       
 15680     case function_sint_to_dt :
       
 15681     {
       
 15682         symbol_c *last_type_symbol = NULL;
       
 15683 
       
 15684         {
       
 15685             symbol_c *IN_type_symbol = param_data_type;
       
 15686             last_type_symbol = param_data_type;
       
 15687             
       
 15688             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15689             {
       
 15690         
       
 15691                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 15692                 return return_type_symbol;
       
 15693                 
       
 15694             }
       
 15695             
       
 15696             
       
 15697             ERROR;
       
 15698         }
       
 15699         
       
 15700     }/*function_sint_to_dt*/
       
 15701     break;
       
 15702 
       
 15703 /****
       
 15704  *SINT_TO_TOD
       
 15705  */
       
 15706     case function_sint_to_tod :
       
 15707     {
       
 15708         symbol_c *last_type_symbol = NULL;
       
 15709 
       
 15710         {
       
 15711             symbol_c *IN_type_symbol = param_data_type;
       
 15712             last_type_symbol = param_data_type;
       
 15713             
       
 15714             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15715             {
       
 15716         
       
 15717                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 15718                 return return_type_symbol;
       
 15719                 
       
 15720             }
       
 15721             
       
 15722             
       
 15723             ERROR;
       
 15724         }
       
 15725         
       
 15726     }/*function_sint_to_tod*/
       
 15727     break;
       
 15728 
       
 15729 /****
       
 15730  *SINT_TO_UDINT
       
 15731  */
       
 15732     case function_sint_to_udint :
       
 15733     {
       
 15734         symbol_c *last_type_symbol = NULL;
       
 15735 
       
 15736         {
       
 15737             symbol_c *IN_type_symbol = param_data_type;
       
 15738             last_type_symbol = param_data_type;
       
 15739             
       
 15740             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15741             {
       
 15742         
       
 15743                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 15744                 return return_type_symbol;
       
 15745                 
       
 15746             }
       
 15747             
       
 15748             
       
 15749             ERROR;
       
 15750         }
       
 15751         
       
 15752     }/*function_sint_to_udint*/
       
 15753     break;
       
 15754 
       
 15755 /****
       
 15756  *SINT_TO_WORD
       
 15757  */
       
 15758     case function_sint_to_word :
       
 15759     {
       
 15760         symbol_c *last_type_symbol = NULL;
       
 15761 
       
 15762         {
       
 15763             symbol_c *IN_type_symbol = param_data_type;
       
 15764             last_type_symbol = param_data_type;
       
 15765             
       
 15766             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15767             {
       
 15768         
       
 15769                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 15770                 return return_type_symbol;
       
 15771                 
       
 15772             }
       
 15773             
       
 15774             
       
 15775             ERROR;
       
 15776         }
       
 15777         
       
 15778     }/*function_sint_to_word*/
       
 15779     break;
       
 15780 
       
 15781 /****
       
 15782  *SINT_TO_STRING
       
 15783  */
       
 15784     case function_sint_to_string :
       
 15785     {
       
 15786         symbol_c *last_type_symbol = NULL;
       
 15787 
       
 15788         {
       
 15789             symbol_c *IN_type_symbol = param_data_type;
       
 15790             last_type_symbol = param_data_type;
       
 15791             
       
 15792             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15793             {
       
 15794         
       
 15795                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 15796                 return return_type_symbol;
       
 15797                 
       
 15798             }
       
 15799             
       
 15800             
       
 15801             ERROR;
       
 15802         }
       
 15803         
       
 15804     }/*function_sint_to_string*/
       
 15805     break;
       
 15806 
       
 15807 /****
       
 15808  *SINT_TO_LWORD
       
 15809  */
       
 15810     case function_sint_to_lword :
       
 15811     {
       
 15812         symbol_c *last_type_symbol = NULL;
       
 15813 
       
 15814         {
       
 15815             symbol_c *IN_type_symbol = param_data_type;
       
 15816             last_type_symbol = param_data_type;
       
 15817             
       
 15818             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15819             {
       
 15820         
       
 15821                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 15822                 return return_type_symbol;
       
 15823                 
       
 15824             }
       
 15825             
       
 15826             
       
 15827             ERROR;
       
 15828         }
       
 15829         
       
 15830     }/*function_sint_to_lword*/
       
 15831     break;
       
 15832 
       
 15833 /****
       
 15834  *SINT_TO_UINT
       
 15835  */
       
 15836     case function_sint_to_uint :
       
 15837     {
       
 15838         symbol_c *last_type_symbol = NULL;
       
 15839 
       
 15840         {
       
 15841             symbol_c *IN_type_symbol = param_data_type;
       
 15842             last_type_symbol = param_data_type;
       
 15843             
       
 15844             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15845             {
       
 15846         
       
 15847                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 15848                 return return_type_symbol;
       
 15849                 
       
 15850             }
       
 15851             
       
 15852             
       
 15853             ERROR;
       
 15854         }
       
 15855         
       
 15856     }/*function_sint_to_uint*/
       
 15857     break;
       
 15858 
       
 15859 /****
       
 15860  *SINT_TO_LREAL
       
 15861  */
       
 15862     case function_sint_to_lreal :
       
 15863     {
       
 15864         symbol_c *last_type_symbol = NULL;
       
 15865 
       
 15866         {
       
 15867             symbol_c *IN_type_symbol = param_data_type;
       
 15868             last_type_symbol = param_data_type;
       
 15869             
       
 15870             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15871             {
       
 15872         
       
 15873                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 15874                 return return_type_symbol;
       
 15875                 
       
 15876             }
       
 15877             
       
 15878             
       
 15879             ERROR;
       
 15880         }
       
 15881         
       
 15882     }/*function_sint_to_lreal*/
       
 15883     break;
       
 15884 
       
 15885 /****
       
 15886  *SINT_TO_BYTE
       
 15887  */
       
 15888     case function_sint_to_byte :
       
 15889     {
       
 15890         symbol_c *last_type_symbol = NULL;
       
 15891 
       
 15892         {
       
 15893             symbol_c *IN_type_symbol = param_data_type;
       
 15894             last_type_symbol = param_data_type;
       
 15895             
       
 15896             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15897             {
       
 15898         
       
 15899                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 15900                 return return_type_symbol;
       
 15901                 
       
 15902             }
       
 15903             
       
 15904             
       
 15905             ERROR;
       
 15906         }
       
 15907         
       
 15908     }/*function_sint_to_byte*/
       
 15909     break;
       
 15910 
       
 15911 /****
       
 15912  *SINT_TO_USINT
       
 15913  */
       
 15914     case function_sint_to_usint :
       
 15915     {
       
 15916         symbol_c *last_type_symbol = NULL;
       
 15917 
       
 15918         {
       
 15919             symbol_c *IN_type_symbol = param_data_type;
       
 15920             last_type_symbol = param_data_type;
       
 15921             
       
 15922             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15923             {
       
 15924         
       
 15925                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 15926                 return return_type_symbol;
       
 15927                 
       
 15928             }
       
 15929             
       
 15930             
       
 15931             ERROR;
       
 15932         }
       
 15933         
       
 15934     }/*function_sint_to_usint*/
       
 15935     break;
       
 15936 
       
 15937 /****
       
 15938  *SINT_TO_ULINT
       
 15939  */
       
 15940     case function_sint_to_ulint :
       
 15941     {
       
 15942         symbol_c *last_type_symbol = NULL;
       
 15943 
       
 15944         {
       
 15945             symbol_c *IN_type_symbol = param_data_type;
       
 15946             last_type_symbol = param_data_type;
       
 15947             
       
 15948             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15949             {
       
 15950         
       
 15951                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 15952                 return return_type_symbol;
       
 15953                 
       
 15954             }
       
 15955             
       
 15956             
       
 15957             ERROR;
       
 15958         }
       
 15959         
       
 15960     }/*function_sint_to_ulint*/
       
 15961     break;
       
 15962 
       
 15963 /****
       
 15964  *SINT_TO_BOOL
       
 15965  */
       
 15966     case function_sint_to_bool :
       
 15967     {
       
 15968         symbol_c *last_type_symbol = NULL;
       
 15969 
       
 15970         {
       
 15971             symbol_c *IN_type_symbol = param_data_type;
       
 15972             last_type_symbol = param_data_type;
       
 15973             
       
 15974             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 15975             {
       
 15976         
       
 15977                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 15978                 return return_type_symbol;
       
 15979                 
       
 15980             }
       
 15981             
       
 15982             
       
 15983             ERROR;
       
 15984         }
       
 15985         
       
 15986     }/*function_sint_to_bool*/
       
 15987     break;
       
 15988 
       
 15989 /****
       
 15990  *SINT_TO_TIME
       
 15991  */
       
 15992     case function_sint_to_time :
       
 15993     {
       
 15994         symbol_c *last_type_symbol = NULL;
       
 15995 
       
 15996         {
       
 15997             symbol_c *IN_type_symbol = param_data_type;
       
 15998             last_type_symbol = param_data_type;
       
 15999             
       
 16000             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 16001             {
       
 16002         
       
 16003                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16004                 return return_type_symbol;
       
 16005                 
       
 16006             }
       
 16007             
       
 16008             
       
 16009             ERROR;
       
 16010         }
       
 16011         
       
 16012     }/*function_sint_to_time*/
       
 16013     break;
       
 16014 
       
 16015 /****
       
 16016  *SINT_TO_INT
       
 16017  */
       
 16018     case function_sint_to_int :
       
 16019     {
       
 16020         symbol_c *last_type_symbol = NULL;
       
 16021 
       
 16022         {
       
 16023             symbol_c *IN_type_symbol = param_data_type;
       
 16024             last_type_symbol = param_data_type;
       
 16025             
       
 16026             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
       
 16027             {
       
 16028         
       
 16029                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16030                 return return_type_symbol;
       
 16031                 
       
 16032             }
       
 16033             
       
 16034             
       
 16035             ERROR;
       
 16036         }
       
 16037         
       
 16038     }/*function_sint_to_int*/
       
 16039     break;
       
 16040 
       
 16041 /****
       
 16042  *LINT_TO_REAL
       
 16043  */
       
 16044     case function_lint_to_real :
       
 16045     {
       
 16046         symbol_c *last_type_symbol = NULL;
       
 16047 
       
 16048         {
       
 16049             symbol_c *IN_type_symbol = param_data_type;
       
 16050             last_type_symbol = param_data_type;
       
 16051             
       
 16052             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16053             {
       
 16054         
       
 16055                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 16056                 return return_type_symbol;
       
 16057                 
       
 16058             }
       
 16059             
       
 16060             
       
 16061             ERROR;
       
 16062         }
       
 16063         
       
 16064     }/*function_lint_to_real*/
       
 16065     break;
       
 16066 
       
 16067 /****
       
 16068  *LINT_TO_SINT
       
 16069  */
       
 16070     case function_lint_to_sint :
       
 16071     {
       
 16072         symbol_c *last_type_symbol = NULL;
       
 16073 
       
 16074         {
       
 16075             symbol_c *IN_type_symbol = param_data_type;
       
 16076             last_type_symbol = param_data_type;
       
 16077             
       
 16078             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16079             {
       
 16080         
       
 16081                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 16082                 return return_type_symbol;
       
 16083                 
       
 16084             }
       
 16085             
       
 16086             
       
 16087             ERROR;
       
 16088         }
       
 16089         
       
 16090     }/*function_lint_to_sint*/
       
 16091     break;
       
 16092 
       
 16093 /****
       
 16094  *LINT_TO_DINT
       
 16095  */
       
 16096     case function_lint_to_dint :
       
 16097     {
       
 16098         symbol_c *last_type_symbol = NULL;
       
 16099 
       
 16100         {
       
 16101             symbol_c *IN_type_symbol = param_data_type;
       
 16102             last_type_symbol = param_data_type;
       
 16103             
       
 16104             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16105             {
       
 16106         
       
 16107                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 16108                 return return_type_symbol;
       
 16109                 
       
 16110             }
       
 16111             
       
 16112             
       
 16113             ERROR;
       
 16114         }
       
 16115         
       
 16116     }/*function_lint_to_dint*/
       
 16117     break;
       
 16118 
       
 16119 /****
       
 16120  *LINT_TO_DATE
       
 16121  */
       
 16122     case function_lint_to_date :
       
 16123     {
       
 16124         symbol_c *last_type_symbol = NULL;
       
 16125 
       
 16126         {
       
 16127             symbol_c *IN_type_symbol = param_data_type;
       
 16128             last_type_symbol = param_data_type;
       
 16129             
       
 16130             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16131             {
       
 16132         
       
 16133                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 16134                 return return_type_symbol;
       
 16135                 
       
 16136             }
       
 16137             
       
 16138             
       
 16139             ERROR;
       
 16140         }
       
 16141         
       
 16142     }/*function_lint_to_date*/
       
 16143     break;
       
 16144 
       
 16145 /****
       
 16146  *LINT_TO_DWORD
       
 16147  */
       
 16148     case function_lint_to_dword :
       
 16149     {
       
 16150         symbol_c *last_type_symbol = NULL;
       
 16151 
       
 16152         {
       
 16153             symbol_c *IN_type_symbol = param_data_type;
       
 16154             last_type_symbol = param_data_type;
       
 16155             
       
 16156             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16157             {
       
 16158         
       
 16159                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 16160                 return return_type_symbol;
       
 16161                 
       
 16162             }
       
 16163             
       
 16164             
       
 16165             ERROR;
       
 16166         }
       
 16167         
       
 16168     }/*function_lint_to_dword*/
       
 16169     break;
       
 16170 
       
 16171 /****
       
 16172  *LINT_TO_DT
       
 16173  */
       
 16174     case function_lint_to_dt :
       
 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::lint_type_name, last_type_symbol))
       
 16183             {
       
 16184         
       
 16185                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16186                 return return_type_symbol;
       
 16187                 
       
 16188             }
       
 16189             
       
 16190             
       
 16191             ERROR;
       
 16192         }
       
 16193         
       
 16194     }/*function_lint_to_dt*/
       
 16195     break;
       
 16196 
       
 16197 /****
       
 16198  *LINT_TO_TOD
       
 16199  */
       
 16200     case function_lint_to_tod :
       
 16201     {
       
 16202         symbol_c *last_type_symbol = NULL;
       
 16203 
       
 16204         {
       
 16205             symbol_c *IN_type_symbol = param_data_type;
       
 16206             last_type_symbol = param_data_type;
       
 16207             
       
 16208             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16209             {
       
 16210         
       
 16211                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 16212                 return return_type_symbol;
       
 16213                 
       
 16214             }
       
 16215             
       
 16216             
       
 16217             ERROR;
       
 16218         }
       
 16219         
       
 16220     }/*function_lint_to_tod*/
       
 16221     break;
       
 16222 
       
 16223 /****
       
 16224  *LINT_TO_UDINT
       
 16225  */
       
 16226     case function_lint_to_udint :
       
 16227     {
       
 16228         symbol_c *last_type_symbol = NULL;
       
 16229 
       
 16230         {
       
 16231             symbol_c *IN_type_symbol = param_data_type;
       
 16232             last_type_symbol = param_data_type;
       
 16233             
       
 16234             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16235             {
       
 16236         
       
 16237                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 16238                 return return_type_symbol;
       
 16239                 
       
 16240             }
       
 16241             
       
 16242             
       
 16243             ERROR;
       
 16244         }
       
 16245         
       
 16246     }/*function_lint_to_udint*/
       
 16247     break;
       
 16248 
       
 16249 /****
       
 16250  *LINT_TO_WORD
       
 16251  */
       
 16252     case function_lint_to_word :
       
 16253     {
       
 16254         symbol_c *last_type_symbol = NULL;
       
 16255 
       
 16256         {
       
 16257             symbol_c *IN_type_symbol = param_data_type;
       
 16258             last_type_symbol = param_data_type;
       
 16259             
       
 16260             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16261             {
       
 16262         
       
 16263                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 16264                 return return_type_symbol;
       
 16265                 
       
 16266             }
       
 16267             
       
 16268             
       
 16269             ERROR;
       
 16270         }
       
 16271         
       
 16272     }/*function_lint_to_word*/
       
 16273     break;
       
 16274 
       
 16275 /****
       
 16276  *LINT_TO_STRING
       
 16277  */
       
 16278     case function_lint_to_string :
       
 16279     {
       
 16280         symbol_c *last_type_symbol = NULL;
       
 16281 
       
 16282         {
       
 16283             symbol_c *IN_type_symbol = param_data_type;
       
 16284             last_type_symbol = param_data_type;
       
 16285             
       
 16286             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16287             {
       
 16288         
       
 16289                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16290                 return return_type_symbol;
       
 16291                 
       
 16292             }
       
 16293             
       
 16294             
       
 16295             ERROR;
       
 16296         }
       
 16297         
       
 16298     }/*function_lint_to_string*/
       
 16299     break;
       
 16300 
       
 16301 /****
       
 16302  *LINT_TO_LWORD
       
 16303  */
       
 16304     case function_lint_to_lword :
       
 16305     {
       
 16306         symbol_c *last_type_symbol = NULL;
       
 16307 
       
 16308         {
       
 16309             symbol_c *IN_type_symbol = param_data_type;
       
 16310             last_type_symbol = param_data_type;
       
 16311             
       
 16312             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16313             {
       
 16314         
       
 16315                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 16316                 return return_type_symbol;
       
 16317                 
       
 16318             }
       
 16319             
       
 16320             
       
 16321             ERROR;
       
 16322         }
       
 16323         
       
 16324     }/*function_lint_to_lword*/
       
 16325     break;
       
 16326 
       
 16327 /****
       
 16328  *LINT_TO_UINT
       
 16329  */
       
 16330     case function_lint_to_uint :
       
 16331     {
       
 16332         symbol_c *last_type_symbol = NULL;
       
 16333 
       
 16334         {
       
 16335             symbol_c *IN_type_symbol = param_data_type;
       
 16336             last_type_symbol = param_data_type;
       
 16337             
       
 16338             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16339             {
       
 16340         
       
 16341                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 16342                 return return_type_symbol;
       
 16343                 
       
 16344             }
       
 16345             
       
 16346             
       
 16347             ERROR;
       
 16348         }
       
 16349         
       
 16350     }/*function_lint_to_uint*/
       
 16351     break;
       
 16352 
       
 16353 /****
       
 16354  *LINT_TO_LREAL
       
 16355  */
       
 16356     case function_lint_to_lreal :
       
 16357     {
       
 16358         symbol_c *last_type_symbol = NULL;
       
 16359 
       
 16360         {
       
 16361             symbol_c *IN_type_symbol = param_data_type;
       
 16362             last_type_symbol = param_data_type;
       
 16363             
       
 16364             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16365             {
       
 16366         
       
 16367                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16368                 return return_type_symbol;
       
 16369                 
       
 16370             }
       
 16371             
       
 16372             
       
 16373             ERROR;
       
 16374         }
       
 16375         
       
 16376     }/*function_lint_to_lreal*/
       
 16377     break;
       
 16378 
       
 16379 /****
       
 16380  *LINT_TO_BYTE
       
 16381  */
       
 16382     case function_lint_to_byte :
       
 16383     {
       
 16384         symbol_c *last_type_symbol = NULL;
       
 16385 
       
 16386         {
       
 16387             symbol_c *IN_type_symbol = param_data_type;
       
 16388             last_type_symbol = param_data_type;
       
 16389             
       
 16390             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16391             {
       
 16392         
       
 16393                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 16394                 return return_type_symbol;
       
 16395                 
       
 16396             }
       
 16397             
       
 16398             
       
 16399             ERROR;
       
 16400         }
       
 16401         
       
 16402     }/*function_lint_to_byte*/
       
 16403     break;
       
 16404 
       
 16405 /****
       
 16406  *LINT_TO_USINT
       
 16407  */
       
 16408     case function_lint_to_usint :
       
 16409     {
       
 16410         symbol_c *last_type_symbol = NULL;
       
 16411 
       
 16412         {
       
 16413             symbol_c *IN_type_symbol = param_data_type;
       
 16414             last_type_symbol = param_data_type;
       
 16415             
       
 16416             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16417             {
       
 16418         
       
 16419                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 16420                 return return_type_symbol;
       
 16421                 
       
 16422             }
       
 16423             
       
 16424             
       
 16425             ERROR;
       
 16426         }
       
 16427         
       
 16428     }/*function_lint_to_usint*/
       
 16429     break;
       
 16430 
       
 16431 /****
       
 16432  *LINT_TO_ULINT
       
 16433  */
       
 16434     case function_lint_to_ulint :
       
 16435     {
       
 16436         symbol_c *last_type_symbol = NULL;
       
 16437 
       
 16438         {
       
 16439             symbol_c *IN_type_symbol = param_data_type;
       
 16440             last_type_symbol = param_data_type;
       
 16441             
       
 16442             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16443             {
       
 16444         
       
 16445                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 16446                 return return_type_symbol;
       
 16447                 
       
 16448             }
       
 16449             
       
 16450             
       
 16451             ERROR;
       
 16452         }
       
 16453         
       
 16454     }/*function_lint_to_ulint*/
       
 16455     break;
       
 16456 
       
 16457 /****
       
 16458  *LINT_TO_BOOL
       
 16459  */
       
 16460     case function_lint_to_bool :
       
 16461     {
       
 16462         symbol_c *last_type_symbol = NULL;
       
 16463 
       
 16464         {
       
 16465             symbol_c *IN_type_symbol = param_data_type;
       
 16466             last_type_symbol = param_data_type;
       
 16467             
       
 16468             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16469             {
       
 16470         
       
 16471                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16472                 return return_type_symbol;
       
 16473                 
       
 16474             }
       
 16475             
       
 16476             
       
 16477             ERROR;
       
 16478         }
       
 16479         
       
 16480     }/*function_lint_to_bool*/
       
 16481     break;
       
 16482 
       
 16483 /****
       
 16484  *LINT_TO_TIME
       
 16485  */
       
 16486     case function_lint_to_time :
       
 16487     {
       
 16488         symbol_c *last_type_symbol = NULL;
       
 16489 
       
 16490         {
       
 16491             symbol_c *IN_type_symbol = param_data_type;
       
 16492             last_type_symbol = param_data_type;
       
 16493             
       
 16494             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16495             {
       
 16496         
       
 16497                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16498                 return return_type_symbol;
       
 16499                 
       
 16500             }
       
 16501             
       
 16502             
       
 16503             ERROR;
       
 16504         }
       
 16505         
       
 16506     }/*function_lint_to_time*/
       
 16507     break;
       
 16508 
       
 16509 /****
       
 16510  *LINT_TO_INT
       
 16511  */
       
 16512     case function_lint_to_int :
       
 16513     {
       
 16514         symbol_c *last_type_symbol = NULL;
       
 16515 
       
 16516         {
       
 16517             symbol_c *IN_type_symbol = param_data_type;
       
 16518             last_type_symbol = param_data_type;
       
 16519             
       
 16520             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
       
 16521             {
       
 16522         
       
 16523                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 16524                 return return_type_symbol;
       
 16525                 
       
 16526             }
       
 16527             
       
 16528             
       
 16529             ERROR;
       
 16530         }
       
 16531         
       
 16532     }/*function_lint_to_int*/
       
 16533     break;
       
 16534 
       
 16535 /****
       
 16536  *DINT_TO_REAL
       
 16537  */
       
 16538     case function_dint_to_real :
       
 16539     {
       
 16540         symbol_c *last_type_symbol = NULL;
       
 16541 
       
 16542         {
       
 16543             symbol_c *IN_type_symbol = param_data_type;
       
 16544             last_type_symbol = param_data_type;
       
 16545             
       
 16546             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16547             {
       
 16548         
       
 16549                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 16550                 return return_type_symbol;
       
 16551                 
       
 16552             }
       
 16553             
       
 16554             
       
 16555             ERROR;
       
 16556         }
       
 16557         
       
 16558     }/*function_dint_to_real*/
       
 16559     break;
       
 16560 
       
 16561 /****
       
 16562  *DINT_TO_SINT
       
 16563  */
       
 16564     case function_dint_to_sint :
       
 16565     {
       
 16566         symbol_c *last_type_symbol = NULL;
       
 16567 
       
 16568         {
       
 16569             symbol_c *IN_type_symbol = param_data_type;
       
 16570             last_type_symbol = param_data_type;
       
 16571             
       
 16572             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16573             {
       
 16574         
       
 16575                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 16576                 return return_type_symbol;
       
 16577                 
       
 16578             }
       
 16579             
       
 16580             
       
 16581             ERROR;
       
 16582         }
       
 16583         
       
 16584     }/*function_dint_to_sint*/
       
 16585     break;
       
 16586 
       
 16587 /****
       
 16588  *DINT_TO_LINT
       
 16589  */
       
 16590     case function_dint_to_lint :
       
 16591     {
       
 16592         symbol_c *last_type_symbol = NULL;
       
 16593 
       
 16594         {
       
 16595             symbol_c *IN_type_symbol = param_data_type;
       
 16596             last_type_symbol = param_data_type;
       
 16597             
       
 16598             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16599             {
       
 16600         
       
 16601                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 16602                 return return_type_symbol;
       
 16603                 
       
 16604             }
       
 16605             
       
 16606             
       
 16607             ERROR;
       
 16608         }
       
 16609         
       
 16610     }/*function_dint_to_lint*/
       
 16611     break;
       
 16612 
       
 16613 /****
       
 16614  *DINT_TO_DATE
       
 16615  */
       
 16616     case function_dint_to_date :
       
 16617     {
       
 16618         symbol_c *last_type_symbol = NULL;
       
 16619 
       
 16620         {
       
 16621             symbol_c *IN_type_symbol = param_data_type;
       
 16622             last_type_symbol = param_data_type;
       
 16623             
       
 16624             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16625             {
       
 16626         
       
 16627                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 16628                 return return_type_symbol;
       
 16629                 
       
 16630             }
       
 16631             
       
 16632             
       
 16633             ERROR;
       
 16634         }
       
 16635         
       
 16636     }/*function_dint_to_date*/
       
 16637     break;
       
 16638 
       
 16639 /****
       
 16640  *DINT_TO_DWORD
       
 16641  */
       
 16642     case function_dint_to_dword :
       
 16643     {
       
 16644         symbol_c *last_type_symbol = NULL;
       
 16645 
       
 16646         {
       
 16647             symbol_c *IN_type_symbol = param_data_type;
       
 16648             last_type_symbol = param_data_type;
       
 16649             
       
 16650             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16651             {
       
 16652         
       
 16653                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 16654                 return return_type_symbol;
       
 16655                 
       
 16656             }
       
 16657             
       
 16658             
       
 16659             ERROR;
       
 16660         }
       
 16661         
       
 16662     }/*function_dint_to_dword*/
       
 16663     break;
       
 16664 
       
 16665 /****
       
 16666  *DINT_TO_DT
       
 16667  */
       
 16668     case function_dint_to_dt :
       
 16669     {
       
 16670         symbol_c *last_type_symbol = NULL;
       
 16671 
       
 16672         {
       
 16673             symbol_c *IN_type_symbol = param_data_type;
       
 16674             last_type_symbol = param_data_type;
       
 16675             
       
 16676             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16677             {
       
 16678         
       
 16679                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 16680                 return return_type_symbol;
       
 16681                 
       
 16682             }
       
 16683             
       
 16684             
       
 16685             ERROR;
       
 16686         }
       
 16687         
       
 16688     }/*function_dint_to_dt*/
       
 16689     break;
       
 16690 
       
 16691 /****
       
 16692  *DINT_TO_TOD
       
 16693  */
       
 16694     case function_dint_to_tod :
       
 16695     {
       
 16696         symbol_c *last_type_symbol = NULL;
       
 16697 
       
 16698         {
       
 16699             symbol_c *IN_type_symbol = param_data_type;
       
 16700             last_type_symbol = param_data_type;
       
 16701             
       
 16702             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16703             {
       
 16704         
       
 16705                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 16706                 return return_type_symbol;
       
 16707                 
       
 16708             }
       
 16709             
       
 16710             
       
 16711             ERROR;
       
 16712         }
       
 16713         
       
 16714     }/*function_dint_to_tod*/
       
 16715     break;
       
 16716 
       
 16717 /****
       
 16718  *DINT_TO_UDINT
       
 16719  */
       
 16720     case function_dint_to_udint :
       
 16721     {
       
 16722         symbol_c *last_type_symbol = NULL;
       
 16723 
       
 16724         {
       
 16725             symbol_c *IN_type_symbol = param_data_type;
       
 16726             last_type_symbol = param_data_type;
       
 16727             
       
 16728             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16729             {
       
 16730         
       
 16731                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 16732                 return return_type_symbol;
       
 16733                 
       
 16734             }
       
 16735             
       
 16736             
       
 16737             ERROR;
       
 16738         }
       
 16739         
       
 16740     }/*function_dint_to_udint*/
       
 16741     break;
       
 16742 
       
 16743 /****
       
 16744  *DINT_TO_WORD
       
 16745  */
       
 16746     case function_dint_to_word :
       
 16747     {
       
 16748         symbol_c *last_type_symbol = NULL;
       
 16749 
       
 16750         {
       
 16751             symbol_c *IN_type_symbol = param_data_type;
       
 16752             last_type_symbol = param_data_type;
       
 16753             
       
 16754             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16755             {
       
 16756         
       
 16757                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 16758                 return return_type_symbol;
       
 16759                 
       
 16760             }
       
 16761             
       
 16762             
       
 16763             ERROR;
       
 16764         }
       
 16765         
       
 16766     }/*function_dint_to_word*/
       
 16767     break;
       
 16768 
       
 16769 /****
       
 16770  *DINT_TO_STRING
       
 16771  */
       
 16772     case function_dint_to_string :
       
 16773     {
       
 16774         symbol_c *last_type_symbol = NULL;
       
 16775 
       
 16776         {
       
 16777             symbol_c *IN_type_symbol = param_data_type;
       
 16778             last_type_symbol = param_data_type;
       
 16779             
       
 16780             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16781             {
       
 16782         
       
 16783                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 16784                 return return_type_symbol;
       
 16785                 
       
 16786             }
       
 16787             
       
 16788             
       
 16789             ERROR;
       
 16790         }
       
 16791         
       
 16792     }/*function_dint_to_string*/
       
 16793     break;
       
 16794 
       
 16795 /****
       
 16796  *DINT_TO_LWORD
       
 16797  */
       
 16798     case function_dint_to_lword :
       
 16799     {
       
 16800         symbol_c *last_type_symbol = NULL;
       
 16801 
       
 16802         {
       
 16803             symbol_c *IN_type_symbol = param_data_type;
       
 16804             last_type_symbol = param_data_type;
       
 16805             
       
 16806             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16807             {
       
 16808         
       
 16809                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 16810                 return return_type_symbol;
       
 16811                 
       
 16812             }
       
 16813             
       
 16814             
       
 16815             ERROR;
       
 16816         }
       
 16817         
       
 16818     }/*function_dint_to_lword*/
       
 16819     break;
       
 16820 
       
 16821 /****
       
 16822  *DINT_TO_UINT
       
 16823  */
       
 16824     case function_dint_to_uint :
       
 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::dint_type_name, last_type_symbol))
       
 16833             {
       
 16834         
       
 16835                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 16836                 return return_type_symbol;
       
 16837                 
       
 16838             }
       
 16839             
       
 16840             
       
 16841             ERROR;
       
 16842         }
       
 16843         
       
 16844     }/*function_dint_to_uint*/
       
 16845     break;
       
 16846 
       
 16847 /****
       
 16848  *DINT_TO_LREAL
       
 16849  */
       
 16850     case function_dint_to_lreal :
       
 16851     {
       
 16852         symbol_c *last_type_symbol = NULL;
       
 16853 
       
 16854         {
       
 16855             symbol_c *IN_type_symbol = param_data_type;
       
 16856             last_type_symbol = param_data_type;
       
 16857             
       
 16858             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16859             {
       
 16860         
       
 16861                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 16862                 return return_type_symbol;
       
 16863                 
       
 16864             }
       
 16865             
       
 16866             
       
 16867             ERROR;
       
 16868         }
       
 16869         
       
 16870     }/*function_dint_to_lreal*/
       
 16871     break;
       
 16872 
       
 16873 /****
       
 16874  *DINT_TO_BYTE
       
 16875  */
       
 16876     case function_dint_to_byte :
       
 16877     {
       
 16878         symbol_c *last_type_symbol = NULL;
       
 16879 
       
 16880         {
       
 16881             symbol_c *IN_type_symbol = param_data_type;
       
 16882             last_type_symbol = param_data_type;
       
 16883             
       
 16884             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16885             {
       
 16886         
       
 16887                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 16888                 return return_type_symbol;
       
 16889                 
       
 16890             }
       
 16891             
       
 16892             
       
 16893             ERROR;
       
 16894         }
       
 16895         
       
 16896     }/*function_dint_to_byte*/
       
 16897     break;
       
 16898 
       
 16899 /****
       
 16900  *DINT_TO_USINT
       
 16901  */
       
 16902     case function_dint_to_usint :
       
 16903     {
       
 16904         symbol_c *last_type_symbol = NULL;
       
 16905 
       
 16906         {
       
 16907             symbol_c *IN_type_symbol = param_data_type;
       
 16908             last_type_symbol = param_data_type;
       
 16909             
       
 16910             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16911             {
       
 16912         
       
 16913                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 16914                 return return_type_symbol;
       
 16915                 
       
 16916             }
       
 16917             
       
 16918             
       
 16919             ERROR;
       
 16920         }
       
 16921         
       
 16922     }/*function_dint_to_usint*/
       
 16923     break;
       
 16924 
       
 16925 /****
       
 16926  *DINT_TO_ULINT
       
 16927  */
       
 16928     case function_dint_to_ulint :
       
 16929     {
       
 16930         symbol_c *last_type_symbol = NULL;
       
 16931 
       
 16932         {
       
 16933             symbol_c *IN_type_symbol = param_data_type;
       
 16934             last_type_symbol = param_data_type;
       
 16935             
       
 16936             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16937             {
       
 16938         
       
 16939                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 16940                 return return_type_symbol;
       
 16941                 
       
 16942             }
       
 16943             
       
 16944             
       
 16945             ERROR;
       
 16946         }
       
 16947         
       
 16948     }/*function_dint_to_ulint*/
       
 16949     break;
       
 16950 
       
 16951 /****
       
 16952  *DINT_TO_BOOL
       
 16953  */
       
 16954     case function_dint_to_bool :
       
 16955     {
       
 16956         symbol_c *last_type_symbol = NULL;
       
 16957 
       
 16958         {
       
 16959             symbol_c *IN_type_symbol = param_data_type;
       
 16960             last_type_symbol = param_data_type;
       
 16961             
       
 16962             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16963             {
       
 16964         
       
 16965                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 16966                 return return_type_symbol;
       
 16967                 
       
 16968             }
       
 16969             
       
 16970             
       
 16971             ERROR;
       
 16972         }
       
 16973         
       
 16974     }/*function_dint_to_bool*/
       
 16975     break;
       
 16976 
       
 16977 /****
       
 16978  *DINT_TO_TIME
       
 16979  */
       
 16980     case function_dint_to_time :
       
 16981     {
       
 16982         symbol_c *last_type_symbol = NULL;
       
 16983 
       
 16984         {
       
 16985             symbol_c *IN_type_symbol = param_data_type;
       
 16986             last_type_symbol = param_data_type;
       
 16987             
       
 16988             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 16989             {
       
 16990         
       
 16991                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 16992                 return return_type_symbol;
       
 16993                 
       
 16994             }
       
 16995             
       
 16996             
       
 16997             ERROR;
       
 16998         }
       
 16999         
       
 17000     }/*function_dint_to_time*/
       
 17001     break;
       
 17002 
       
 17003 /****
       
 17004  *DINT_TO_INT
       
 17005  */
       
 17006     case function_dint_to_int :
       
 17007     {
       
 17008         symbol_c *last_type_symbol = NULL;
       
 17009 
       
 17010         {
       
 17011             symbol_c *IN_type_symbol = param_data_type;
       
 17012             last_type_symbol = param_data_type;
       
 17013             
       
 17014             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
       
 17015             {
       
 17016         
       
 17017                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17018                 return return_type_symbol;
       
 17019                 
       
 17020             }
       
 17021             
       
 17022             
       
 17023             ERROR;
       
 17024         }
       
 17025         
       
 17026     }/*function_dint_to_int*/
       
 17027     break;
       
 17028 
       
 17029 /****
       
 17030  *DATE_TO_REAL
       
 17031  */
       
 17032     case function_date_to_real :
       
 17033     {
       
 17034         symbol_c *last_type_symbol = NULL;
       
 17035 
       
 17036         {
       
 17037             symbol_c *IN_type_symbol = param_data_type;
       
 17038             last_type_symbol = param_data_type;
       
 17039             
       
 17040             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17041             {
       
 17042         
       
 17043                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 17044                 return return_type_symbol;
       
 17045                 
       
 17046             }
       
 17047             
       
 17048             
       
 17049             ERROR;
       
 17050         }
       
 17051         
       
 17052     }/*function_date_to_real*/
       
 17053     break;
       
 17054 
       
 17055 /****
       
 17056  *DATE_TO_SINT
       
 17057  */
       
 17058     case function_date_to_sint :
       
 17059     {
       
 17060         symbol_c *last_type_symbol = NULL;
       
 17061 
       
 17062         {
       
 17063             symbol_c *IN_type_symbol = param_data_type;
       
 17064             last_type_symbol = param_data_type;
       
 17065             
       
 17066             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17067             {
       
 17068         
       
 17069                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 17070                 return return_type_symbol;
       
 17071                 
       
 17072             }
       
 17073             
       
 17074             
       
 17075             ERROR;
       
 17076         }
       
 17077         
       
 17078     }/*function_date_to_sint*/
       
 17079     break;
       
 17080 
       
 17081 /****
       
 17082  *DATE_TO_LINT
       
 17083  */
       
 17084     case function_date_to_lint :
       
 17085     {
       
 17086         symbol_c *last_type_symbol = NULL;
       
 17087 
       
 17088         {
       
 17089             symbol_c *IN_type_symbol = param_data_type;
       
 17090             last_type_symbol = param_data_type;
       
 17091             
       
 17092             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17093             {
       
 17094         
       
 17095                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17096                 return return_type_symbol;
       
 17097                 
       
 17098             }
       
 17099             
       
 17100             
       
 17101             ERROR;
       
 17102         }
       
 17103         
       
 17104     }/*function_date_to_lint*/
       
 17105     break;
       
 17106 
       
 17107 /****
       
 17108  *DATE_TO_DINT
       
 17109  */
       
 17110     case function_date_to_dint :
       
 17111     {
       
 17112         symbol_c *last_type_symbol = NULL;
       
 17113 
       
 17114         {
       
 17115             symbol_c *IN_type_symbol = param_data_type;
       
 17116             last_type_symbol = param_data_type;
       
 17117             
       
 17118             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17119             {
       
 17120         
       
 17121                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 17122                 return return_type_symbol;
       
 17123                 
       
 17124             }
       
 17125             
       
 17126             
       
 17127             ERROR;
       
 17128         }
       
 17129         
       
 17130     }/*function_date_to_dint*/
       
 17131     break;
       
 17132 
       
 17133 /****
       
 17134  *DATE_TO_DWORD
       
 17135  */
       
 17136     case function_date_to_dword :
       
 17137     {
       
 17138         symbol_c *last_type_symbol = NULL;
       
 17139 
       
 17140         {
       
 17141             symbol_c *IN_type_symbol = param_data_type;
       
 17142             last_type_symbol = param_data_type;
       
 17143             
       
 17144             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17145             {
       
 17146         
       
 17147                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 17148                 return return_type_symbol;
       
 17149                 
       
 17150             }
       
 17151             
       
 17152             
       
 17153             ERROR;
       
 17154         }
       
 17155         
       
 17156     }/*function_date_to_dword*/
       
 17157     break;
       
 17158 
       
 17159 /****
       
 17160  *DATE_TO_UDINT
       
 17161  */
       
 17162     case function_date_to_udint :
       
 17163     {
       
 17164         symbol_c *last_type_symbol = NULL;
       
 17165 
       
 17166         {
       
 17167             symbol_c *IN_type_symbol = param_data_type;
       
 17168             last_type_symbol = param_data_type;
       
 17169             
       
 17170             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17171             {
       
 17172         
       
 17173                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 17174                 return return_type_symbol;
       
 17175                 
       
 17176             }
       
 17177             
       
 17178             
       
 17179             ERROR;
       
 17180         }
       
 17181         
       
 17182     }/*function_date_to_udint*/
       
 17183     break;
       
 17184 
       
 17185 /****
       
 17186  *DATE_TO_WORD
       
 17187  */
       
 17188     case function_date_to_word :
       
 17189     {
       
 17190         symbol_c *last_type_symbol = NULL;
       
 17191 
       
 17192         {
       
 17193             symbol_c *IN_type_symbol = param_data_type;
       
 17194             last_type_symbol = param_data_type;
       
 17195             
       
 17196             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17197             {
       
 17198         
       
 17199                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 17200                 return return_type_symbol;
       
 17201                 
       
 17202             }
       
 17203             
       
 17204             
       
 17205             ERROR;
       
 17206         }
       
 17207         
       
 17208     }/*function_date_to_word*/
       
 17209     break;
       
 17210 
       
 17211 /****
       
 17212  *DATE_TO_STRING
       
 17213  */
       
 17214     case function_date_to_string :
       
 17215     {
       
 17216         symbol_c *last_type_symbol = NULL;
       
 17217 
       
 17218         {
       
 17219             symbol_c *IN_type_symbol = param_data_type;
       
 17220             last_type_symbol = param_data_type;
       
 17221             
       
 17222             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17223             {
       
 17224         
       
 17225                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 17226                 return return_type_symbol;
       
 17227                 
       
 17228             }
       
 17229             
       
 17230             
       
 17231             ERROR;
       
 17232         }
       
 17233         
       
 17234     }/*function_date_to_string*/
       
 17235     break;
       
 17236 
       
 17237 /****
       
 17238  *DATE_TO_LWORD
       
 17239  */
       
 17240     case function_date_to_lword :
       
 17241     {
       
 17242         symbol_c *last_type_symbol = NULL;
       
 17243 
       
 17244         {
       
 17245             symbol_c *IN_type_symbol = param_data_type;
       
 17246             last_type_symbol = param_data_type;
       
 17247             
       
 17248             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17249             {
       
 17250         
       
 17251                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17252                 return return_type_symbol;
       
 17253                 
       
 17254             }
       
 17255             
       
 17256             
       
 17257             ERROR;
       
 17258         }
       
 17259         
       
 17260     }/*function_date_to_lword*/
       
 17261     break;
       
 17262 
       
 17263 /****
       
 17264  *DATE_TO_UINT
       
 17265  */
       
 17266     case function_date_to_uint :
       
 17267     {
       
 17268         symbol_c *last_type_symbol = NULL;
       
 17269 
       
 17270         {
       
 17271             symbol_c *IN_type_symbol = param_data_type;
       
 17272             last_type_symbol = param_data_type;
       
 17273             
       
 17274             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17275             {
       
 17276         
       
 17277                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 17278                 return return_type_symbol;
       
 17279                 
       
 17280             }
       
 17281             
       
 17282             
       
 17283             ERROR;
       
 17284         }
       
 17285         
       
 17286     }/*function_date_to_uint*/
       
 17287     break;
       
 17288 
       
 17289 /****
       
 17290  *DATE_TO_LREAL
       
 17291  */
       
 17292     case function_date_to_lreal :
       
 17293     {
       
 17294         symbol_c *last_type_symbol = NULL;
       
 17295 
       
 17296         {
       
 17297             symbol_c *IN_type_symbol = param_data_type;
       
 17298             last_type_symbol = param_data_type;
       
 17299             
       
 17300             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17301             {
       
 17302         
       
 17303                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17304                 return return_type_symbol;
       
 17305                 
       
 17306             }
       
 17307             
       
 17308             
       
 17309             ERROR;
       
 17310         }
       
 17311         
       
 17312     }/*function_date_to_lreal*/
       
 17313     break;
       
 17314 
       
 17315 /****
       
 17316  *DATE_TO_BYTE
       
 17317  */
       
 17318     case function_date_to_byte :
       
 17319     {
       
 17320         symbol_c *last_type_symbol = NULL;
       
 17321 
       
 17322         {
       
 17323             symbol_c *IN_type_symbol = param_data_type;
       
 17324             last_type_symbol = param_data_type;
       
 17325             
       
 17326             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17327             {
       
 17328         
       
 17329                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 17330                 return return_type_symbol;
       
 17331                 
       
 17332             }
       
 17333             
       
 17334             
       
 17335             ERROR;
       
 17336         }
       
 17337         
       
 17338     }/*function_date_to_byte*/
       
 17339     break;
       
 17340 
       
 17341 /****
       
 17342  *DATE_TO_USINT
       
 17343  */
       
 17344     case function_date_to_usint :
       
 17345     {
       
 17346         symbol_c *last_type_symbol = NULL;
       
 17347 
       
 17348         {
       
 17349             symbol_c *IN_type_symbol = param_data_type;
       
 17350             last_type_symbol = param_data_type;
       
 17351             
       
 17352             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17353             {
       
 17354         
       
 17355                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 17356                 return return_type_symbol;
       
 17357                 
       
 17358             }
       
 17359             
       
 17360             
       
 17361             ERROR;
       
 17362         }
       
 17363         
       
 17364     }/*function_date_to_usint*/
       
 17365     break;
       
 17366 
       
 17367 /****
       
 17368  *DATE_TO_ULINT
       
 17369  */
       
 17370     case function_date_to_ulint :
       
 17371     {
       
 17372         symbol_c *last_type_symbol = NULL;
       
 17373 
       
 17374         {
       
 17375             symbol_c *IN_type_symbol = param_data_type;
       
 17376             last_type_symbol = param_data_type;
       
 17377             
       
 17378             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17379             {
       
 17380         
       
 17381                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 17382                 return return_type_symbol;
       
 17383                 
       
 17384             }
       
 17385             
       
 17386             
       
 17387             ERROR;
       
 17388         }
       
 17389         
       
 17390     }/*function_date_to_ulint*/
       
 17391     break;
       
 17392 
       
 17393 /****
       
 17394  *DATE_TO_INT
       
 17395  */
       
 17396     case function_date_to_int :
       
 17397     {
       
 17398         symbol_c *last_type_symbol = NULL;
       
 17399 
       
 17400         {
       
 17401             symbol_c *IN_type_symbol = param_data_type;
       
 17402             last_type_symbol = param_data_type;
       
 17403             
       
 17404             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 17405             {
       
 17406         
       
 17407                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17408                 return return_type_symbol;
       
 17409                 
       
 17410             }
       
 17411             
       
 17412             
       
 17413             ERROR;
       
 17414         }
       
 17415         
       
 17416     }/*function_date_to_int*/
       
 17417     break;
       
 17418 
       
 17419 /****
       
 17420  *DWORD_TO_REAL
       
 17421  */
       
 17422     case function_dword_to_real :
       
 17423     {
       
 17424         symbol_c *last_type_symbol = NULL;
       
 17425 
       
 17426         {
       
 17427             symbol_c *IN_type_symbol = param_data_type;
       
 17428             last_type_symbol = param_data_type;
       
 17429             
       
 17430             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17431             {
       
 17432         
       
 17433                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 17434                 return return_type_symbol;
       
 17435                 
       
 17436             }
       
 17437             
       
 17438             
       
 17439             ERROR;
       
 17440         }
       
 17441         
       
 17442     }/*function_dword_to_real*/
       
 17443     break;
       
 17444 
       
 17445 /****
       
 17446  *DWORD_TO_SINT
       
 17447  */
       
 17448     case function_dword_to_sint :
       
 17449     {
       
 17450         symbol_c *last_type_symbol = NULL;
       
 17451 
       
 17452         {
       
 17453             symbol_c *IN_type_symbol = param_data_type;
       
 17454             last_type_symbol = param_data_type;
       
 17455             
       
 17456             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17457             {
       
 17458         
       
 17459                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 17460                 return return_type_symbol;
       
 17461                 
       
 17462             }
       
 17463             
       
 17464             
       
 17465             ERROR;
       
 17466         }
       
 17467         
       
 17468     }/*function_dword_to_sint*/
       
 17469     break;
       
 17470 
       
 17471 /****
       
 17472  *DWORD_TO_LINT
       
 17473  */
       
 17474     case function_dword_to_lint :
       
 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::dword_type_name, last_type_symbol))
       
 17483             {
       
 17484         
       
 17485                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17486                 return return_type_symbol;
       
 17487                 
       
 17488             }
       
 17489             
       
 17490             
       
 17491             ERROR;
       
 17492         }
       
 17493         
       
 17494     }/*function_dword_to_lint*/
       
 17495     break;
       
 17496 
       
 17497 /****
       
 17498  *DWORD_TO_DINT
       
 17499  */
       
 17500     case function_dword_to_dint :
       
 17501     {
       
 17502         symbol_c *last_type_symbol = NULL;
       
 17503 
       
 17504         {
       
 17505             symbol_c *IN_type_symbol = param_data_type;
       
 17506             last_type_symbol = param_data_type;
       
 17507             
       
 17508             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17509             {
       
 17510         
       
 17511                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 17512                 return return_type_symbol;
       
 17513                 
       
 17514             }
       
 17515             
       
 17516             
       
 17517             ERROR;
       
 17518         }
       
 17519         
       
 17520     }/*function_dword_to_dint*/
       
 17521     break;
       
 17522 
       
 17523 /****
       
 17524  *DWORD_TO_DATE
       
 17525  */
       
 17526     case function_dword_to_date :
       
 17527     {
       
 17528         symbol_c *last_type_symbol = NULL;
       
 17529 
       
 17530         {
       
 17531             symbol_c *IN_type_symbol = param_data_type;
       
 17532             last_type_symbol = param_data_type;
       
 17533             
       
 17534             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17535             {
       
 17536         
       
 17537                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 17538                 return return_type_symbol;
       
 17539                 
       
 17540             }
       
 17541             
       
 17542             
       
 17543             ERROR;
       
 17544         }
       
 17545         
       
 17546     }/*function_dword_to_date*/
       
 17547     break;
       
 17548 
       
 17549 /****
       
 17550  *DWORD_TO_DT
       
 17551  */
       
 17552     case function_dword_to_dt :
       
 17553     {
       
 17554         symbol_c *last_type_symbol = NULL;
       
 17555 
       
 17556         {
       
 17557             symbol_c *IN_type_symbol = param_data_type;
       
 17558             last_type_symbol = param_data_type;
       
 17559             
       
 17560             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17561             {
       
 17562         
       
 17563                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 17564                 return return_type_symbol;
       
 17565                 
       
 17566             }
       
 17567             
       
 17568             
       
 17569             ERROR;
       
 17570         }
       
 17571         
       
 17572     }/*function_dword_to_dt*/
       
 17573     break;
       
 17574 
       
 17575 /****
       
 17576  *DWORD_TO_TOD
       
 17577  */
       
 17578     case function_dword_to_tod :
       
 17579     {
       
 17580         symbol_c *last_type_symbol = NULL;
       
 17581 
       
 17582         {
       
 17583             symbol_c *IN_type_symbol = param_data_type;
       
 17584             last_type_symbol = param_data_type;
       
 17585             
       
 17586             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17587             {
       
 17588         
       
 17589                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 17590                 return return_type_symbol;
       
 17591                 
       
 17592             }
       
 17593             
       
 17594             
       
 17595             ERROR;
       
 17596         }
       
 17597         
       
 17598     }/*function_dword_to_tod*/
       
 17599     break;
       
 17600 
       
 17601 /****
       
 17602  *DWORD_TO_UDINT
       
 17603  */
       
 17604     case function_dword_to_udint :
       
 17605     {
       
 17606         symbol_c *last_type_symbol = NULL;
       
 17607 
       
 17608         {
       
 17609             symbol_c *IN_type_symbol = param_data_type;
       
 17610             last_type_symbol = param_data_type;
       
 17611             
       
 17612             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17613             {
       
 17614         
       
 17615                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 17616                 return return_type_symbol;
       
 17617                 
       
 17618             }
       
 17619             
       
 17620             
       
 17621             ERROR;
       
 17622         }
       
 17623         
       
 17624     }/*function_dword_to_udint*/
       
 17625     break;
       
 17626 
       
 17627 /****
       
 17628  *DWORD_TO_WORD
       
 17629  */
       
 17630     case function_dword_to_word :
       
 17631     {
       
 17632         symbol_c *last_type_symbol = NULL;
       
 17633 
       
 17634         {
       
 17635             symbol_c *IN_type_symbol = param_data_type;
       
 17636             last_type_symbol = param_data_type;
       
 17637             
       
 17638             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17639             {
       
 17640         
       
 17641                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 17642                 return return_type_symbol;
       
 17643                 
       
 17644             }
       
 17645             
       
 17646             
       
 17647             ERROR;
       
 17648         }
       
 17649         
       
 17650     }/*function_dword_to_word*/
       
 17651     break;
       
 17652 
       
 17653 /****
       
 17654  *DWORD_TO_STRING
       
 17655  */
       
 17656     case function_dword_to_string :
       
 17657     {
       
 17658         symbol_c *last_type_symbol = NULL;
       
 17659 
       
 17660         {
       
 17661             symbol_c *IN_type_symbol = param_data_type;
       
 17662             last_type_symbol = param_data_type;
       
 17663             
       
 17664             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17665             {
       
 17666         
       
 17667                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 17668                 return return_type_symbol;
       
 17669                 
       
 17670             }
       
 17671             
       
 17672             
       
 17673             ERROR;
       
 17674         }
       
 17675         
       
 17676     }/*function_dword_to_string*/
       
 17677     break;
       
 17678 
       
 17679 /****
       
 17680  *DWORD_TO_LWORD
       
 17681  */
       
 17682     case function_dword_to_lword :
       
 17683     {
       
 17684         symbol_c *last_type_symbol = NULL;
       
 17685 
       
 17686         {
       
 17687             symbol_c *IN_type_symbol = param_data_type;
       
 17688             last_type_symbol = param_data_type;
       
 17689             
       
 17690             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17691             {
       
 17692         
       
 17693                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 17694                 return return_type_symbol;
       
 17695                 
       
 17696             }
       
 17697             
       
 17698             
       
 17699             ERROR;
       
 17700         }
       
 17701         
       
 17702     }/*function_dword_to_lword*/
       
 17703     break;
       
 17704 
       
 17705 /****
       
 17706  *DWORD_TO_UINT
       
 17707  */
       
 17708     case function_dword_to_uint :
       
 17709     {
       
 17710         symbol_c *last_type_symbol = NULL;
       
 17711 
       
 17712         {
       
 17713             symbol_c *IN_type_symbol = param_data_type;
       
 17714             last_type_symbol = param_data_type;
       
 17715             
       
 17716             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17717             {
       
 17718         
       
 17719                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 17720                 return return_type_symbol;
       
 17721                 
       
 17722             }
       
 17723             
       
 17724             
       
 17725             ERROR;
       
 17726         }
       
 17727         
       
 17728     }/*function_dword_to_uint*/
       
 17729     break;
       
 17730 
       
 17731 /****
       
 17732  *DWORD_TO_LREAL
       
 17733  */
       
 17734     case function_dword_to_lreal :
       
 17735     {
       
 17736         symbol_c *last_type_symbol = NULL;
       
 17737 
       
 17738         {
       
 17739             symbol_c *IN_type_symbol = param_data_type;
       
 17740             last_type_symbol = param_data_type;
       
 17741             
       
 17742             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17743             {
       
 17744         
       
 17745                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 17746                 return return_type_symbol;
       
 17747                 
       
 17748             }
       
 17749             
       
 17750             
       
 17751             ERROR;
       
 17752         }
       
 17753         
       
 17754     }/*function_dword_to_lreal*/
       
 17755     break;
       
 17756 
       
 17757 /****
       
 17758  *DWORD_TO_BYTE
       
 17759  */
       
 17760     case function_dword_to_byte :
       
 17761     {
       
 17762         symbol_c *last_type_symbol = NULL;
       
 17763 
       
 17764         {
       
 17765             symbol_c *IN_type_symbol = param_data_type;
       
 17766             last_type_symbol = param_data_type;
       
 17767             
       
 17768             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17769             {
       
 17770         
       
 17771                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 17772                 return return_type_symbol;
       
 17773                 
       
 17774             }
       
 17775             
       
 17776             
       
 17777             ERROR;
       
 17778         }
       
 17779         
       
 17780     }/*function_dword_to_byte*/
       
 17781     break;
       
 17782 
       
 17783 /****
       
 17784  *DWORD_TO_USINT
       
 17785  */
       
 17786     case function_dword_to_usint :
       
 17787     {
       
 17788         symbol_c *last_type_symbol = NULL;
       
 17789 
       
 17790         {
       
 17791             symbol_c *IN_type_symbol = param_data_type;
       
 17792             last_type_symbol = param_data_type;
       
 17793             
       
 17794             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17795             {
       
 17796         
       
 17797                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 17798                 return return_type_symbol;
       
 17799                 
       
 17800             }
       
 17801             
       
 17802             
       
 17803             ERROR;
       
 17804         }
       
 17805         
       
 17806     }/*function_dword_to_usint*/
       
 17807     break;
       
 17808 
       
 17809 /****
       
 17810  *DWORD_TO_ULINT
       
 17811  */
       
 17812     case function_dword_to_ulint :
       
 17813     {
       
 17814         symbol_c *last_type_symbol = NULL;
       
 17815 
       
 17816         {
       
 17817             symbol_c *IN_type_symbol = param_data_type;
       
 17818             last_type_symbol = param_data_type;
       
 17819             
       
 17820             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17821             {
       
 17822         
       
 17823                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 17824                 return return_type_symbol;
       
 17825                 
       
 17826             }
       
 17827             
       
 17828             
       
 17829             ERROR;
       
 17830         }
       
 17831         
       
 17832     }/*function_dword_to_ulint*/
       
 17833     break;
       
 17834 
       
 17835 /****
       
 17836  *DWORD_TO_BOOL
       
 17837  */
       
 17838     case function_dword_to_bool :
       
 17839     {
       
 17840         symbol_c *last_type_symbol = NULL;
       
 17841 
       
 17842         {
       
 17843             symbol_c *IN_type_symbol = param_data_type;
       
 17844             last_type_symbol = param_data_type;
       
 17845             
       
 17846             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17847             {
       
 17848         
       
 17849                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 17850                 return return_type_symbol;
       
 17851                 
       
 17852             }
       
 17853             
       
 17854             
       
 17855             ERROR;
       
 17856         }
       
 17857         
       
 17858     }/*function_dword_to_bool*/
       
 17859     break;
       
 17860 
       
 17861 /****
       
 17862  *DWORD_TO_TIME
       
 17863  */
       
 17864     case function_dword_to_time :
       
 17865     {
       
 17866         symbol_c *last_type_symbol = NULL;
       
 17867 
       
 17868         {
       
 17869             symbol_c *IN_type_symbol = param_data_type;
       
 17870             last_type_symbol = param_data_type;
       
 17871             
       
 17872             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17873             {
       
 17874         
       
 17875                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 17876                 return return_type_symbol;
       
 17877                 
       
 17878             }
       
 17879             
       
 17880             
       
 17881             ERROR;
       
 17882         }
       
 17883         
       
 17884     }/*function_dword_to_time*/
       
 17885     break;
       
 17886 
       
 17887 /****
       
 17888  *DWORD_TO_INT
       
 17889  */
       
 17890     case function_dword_to_int :
       
 17891     {
       
 17892         symbol_c *last_type_symbol = NULL;
       
 17893 
       
 17894         {
       
 17895             symbol_c *IN_type_symbol = param_data_type;
       
 17896             last_type_symbol = param_data_type;
       
 17897             
       
 17898             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 17899             {
       
 17900         
       
 17901                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 17902                 return return_type_symbol;
       
 17903                 
       
 17904             }
       
 17905             
       
 17906             
       
 17907             ERROR;
       
 17908         }
       
 17909         
       
 17910     }/*function_dword_to_int*/
       
 17911     break;
       
 17912 
       
 17913 /****
       
 17914  *DT_TO_REAL
       
 17915  */
       
 17916     case function_dt_to_real :
       
 17917     {
       
 17918         symbol_c *last_type_symbol = NULL;
       
 17919 
       
 17920         {
       
 17921             symbol_c *IN_type_symbol = param_data_type;
       
 17922             last_type_symbol = param_data_type;
       
 17923             
       
 17924             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 17925             {
       
 17926         
       
 17927                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 17928                 return return_type_symbol;
       
 17929                 
       
 17930             }
       
 17931             
       
 17932             
       
 17933             ERROR;
       
 17934         }
       
 17935         
       
 17936     }/*function_dt_to_real*/
       
 17937     break;
       
 17938 
       
 17939 /****
       
 17940  *DT_TO_SINT
       
 17941  */
       
 17942     case function_dt_to_sint :
       
 17943     {
       
 17944         symbol_c *last_type_symbol = NULL;
       
 17945 
       
 17946         {
       
 17947             symbol_c *IN_type_symbol = param_data_type;
       
 17948             last_type_symbol = param_data_type;
       
 17949             
       
 17950             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 17951             {
       
 17952         
       
 17953                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 17954                 return return_type_symbol;
       
 17955                 
       
 17956             }
       
 17957             
       
 17958             
       
 17959             ERROR;
       
 17960         }
       
 17961         
       
 17962     }/*function_dt_to_sint*/
       
 17963     break;
       
 17964 
       
 17965 /****
       
 17966  *DT_TO_LINT
       
 17967  */
       
 17968     case function_dt_to_lint :
       
 17969     {
       
 17970         symbol_c *last_type_symbol = NULL;
       
 17971 
       
 17972         {
       
 17973             symbol_c *IN_type_symbol = param_data_type;
       
 17974             last_type_symbol = param_data_type;
       
 17975             
       
 17976             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 17977             {
       
 17978         
       
 17979                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 17980                 return return_type_symbol;
       
 17981                 
       
 17982             }
       
 17983             
       
 17984             
       
 17985             ERROR;
       
 17986         }
       
 17987         
       
 17988     }/*function_dt_to_lint*/
       
 17989     break;
       
 17990 
       
 17991 /****
       
 17992  *DT_TO_DINT
       
 17993  */
       
 17994     case function_dt_to_dint :
       
 17995     {
       
 17996         symbol_c *last_type_symbol = NULL;
       
 17997 
       
 17998         {
       
 17999             symbol_c *IN_type_symbol = param_data_type;
       
 18000             last_type_symbol = param_data_type;
       
 18001             
       
 18002             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18003             {
       
 18004         
       
 18005                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18006                 return return_type_symbol;
       
 18007                 
       
 18008             }
       
 18009             
       
 18010             
       
 18011             ERROR;
       
 18012         }
       
 18013         
       
 18014     }/*function_dt_to_dint*/
       
 18015     break;
       
 18016 
       
 18017 /****
       
 18018  *DT_TO_DWORD
       
 18019  */
       
 18020     case function_dt_to_dword :
       
 18021     {
       
 18022         symbol_c *last_type_symbol = NULL;
       
 18023 
       
 18024         {
       
 18025             symbol_c *IN_type_symbol = param_data_type;
       
 18026             last_type_symbol = param_data_type;
       
 18027             
       
 18028             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18029             {
       
 18030         
       
 18031                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18032                 return return_type_symbol;
       
 18033                 
       
 18034             }
       
 18035             
       
 18036             
       
 18037             ERROR;
       
 18038         }
       
 18039         
       
 18040     }/*function_dt_to_dword*/
       
 18041     break;
       
 18042 
       
 18043 /****
       
 18044  *DT_TO_UDINT
       
 18045  */
       
 18046     case function_dt_to_udint :
       
 18047     {
       
 18048         symbol_c *last_type_symbol = NULL;
       
 18049 
       
 18050         {
       
 18051             symbol_c *IN_type_symbol = param_data_type;
       
 18052             last_type_symbol = param_data_type;
       
 18053             
       
 18054             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18055             {
       
 18056         
       
 18057                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 18058                 return return_type_symbol;
       
 18059                 
       
 18060             }
       
 18061             
       
 18062             
       
 18063             ERROR;
       
 18064         }
       
 18065         
       
 18066     }/*function_dt_to_udint*/
       
 18067     break;
       
 18068 
       
 18069 /****
       
 18070  *DT_TO_WORD
       
 18071  */
       
 18072     case function_dt_to_word :
       
 18073     {
       
 18074         symbol_c *last_type_symbol = NULL;
       
 18075 
       
 18076         {
       
 18077             symbol_c *IN_type_symbol = param_data_type;
       
 18078             last_type_symbol = param_data_type;
       
 18079             
       
 18080             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18081             {
       
 18082         
       
 18083                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18084                 return return_type_symbol;
       
 18085                 
       
 18086             }
       
 18087             
       
 18088             
       
 18089             ERROR;
       
 18090         }
       
 18091         
       
 18092     }/*function_dt_to_word*/
       
 18093     break;
       
 18094 
       
 18095 /****
       
 18096  *DT_TO_STRING
       
 18097  */
       
 18098     case function_dt_to_string :
       
 18099     {
       
 18100         symbol_c *last_type_symbol = NULL;
       
 18101 
       
 18102         {
       
 18103             symbol_c *IN_type_symbol = param_data_type;
       
 18104             last_type_symbol = param_data_type;
       
 18105             
       
 18106             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18107             {
       
 18108         
       
 18109                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18110                 return return_type_symbol;
       
 18111                 
       
 18112             }
       
 18113             
       
 18114             
       
 18115             ERROR;
       
 18116         }
       
 18117         
       
 18118     }/*function_dt_to_string*/
       
 18119     break;
       
 18120 
       
 18121 /****
       
 18122  *DT_TO_LWORD
       
 18123  */
       
 18124     case function_dt_to_lword :
       
 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::dt_type_name, last_type_symbol))
       
 18133             {
       
 18134         
       
 18135                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18136                 return return_type_symbol;
       
 18137                 
       
 18138             }
       
 18139             
       
 18140             
       
 18141             ERROR;
       
 18142         }
       
 18143         
       
 18144     }/*function_dt_to_lword*/
       
 18145     break;
       
 18146 
       
 18147 /****
       
 18148  *DT_TO_UINT
       
 18149  */
       
 18150     case function_dt_to_uint :
       
 18151     {
       
 18152         symbol_c *last_type_symbol = NULL;
       
 18153 
       
 18154         {
       
 18155             symbol_c *IN_type_symbol = param_data_type;
       
 18156             last_type_symbol = param_data_type;
       
 18157             
       
 18158             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18159             {
       
 18160         
       
 18161                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18162                 return return_type_symbol;
       
 18163                 
       
 18164             }
       
 18165             
       
 18166             
       
 18167             ERROR;
       
 18168         }
       
 18169         
       
 18170     }/*function_dt_to_uint*/
       
 18171     break;
       
 18172 
       
 18173 /****
       
 18174  *DT_TO_LREAL
       
 18175  */
       
 18176     case function_dt_to_lreal :
       
 18177     {
       
 18178         symbol_c *last_type_symbol = NULL;
       
 18179 
       
 18180         {
       
 18181             symbol_c *IN_type_symbol = param_data_type;
       
 18182             last_type_symbol = param_data_type;
       
 18183             
       
 18184             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18185             {
       
 18186         
       
 18187                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18188                 return return_type_symbol;
       
 18189                 
       
 18190             }
       
 18191             
       
 18192             
       
 18193             ERROR;
       
 18194         }
       
 18195         
       
 18196     }/*function_dt_to_lreal*/
       
 18197     break;
       
 18198 
       
 18199 /****
       
 18200  *DT_TO_BYTE
       
 18201  */
       
 18202     case function_dt_to_byte :
       
 18203     {
       
 18204         symbol_c *last_type_symbol = NULL;
       
 18205 
       
 18206         {
       
 18207             symbol_c *IN_type_symbol = param_data_type;
       
 18208             last_type_symbol = param_data_type;
       
 18209             
       
 18210             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18211             {
       
 18212         
       
 18213                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18214                 return return_type_symbol;
       
 18215                 
       
 18216             }
       
 18217             
       
 18218             
       
 18219             ERROR;
       
 18220         }
       
 18221         
       
 18222     }/*function_dt_to_byte*/
       
 18223     break;
       
 18224 
       
 18225 /****
       
 18226  *DT_TO_USINT
       
 18227  */
       
 18228     case function_dt_to_usint :
       
 18229     {
       
 18230         symbol_c *last_type_symbol = NULL;
       
 18231 
       
 18232         {
       
 18233             symbol_c *IN_type_symbol = param_data_type;
       
 18234             last_type_symbol = param_data_type;
       
 18235             
       
 18236             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18237             {
       
 18238         
       
 18239                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18240                 return return_type_symbol;
       
 18241                 
       
 18242             }
       
 18243             
       
 18244             
       
 18245             ERROR;
       
 18246         }
       
 18247         
       
 18248     }/*function_dt_to_usint*/
       
 18249     break;
       
 18250 
       
 18251 /****
       
 18252  *DT_TO_ULINT
       
 18253  */
       
 18254     case function_dt_to_ulint :
       
 18255     {
       
 18256         symbol_c *last_type_symbol = NULL;
       
 18257 
       
 18258         {
       
 18259             symbol_c *IN_type_symbol = param_data_type;
       
 18260             last_type_symbol = param_data_type;
       
 18261             
       
 18262             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18263             {
       
 18264         
       
 18265                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18266                 return return_type_symbol;
       
 18267                 
       
 18268             }
       
 18269             
       
 18270             
       
 18271             ERROR;
       
 18272         }
       
 18273         
       
 18274     }/*function_dt_to_ulint*/
       
 18275     break;
       
 18276 
       
 18277 /****
       
 18278  *DT_TO_INT
       
 18279  */
       
 18280     case function_dt_to_int :
       
 18281     {
       
 18282         symbol_c *last_type_symbol = NULL;
       
 18283 
       
 18284         {
       
 18285             symbol_c *IN_type_symbol = param_data_type;
       
 18286             last_type_symbol = param_data_type;
       
 18287             
       
 18288             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 18289             {
       
 18290         
       
 18291                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18292                 return return_type_symbol;
       
 18293                 
       
 18294             }
       
 18295             
       
 18296             
       
 18297             ERROR;
       
 18298         }
       
 18299         
       
 18300     }/*function_dt_to_int*/
       
 18301     break;
       
 18302 
       
 18303 /****
       
 18304  *TOD_TO_REAL
       
 18305  */
       
 18306     case function_tod_to_real :
       
 18307     {
       
 18308         symbol_c *last_type_symbol = NULL;
       
 18309 
       
 18310         {
       
 18311             symbol_c *IN_type_symbol = param_data_type;
       
 18312             last_type_symbol = param_data_type;
       
 18313             
       
 18314             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18315             {
       
 18316         
       
 18317                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18318                 return return_type_symbol;
       
 18319                 
       
 18320             }
       
 18321             
       
 18322             
       
 18323             ERROR;
       
 18324         }
       
 18325         
       
 18326     }/*function_tod_to_real*/
       
 18327     break;
       
 18328 
       
 18329 /****
       
 18330  *TOD_TO_SINT
       
 18331  */
       
 18332     case function_tod_to_sint :
       
 18333     {
       
 18334         symbol_c *last_type_symbol = NULL;
       
 18335 
       
 18336         {
       
 18337             symbol_c *IN_type_symbol = param_data_type;
       
 18338             last_type_symbol = param_data_type;
       
 18339             
       
 18340             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18341             {
       
 18342         
       
 18343                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18344                 return return_type_symbol;
       
 18345                 
       
 18346             }
       
 18347             
       
 18348             
       
 18349             ERROR;
       
 18350         }
       
 18351         
       
 18352     }/*function_tod_to_sint*/
       
 18353     break;
       
 18354 
       
 18355 /****
       
 18356  *TOD_TO_LINT
       
 18357  */
       
 18358     case function_tod_to_lint :
       
 18359     {
       
 18360         symbol_c *last_type_symbol = NULL;
       
 18361 
       
 18362         {
       
 18363             symbol_c *IN_type_symbol = param_data_type;
       
 18364             last_type_symbol = param_data_type;
       
 18365             
       
 18366             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18367             {
       
 18368         
       
 18369                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18370                 return return_type_symbol;
       
 18371                 
       
 18372             }
       
 18373             
       
 18374             
       
 18375             ERROR;
       
 18376         }
       
 18377         
       
 18378     }/*function_tod_to_lint*/
       
 18379     break;
       
 18380 
       
 18381 /****
       
 18382  *TOD_TO_DINT
       
 18383  */
       
 18384     case function_tod_to_dint :
       
 18385     {
       
 18386         symbol_c *last_type_symbol = NULL;
       
 18387 
       
 18388         {
       
 18389             symbol_c *IN_type_symbol = param_data_type;
       
 18390             last_type_symbol = param_data_type;
       
 18391             
       
 18392             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18393             {
       
 18394         
       
 18395                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18396                 return return_type_symbol;
       
 18397                 
       
 18398             }
       
 18399             
       
 18400             
       
 18401             ERROR;
       
 18402         }
       
 18403         
       
 18404     }/*function_tod_to_dint*/
       
 18405     break;
       
 18406 
       
 18407 /****
       
 18408  *TOD_TO_DWORD
       
 18409  */
       
 18410     case function_tod_to_dword :
       
 18411     {
       
 18412         symbol_c *last_type_symbol = NULL;
       
 18413 
       
 18414         {
       
 18415             symbol_c *IN_type_symbol = param_data_type;
       
 18416             last_type_symbol = param_data_type;
       
 18417             
       
 18418             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18419             {
       
 18420         
       
 18421                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18422                 return return_type_symbol;
       
 18423                 
       
 18424             }
       
 18425             
       
 18426             
       
 18427             ERROR;
       
 18428         }
       
 18429         
       
 18430     }/*function_tod_to_dword*/
       
 18431     break;
       
 18432 
       
 18433 /****
       
 18434  *TOD_TO_UDINT
       
 18435  */
       
 18436     case function_tod_to_udint :
       
 18437     {
       
 18438         symbol_c *last_type_symbol = NULL;
       
 18439 
       
 18440         {
       
 18441             symbol_c *IN_type_symbol = param_data_type;
       
 18442             last_type_symbol = param_data_type;
       
 18443             
       
 18444             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18445             {
       
 18446         
       
 18447                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 18448                 return return_type_symbol;
       
 18449                 
       
 18450             }
       
 18451             
       
 18452             
       
 18453             ERROR;
       
 18454         }
       
 18455         
       
 18456     }/*function_tod_to_udint*/
       
 18457     break;
       
 18458 
       
 18459 /****
       
 18460  *TOD_TO_WORD
       
 18461  */
       
 18462     case function_tod_to_word :
       
 18463     {
       
 18464         symbol_c *last_type_symbol = NULL;
       
 18465 
       
 18466         {
       
 18467             symbol_c *IN_type_symbol = param_data_type;
       
 18468             last_type_symbol = param_data_type;
       
 18469             
       
 18470             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18471             {
       
 18472         
       
 18473                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18474                 return return_type_symbol;
       
 18475                 
       
 18476             }
       
 18477             
       
 18478             
       
 18479             ERROR;
       
 18480         }
       
 18481         
       
 18482     }/*function_tod_to_word*/
       
 18483     break;
       
 18484 
       
 18485 /****
       
 18486  *TOD_TO_STRING
       
 18487  */
       
 18488     case function_tod_to_string :
       
 18489     {
       
 18490         symbol_c *last_type_symbol = NULL;
       
 18491 
       
 18492         {
       
 18493             symbol_c *IN_type_symbol = param_data_type;
       
 18494             last_type_symbol = param_data_type;
       
 18495             
       
 18496             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18497             {
       
 18498         
       
 18499                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18500                 return return_type_symbol;
       
 18501                 
       
 18502             }
       
 18503             
       
 18504             
       
 18505             ERROR;
       
 18506         }
       
 18507         
       
 18508     }/*function_tod_to_string*/
       
 18509     break;
       
 18510 
       
 18511 /****
       
 18512  *TOD_TO_LWORD
       
 18513  */
       
 18514     case function_tod_to_lword :
       
 18515     {
       
 18516         symbol_c *last_type_symbol = NULL;
       
 18517 
       
 18518         {
       
 18519             symbol_c *IN_type_symbol = param_data_type;
       
 18520             last_type_symbol = param_data_type;
       
 18521             
       
 18522             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18523             {
       
 18524         
       
 18525                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18526                 return return_type_symbol;
       
 18527                 
       
 18528             }
       
 18529             
       
 18530             
       
 18531             ERROR;
       
 18532         }
       
 18533         
       
 18534     }/*function_tod_to_lword*/
       
 18535     break;
       
 18536 
       
 18537 /****
       
 18538  *TOD_TO_UINT
       
 18539  */
       
 18540     case function_tod_to_uint :
       
 18541     {
       
 18542         symbol_c *last_type_symbol = NULL;
       
 18543 
       
 18544         {
       
 18545             symbol_c *IN_type_symbol = param_data_type;
       
 18546             last_type_symbol = param_data_type;
       
 18547             
       
 18548             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18549             {
       
 18550         
       
 18551                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18552                 return return_type_symbol;
       
 18553                 
       
 18554             }
       
 18555             
       
 18556             
       
 18557             ERROR;
       
 18558         }
       
 18559         
       
 18560     }/*function_tod_to_uint*/
       
 18561     break;
       
 18562 
       
 18563 /****
       
 18564  *TOD_TO_LREAL
       
 18565  */
       
 18566     case function_tod_to_lreal :
       
 18567     {
       
 18568         symbol_c *last_type_symbol = NULL;
       
 18569 
       
 18570         {
       
 18571             symbol_c *IN_type_symbol = param_data_type;
       
 18572             last_type_symbol = param_data_type;
       
 18573             
       
 18574             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18575             {
       
 18576         
       
 18577                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 18578                 return return_type_symbol;
       
 18579                 
       
 18580             }
       
 18581             
       
 18582             
       
 18583             ERROR;
       
 18584         }
       
 18585         
       
 18586     }/*function_tod_to_lreal*/
       
 18587     break;
       
 18588 
       
 18589 /****
       
 18590  *TOD_TO_BYTE
       
 18591  */
       
 18592     case function_tod_to_byte :
       
 18593     {
       
 18594         symbol_c *last_type_symbol = NULL;
       
 18595 
       
 18596         {
       
 18597             symbol_c *IN_type_symbol = param_data_type;
       
 18598             last_type_symbol = param_data_type;
       
 18599             
       
 18600             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18601             {
       
 18602         
       
 18603                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 18604                 return return_type_symbol;
       
 18605                 
       
 18606             }
       
 18607             
       
 18608             
       
 18609             ERROR;
       
 18610         }
       
 18611         
       
 18612     }/*function_tod_to_byte*/
       
 18613     break;
       
 18614 
       
 18615 /****
       
 18616  *TOD_TO_USINT
       
 18617  */
       
 18618     case function_tod_to_usint :
       
 18619     {
       
 18620         symbol_c *last_type_symbol = NULL;
       
 18621 
       
 18622         {
       
 18623             symbol_c *IN_type_symbol = param_data_type;
       
 18624             last_type_symbol = param_data_type;
       
 18625             
       
 18626             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18627             {
       
 18628         
       
 18629                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 18630                 return return_type_symbol;
       
 18631                 
       
 18632             }
       
 18633             
       
 18634             
       
 18635             ERROR;
       
 18636         }
       
 18637         
       
 18638     }/*function_tod_to_usint*/
       
 18639     break;
       
 18640 
       
 18641 /****
       
 18642  *TOD_TO_ULINT
       
 18643  */
       
 18644     case function_tod_to_ulint :
       
 18645     {
       
 18646         symbol_c *last_type_symbol = NULL;
       
 18647 
       
 18648         {
       
 18649             symbol_c *IN_type_symbol = param_data_type;
       
 18650             last_type_symbol = param_data_type;
       
 18651             
       
 18652             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18653             {
       
 18654         
       
 18655                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 18656                 return return_type_symbol;
       
 18657                 
       
 18658             }
       
 18659             
       
 18660             
       
 18661             ERROR;
       
 18662         }
       
 18663         
       
 18664     }/*function_tod_to_ulint*/
       
 18665     break;
       
 18666 
       
 18667 /****
       
 18668  *TOD_TO_INT
       
 18669  */
       
 18670     case function_tod_to_int :
       
 18671     {
       
 18672         symbol_c *last_type_symbol = NULL;
       
 18673 
       
 18674         {
       
 18675             symbol_c *IN_type_symbol = param_data_type;
       
 18676             last_type_symbol = param_data_type;
       
 18677             
       
 18678             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 18679             {
       
 18680         
       
 18681                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 18682                 return return_type_symbol;
       
 18683                 
       
 18684             }
       
 18685             
       
 18686             
       
 18687             ERROR;
       
 18688         }
       
 18689         
       
 18690     }/*function_tod_to_int*/
       
 18691     break;
       
 18692 
       
 18693 /****
       
 18694  *UDINT_TO_REAL
       
 18695  */
       
 18696     case function_udint_to_real :
       
 18697     {
       
 18698         symbol_c *last_type_symbol = NULL;
       
 18699 
       
 18700         {
       
 18701             symbol_c *IN_type_symbol = param_data_type;
       
 18702             last_type_symbol = param_data_type;
       
 18703             
       
 18704             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18705             {
       
 18706         
       
 18707                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 18708                 return return_type_symbol;
       
 18709                 
       
 18710             }
       
 18711             
       
 18712             
       
 18713             ERROR;
       
 18714         }
       
 18715         
       
 18716     }/*function_udint_to_real*/
       
 18717     break;
       
 18718 
       
 18719 /****
       
 18720  *UDINT_TO_SINT
       
 18721  */
       
 18722     case function_udint_to_sint :
       
 18723     {
       
 18724         symbol_c *last_type_symbol = NULL;
       
 18725 
       
 18726         {
       
 18727             symbol_c *IN_type_symbol = param_data_type;
       
 18728             last_type_symbol = param_data_type;
       
 18729             
       
 18730             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18731             {
       
 18732         
       
 18733                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 18734                 return return_type_symbol;
       
 18735                 
       
 18736             }
       
 18737             
       
 18738             
       
 18739             ERROR;
       
 18740         }
       
 18741         
       
 18742     }/*function_udint_to_sint*/
       
 18743     break;
       
 18744 
       
 18745 /****
       
 18746  *UDINT_TO_LINT
       
 18747  */
       
 18748     case function_udint_to_lint :
       
 18749     {
       
 18750         symbol_c *last_type_symbol = NULL;
       
 18751 
       
 18752         {
       
 18753             symbol_c *IN_type_symbol = param_data_type;
       
 18754             last_type_symbol = param_data_type;
       
 18755             
       
 18756             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18757             {
       
 18758         
       
 18759                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 18760                 return return_type_symbol;
       
 18761                 
       
 18762             }
       
 18763             
       
 18764             
       
 18765             ERROR;
       
 18766         }
       
 18767         
       
 18768     }/*function_udint_to_lint*/
       
 18769     break;
       
 18770 
       
 18771 /****
       
 18772  *UDINT_TO_DINT
       
 18773  */
       
 18774     case function_udint_to_dint :
       
 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::udint_type_name, last_type_symbol))
       
 18783             {
       
 18784         
       
 18785                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 18786                 return return_type_symbol;
       
 18787                 
       
 18788             }
       
 18789             
       
 18790             
       
 18791             ERROR;
       
 18792         }
       
 18793         
       
 18794     }/*function_udint_to_dint*/
       
 18795     break;
       
 18796 
       
 18797 /****
       
 18798  *UDINT_TO_DATE
       
 18799  */
       
 18800     case function_udint_to_date :
       
 18801     {
       
 18802         symbol_c *last_type_symbol = NULL;
       
 18803 
       
 18804         {
       
 18805             symbol_c *IN_type_symbol = param_data_type;
       
 18806             last_type_symbol = param_data_type;
       
 18807             
       
 18808             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18809             {
       
 18810         
       
 18811                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 18812                 return return_type_symbol;
       
 18813                 
       
 18814             }
       
 18815             
       
 18816             
       
 18817             ERROR;
       
 18818         }
       
 18819         
       
 18820     }/*function_udint_to_date*/
       
 18821     break;
       
 18822 
       
 18823 /****
       
 18824  *UDINT_TO_DWORD
       
 18825  */
       
 18826     case function_udint_to_dword :
       
 18827     {
       
 18828         symbol_c *last_type_symbol = NULL;
       
 18829 
       
 18830         {
       
 18831             symbol_c *IN_type_symbol = param_data_type;
       
 18832             last_type_symbol = param_data_type;
       
 18833             
       
 18834             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18835             {
       
 18836         
       
 18837                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 18838                 return return_type_symbol;
       
 18839                 
       
 18840             }
       
 18841             
       
 18842             
       
 18843             ERROR;
       
 18844         }
       
 18845         
       
 18846     }/*function_udint_to_dword*/
       
 18847     break;
       
 18848 
       
 18849 /****
       
 18850  *UDINT_TO_DT
       
 18851  */
       
 18852     case function_udint_to_dt :
       
 18853     {
       
 18854         symbol_c *last_type_symbol = NULL;
       
 18855 
       
 18856         {
       
 18857             symbol_c *IN_type_symbol = param_data_type;
       
 18858             last_type_symbol = param_data_type;
       
 18859             
       
 18860             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18861             {
       
 18862         
       
 18863                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 18864                 return return_type_symbol;
       
 18865                 
       
 18866             }
       
 18867             
       
 18868             
       
 18869             ERROR;
       
 18870         }
       
 18871         
       
 18872     }/*function_udint_to_dt*/
       
 18873     break;
       
 18874 
       
 18875 /****
       
 18876  *UDINT_TO_TOD
       
 18877  */
       
 18878     case function_udint_to_tod :
       
 18879     {
       
 18880         symbol_c *last_type_symbol = NULL;
       
 18881 
       
 18882         {
       
 18883             symbol_c *IN_type_symbol = param_data_type;
       
 18884             last_type_symbol = param_data_type;
       
 18885             
       
 18886             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18887             {
       
 18888         
       
 18889                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 18890                 return return_type_symbol;
       
 18891                 
       
 18892             }
       
 18893             
       
 18894             
       
 18895             ERROR;
       
 18896         }
       
 18897         
       
 18898     }/*function_udint_to_tod*/
       
 18899     break;
       
 18900 
       
 18901 /****
       
 18902  *UDINT_TO_WORD
       
 18903  */
       
 18904     case function_udint_to_word :
       
 18905     {
       
 18906         symbol_c *last_type_symbol = NULL;
       
 18907 
       
 18908         {
       
 18909             symbol_c *IN_type_symbol = param_data_type;
       
 18910             last_type_symbol = param_data_type;
       
 18911             
       
 18912             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18913             {
       
 18914         
       
 18915                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 18916                 return return_type_symbol;
       
 18917                 
       
 18918             }
       
 18919             
       
 18920             
       
 18921             ERROR;
       
 18922         }
       
 18923         
       
 18924     }/*function_udint_to_word*/
       
 18925     break;
       
 18926 
       
 18927 /****
       
 18928  *UDINT_TO_STRING
       
 18929  */
       
 18930     case function_udint_to_string :
       
 18931     {
       
 18932         symbol_c *last_type_symbol = NULL;
       
 18933 
       
 18934         {
       
 18935             symbol_c *IN_type_symbol = param_data_type;
       
 18936             last_type_symbol = param_data_type;
       
 18937             
       
 18938             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18939             {
       
 18940         
       
 18941                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 18942                 return return_type_symbol;
       
 18943                 
       
 18944             }
       
 18945             
       
 18946             
       
 18947             ERROR;
       
 18948         }
       
 18949         
       
 18950     }/*function_udint_to_string*/
       
 18951     break;
       
 18952 
       
 18953 /****
       
 18954  *UDINT_TO_LWORD
       
 18955  */
       
 18956     case function_udint_to_lword :
       
 18957     {
       
 18958         symbol_c *last_type_symbol = NULL;
       
 18959 
       
 18960         {
       
 18961             symbol_c *IN_type_symbol = param_data_type;
       
 18962             last_type_symbol = param_data_type;
       
 18963             
       
 18964             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18965             {
       
 18966         
       
 18967                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 18968                 return return_type_symbol;
       
 18969                 
       
 18970             }
       
 18971             
       
 18972             
       
 18973             ERROR;
       
 18974         }
       
 18975         
       
 18976     }/*function_udint_to_lword*/
       
 18977     break;
       
 18978 
       
 18979 /****
       
 18980  *UDINT_TO_UINT
       
 18981  */
       
 18982     case function_udint_to_uint :
       
 18983     {
       
 18984         symbol_c *last_type_symbol = NULL;
       
 18985 
       
 18986         {
       
 18987             symbol_c *IN_type_symbol = param_data_type;
       
 18988             last_type_symbol = param_data_type;
       
 18989             
       
 18990             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 18991             {
       
 18992         
       
 18993                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 18994                 return return_type_symbol;
       
 18995                 
       
 18996             }
       
 18997             
       
 18998             
       
 18999             ERROR;
       
 19000         }
       
 19001         
       
 19002     }/*function_udint_to_uint*/
       
 19003     break;
       
 19004 
       
 19005 /****
       
 19006  *UDINT_TO_LREAL
       
 19007  */
       
 19008     case function_udint_to_lreal :
       
 19009     {
       
 19010         symbol_c *last_type_symbol = NULL;
       
 19011 
       
 19012         {
       
 19013             symbol_c *IN_type_symbol = param_data_type;
       
 19014             last_type_symbol = param_data_type;
       
 19015             
       
 19016             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 19017             {
       
 19018         
       
 19019                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19020                 return return_type_symbol;
       
 19021                 
       
 19022             }
       
 19023             
       
 19024             
       
 19025             ERROR;
       
 19026         }
       
 19027         
       
 19028     }/*function_udint_to_lreal*/
       
 19029     break;
       
 19030 
       
 19031 /****
       
 19032  *UDINT_TO_BYTE
       
 19033  */
       
 19034     case function_udint_to_byte :
       
 19035     {
       
 19036         symbol_c *last_type_symbol = NULL;
       
 19037 
       
 19038         {
       
 19039             symbol_c *IN_type_symbol = param_data_type;
       
 19040             last_type_symbol = param_data_type;
       
 19041             
       
 19042             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 19043             {
       
 19044         
       
 19045                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19046                 return return_type_symbol;
       
 19047                 
       
 19048             }
       
 19049             
       
 19050             
       
 19051             ERROR;
       
 19052         }
       
 19053         
       
 19054     }/*function_udint_to_byte*/
       
 19055     break;
       
 19056 
       
 19057 /****
       
 19058  *UDINT_TO_USINT
       
 19059  */
       
 19060     case function_udint_to_usint :
       
 19061     {
       
 19062         symbol_c *last_type_symbol = NULL;
       
 19063 
       
 19064         {
       
 19065             symbol_c *IN_type_symbol = param_data_type;
       
 19066             last_type_symbol = param_data_type;
       
 19067             
       
 19068             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 19069             {
       
 19070         
       
 19071                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19072                 return return_type_symbol;
       
 19073                 
       
 19074             }
       
 19075             
       
 19076             
       
 19077             ERROR;
       
 19078         }
       
 19079         
       
 19080     }/*function_udint_to_usint*/
       
 19081     break;
       
 19082 
       
 19083 /****
       
 19084  *UDINT_TO_ULINT
       
 19085  */
       
 19086     case function_udint_to_ulint :
       
 19087     {
       
 19088         symbol_c *last_type_symbol = NULL;
       
 19089 
       
 19090         {
       
 19091             symbol_c *IN_type_symbol = param_data_type;
       
 19092             last_type_symbol = param_data_type;
       
 19093             
       
 19094             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 19095             {
       
 19096         
       
 19097                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19098                 return return_type_symbol;
       
 19099                 
       
 19100             }
       
 19101             
       
 19102             
       
 19103             ERROR;
       
 19104         }
       
 19105         
       
 19106     }/*function_udint_to_ulint*/
       
 19107     break;
       
 19108 
       
 19109 /****
       
 19110  *UDINT_TO_BOOL
       
 19111  */
       
 19112     case function_udint_to_bool :
       
 19113     {
       
 19114         symbol_c *last_type_symbol = NULL;
       
 19115 
       
 19116         {
       
 19117             symbol_c *IN_type_symbol = param_data_type;
       
 19118             last_type_symbol = param_data_type;
       
 19119             
       
 19120             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 19121             {
       
 19122         
       
 19123                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19124                 return return_type_symbol;
       
 19125                 
       
 19126             }
       
 19127             
       
 19128             
       
 19129             ERROR;
       
 19130         }
       
 19131         
       
 19132     }/*function_udint_to_bool*/
       
 19133     break;
       
 19134 
       
 19135 /****
       
 19136  *UDINT_TO_TIME
       
 19137  */
       
 19138     case function_udint_to_time :
       
 19139     {
       
 19140         symbol_c *last_type_symbol = NULL;
       
 19141 
       
 19142         {
       
 19143             symbol_c *IN_type_symbol = param_data_type;
       
 19144             last_type_symbol = param_data_type;
       
 19145             
       
 19146             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 19147             {
       
 19148         
       
 19149                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 19150                 return return_type_symbol;
       
 19151                 
       
 19152             }
       
 19153             
       
 19154             
       
 19155             ERROR;
       
 19156         }
       
 19157         
       
 19158     }/*function_udint_to_time*/
       
 19159     break;
       
 19160 
       
 19161 /****
       
 19162  *UDINT_TO_INT
       
 19163  */
       
 19164     case function_udint_to_int :
       
 19165     {
       
 19166         symbol_c *last_type_symbol = NULL;
       
 19167 
       
 19168         {
       
 19169             symbol_c *IN_type_symbol = param_data_type;
       
 19170             last_type_symbol = param_data_type;
       
 19171             
       
 19172             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
       
 19173             {
       
 19174         
       
 19175                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19176                 return return_type_symbol;
       
 19177                 
       
 19178             }
       
 19179             
       
 19180             
       
 19181             ERROR;
       
 19182         }
       
 19183         
       
 19184     }/*function_udint_to_int*/
       
 19185     break;
       
 19186 
       
 19187 /****
       
 19188  *WORD_TO_REAL
       
 19189  */
       
 19190     case function_word_to_real :
       
 19191     {
       
 19192         symbol_c *last_type_symbol = NULL;
       
 19193 
       
 19194         {
       
 19195             symbol_c *IN_type_symbol = param_data_type;
       
 19196             last_type_symbol = param_data_type;
       
 19197             
       
 19198             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19199             {
       
 19200         
       
 19201                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19202                 return return_type_symbol;
       
 19203                 
       
 19204             }
       
 19205             
       
 19206             
       
 19207             ERROR;
       
 19208         }
       
 19209         
       
 19210     }/*function_word_to_real*/
       
 19211     break;
       
 19212 
       
 19213 /****
       
 19214  *WORD_TO_SINT
       
 19215  */
       
 19216     case function_word_to_sint :
       
 19217     {
       
 19218         symbol_c *last_type_symbol = NULL;
       
 19219 
       
 19220         {
       
 19221             symbol_c *IN_type_symbol = param_data_type;
       
 19222             last_type_symbol = param_data_type;
       
 19223             
       
 19224             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19225             {
       
 19226         
       
 19227                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19228                 return return_type_symbol;
       
 19229                 
       
 19230             }
       
 19231             
       
 19232             
       
 19233             ERROR;
       
 19234         }
       
 19235         
       
 19236     }/*function_word_to_sint*/
       
 19237     break;
       
 19238 
       
 19239 /****
       
 19240  *WORD_TO_LINT
       
 19241  */
       
 19242     case function_word_to_lint :
       
 19243     {
       
 19244         symbol_c *last_type_symbol = NULL;
       
 19245 
       
 19246         {
       
 19247             symbol_c *IN_type_symbol = param_data_type;
       
 19248             last_type_symbol = param_data_type;
       
 19249             
       
 19250             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19251             {
       
 19252         
       
 19253                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19254                 return return_type_symbol;
       
 19255                 
       
 19256             }
       
 19257             
       
 19258             
       
 19259             ERROR;
       
 19260         }
       
 19261         
       
 19262     }/*function_word_to_lint*/
       
 19263     break;
       
 19264 
       
 19265 /****
       
 19266  *WORD_TO_DINT
       
 19267  */
       
 19268     case function_word_to_dint :
       
 19269     {
       
 19270         symbol_c *last_type_symbol = NULL;
       
 19271 
       
 19272         {
       
 19273             symbol_c *IN_type_symbol = param_data_type;
       
 19274             last_type_symbol = param_data_type;
       
 19275             
       
 19276             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19277             {
       
 19278         
       
 19279                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19280                 return return_type_symbol;
       
 19281                 
       
 19282             }
       
 19283             
       
 19284             
       
 19285             ERROR;
       
 19286         }
       
 19287         
       
 19288     }/*function_word_to_dint*/
       
 19289     break;
       
 19290 
       
 19291 /****
       
 19292  *WORD_TO_DATE
       
 19293  */
       
 19294     case function_word_to_date :
       
 19295     {
       
 19296         symbol_c *last_type_symbol = NULL;
       
 19297 
       
 19298         {
       
 19299             symbol_c *IN_type_symbol = param_data_type;
       
 19300             last_type_symbol = param_data_type;
       
 19301             
       
 19302             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19303             {
       
 19304         
       
 19305                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 19306                 return return_type_symbol;
       
 19307                 
       
 19308             }
       
 19309             
       
 19310             
       
 19311             ERROR;
       
 19312         }
       
 19313         
       
 19314     }/*function_word_to_date*/
       
 19315     break;
       
 19316 
       
 19317 /****
       
 19318  *WORD_TO_DWORD
       
 19319  */
       
 19320     case function_word_to_dword :
       
 19321     {
       
 19322         symbol_c *last_type_symbol = NULL;
       
 19323 
       
 19324         {
       
 19325             symbol_c *IN_type_symbol = param_data_type;
       
 19326             last_type_symbol = param_data_type;
       
 19327             
       
 19328             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19329             {
       
 19330         
       
 19331                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19332                 return return_type_symbol;
       
 19333                 
       
 19334             }
       
 19335             
       
 19336             
       
 19337             ERROR;
       
 19338         }
       
 19339         
       
 19340     }/*function_word_to_dword*/
       
 19341     break;
       
 19342 
       
 19343 /****
       
 19344  *WORD_TO_DT
       
 19345  */
       
 19346     case function_word_to_dt :
       
 19347     {
       
 19348         symbol_c *last_type_symbol = NULL;
       
 19349 
       
 19350         {
       
 19351             symbol_c *IN_type_symbol = param_data_type;
       
 19352             last_type_symbol = param_data_type;
       
 19353             
       
 19354             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19355             {
       
 19356         
       
 19357                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 19358                 return return_type_symbol;
       
 19359                 
       
 19360             }
       
 19361             
       
 19362             
       
 19363             ERROR;
       
 19364         }
       
 19365         
       
 19366     }/*function_word_to_dt*/
       
 19367     break;
       
 19368 
       
 19369 /****
       
 19370  *WORD_TO_TOD
       
 19371  */
       
 19372     case function_word_to_tod :
       
 19373     {
       
 19374         symbol_c *last_type_symbol = NULL;
       
 19375 
       
 19376         {
       
 19377             symbol_c *IN_type_symbol = param_data_type;
       
 19378             last_type_symbol = param_data_type;
       
 19379             
       
 19380             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19381             {
       
 19382         
       
 19383                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 19384                 return return_type_symbol;
       
 19385                 
       
 19386             }
       
 19387             
       
 19388             
       
 19389             ERROR;
       
 19390         }
       
 19391         
       
 19392     }/*function_word_to_tod*/
       
 19393     break;
       
 19394 
       
 19395 /****
       
 19396  *WORD_TO_UDINT
       
 19397  */
       
 19398     case function_word_to_udint :
       
 19399     {
       
 19400         symbol_c *last_type_symbol = NULL;
       
 19401 
       
 19402         {
       
 19403             symbol_c *IN_type_symbol = param_data_type;
       
 19404             last_type_symbol = param_data_type;
       
 19405             
       
 19406             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19407             {
       
 19408         
       
 19409                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19410                 return return_type_symbol;
       
 19411                 
       
 19412             }
       
 19413             
       
 19414             
       
 19415             ERROR;
       
 19416         }
       
 19417         
       
 19418     }/*function_word_to_udint*/
       
 19419     break;
       
 19420 
       
 19421 /****
       
 19422  *WORD_TO_STRING
       
 19423  */
       
 19424     case function_word_to_string :
       
 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::word_type_name, last_type_symbol))
       
 19433             {
       
 19434         
       
 19435                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 19436                 return return_type_symbol;
       
 19437                 
       
 19438             }
       
 19439             
       
 19440             
       
 19441             ERROR;
       
 19442         }
       
 19443         
       
 19444     }/*function_word_to_string*/
       
 19445     break;
       
 19446 
       
 19447 /****
       
 19448  *WORD_TO_LWORD
       
 19449  */
       
 19450     case function_word_to_lword :
       
 19451     {
       
 19452         symbol_c *last_type_symbol = NULL;
       
 19453 
       
 19454         {
       
 19455             symbol_c *IN_type_symbol = param_data_type;
       
 19456             last_type_symbol = param_data_type;
       
 19457             
       
 19458             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19459             {
       
 19460         
       
 19461                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19462                 return return_type_symbol;
       
 19463                 
       
 19464             }
       
 19465             
       
 19466             
       
 19467             ERROR;
       
 19468         }
       
 19469         
       
 19470     }/*function_word_to_lword*/
       
 19471     break;
       
 19472 
       
 19473 /****
       
 19474  *WORD_TO_UINT
       
 19475  */
       
 19476     case function_word_to_uint :
       
 19477     {
       
 19478         symbol_c *last_type_symbol = NULL;
       
 19479 
       
 19480         {
       
 19481             symbol_c *IN_type_symbol = param_data_type;
       
 19482             last_type_symbol = param_data_type;
       
 19483             
       
 19484             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19485             {
       
 19486         
       
 19487                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19488                 return return_type_symbol;
       
 19489                 
       
 19490             }
       
 19491             
       
 19492             
       
 19493             ERROR;
       
 19494         }
       
 19495         
       
 19496     }/*function_word_to_uint*/
       
 19497     break;
       
 19498 
       
 19499 /****
       
 19500  *WORD_TO_LREAL
       
 19501  */
       
 19502     case function_word_to_lreal :
       
 19503     {
       
 19504         symbol_c *last_type_symbol = NULL;
       
 19505 
       
 19506         {
       
 19507             symbol_c *IN_type_symbol = param_data_type;
       
 19508             last_type_symbol = param_data_type;
       
 19509             
       
 19510             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19511             {
       
 19512         
       
 19513                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 19514                 return return_type_symbol;
       
 19515                 
       
 19516             }
       
 19517             
       
 19518             
       
 19519             ERROR;
       
 19520         }
       
 19521         
       
 19522     }/*function_word_to_lreal*/
       
 19523     break;
       
 19524 
       
 19525 /****
       
 19526  *WORD_TO_BYTE
       
 19527  */
       
 19528     case function_word_to_byte :
       
 19529     {
       
 19530         symbol_c *last_type_symbol = NULL;
       
 19531 
       
 19532         {
       
 19533             symbol_c *IN_type_symbol = param_data_type;
       
 19534             last_type_symbol = param_data_type;
       
 19535             
       
 19536             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19537             {
       
 19538         
       
 19539                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 19540                 return return_type_symbol;
       
 19541                 
       
 19542             }
       
 19543             
       
 19544             
       
 19545             ERROR;
       
 19546         }
       
 19547         
       
 19548     }/*function_word_to_byte*/
       
 19549     break;
       
 19550 
       
 19551 /****
       
 19552  *WORD_TO_USINT
       
 19553  */
       
 19554     case function_word_to_usint :
       
 19555     {
       
 19556         symbol_c *last_type_symbol = NULL;
       
 19557 
       
 19558         {
       
 19559             symbol_c *IN_type_symbol = param_data_type;
       
 19560             last_type_symbol = param_data_type;
       
 19561             
       
 19562             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19563             {
       
 19564         
       
 19565                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19566                 return return_type_symbol;
       
 19567                 
       
 19568             }
       
 19569             
       
 19570             
       
 19571             ERROR;
       
 19572         }
       
 19573         
       
 19574     }/*function_word_to_usint*/
       
 19575     break;
       
 19576 
       
 19577 /****
       
 19578  *WORD_TO_ULINT
       
 19579  */
       
 19580     case function_word_to_ulint :
       
 19581     {
       
 19582         symbol_c *last_type_symbol = NULL;
       
 19583 
       
 19584         {
       
 19585             symbol_c *IN_type_symbol = param_data_type;
       
 19586             last_type_symbol = param_data_type;
       
 19587             
       
 19588             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19589             {
       
 19590         
       
 19591                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19592                 return return_type_symbol;
       
 19593                 
       
 19594             }
       
 19595             
       
 19596             
       
 19597             ERROR;
       
 19598         }
       
 19599         
       
 19600     }/*function_word_to_ulint*/
       
 19601     break;
       
 19602 
       
 19603 /****
       
 19604  *WORD_TO_BOOL
       
 19605  */
       
 19606     case function_word_to_bool :
       
 19607     {
       
 19608         symbol_c *last_type_symbol = NULL;
       
 19609 
       
 19610         {
       
 19611             symbol_c *IN_type_symbol = param_data_type;
       
 19612             last_type_symbol = param_data_type;
       
 19613             
       
 19614             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19615             {
       
 19616         
       
 19617                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 19618                 return return_type_symbol;
       
 19619                 
       
 19620             }
       
 19621             
       
 19622             
       
 19623             ERROR;
       
 19624         }
       
 19625         
       
 19626     }/*function_word_to_bool*/
       
 19627     break;
       
 19628 
       
 19629 /****
       
 19630  *WORD_TO_TIME
       
 19631  */
       
 19632     case function_word_to_time :
       
 19633     {
       
 19634         symbol_c *last_type_symbol = NULL;
       
 19635 
       
 19636         {
       
 19637             symbol_c *IN_type_symbol = param_data_type;
       
 19638             last_type_symbol = param_data_type;
       
 19639             
       
 19640             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19641             {
       
 19642         
       
 19643                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 19644                 return return_type_symbol;
       
 19645                 
       
 19646             }
       
 19647             
       
 19648             
       
 19649             ERROR;
       
 19650         }
       
 19651         
       
 19652     }/*function_word_to_time*/
       
 19653     break;
       
 19654 
       
 19655 /****
       
 19656  *WORD_TO_INT
       
 19657  */
       
 19658     case function_word_to_int :
       
 19659     {
       
 19660         symbol_c *last_type_symbol = NULL;
       
 19661 
       
 19662         {
       
 19663             symbol_c *IN_type_symbol = param_data_type;
       
 19664             last_type_symbol = param_data_type;
       
 19665             
       
 19666             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 19667             {
       
 19668         
       
 19669                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19670                 return return_type_symbol;
       
 19671                 
       
 19672             }
       
 19673             
       
 19674             
       
 19675             ERROR;
       
 19676         }
       
 19677         
       
 19678     }/*function_word_to_int*/
       
 19679     break;
       
 19680 
       
 19681 /****
       
 19682  *STRING_TO_REAL
       
 19683  */
       
 19684     case function_string_to_real :
       
 19685     {
       
 19686         symbol_c *last_type_symbol = NULL;
       
 19687 
       
 19688         {
       
 19689             symbol_c *IN_type_symbol = param_data_type;
       
 19690             last_type_symbol = param_data_type;
       
 19691             
       
 19692             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19693             {
       
 19694         
       
 19695                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19696                 return return_type_symbol;
       
 19697                 
       
 19698             }
       
 19699             
       
 19700             
       
 19701             ERROR;
       
 19702         }
       
 19703         
       
 19704     }/*function_string_to_real*/
       
 19705     break;
       
 19706 
       
 19707 /****
       
 19708  *STRING_TO_SINT
       
 19709  */
       
 19710     case function_string_to_sint :
       
 19711     {
       
 19712         symbol_c *last_type_symbol = NULL;
       
 19713 
       
 19714         {
       
 19715             symbol_c *IN_type_symbol = param_data_type;
       
 19716             last_type_symbol = param_data_type;
       
 19717             
       
 19718             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19719             {
       
 19720         
       
 19721                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19722                 return return_type_symbol;
       
 19723                 
       
 19724             }
       
 19725             
       
 19726             
       
 19727             ERROR;
       
 19728         }
       
 19729         
       
 19730     }/*function_string_to_sint*/
       
 19731     break;
       
 19732 
       
 19733 /****
       
 19734  *STRING_TO_LINT
       
 19735  */
       
 19736     case function_string_to_lint :
       
 19737     {
       
 19738         symbol_c *last_type_symbol = NULL;
       
 19739 
       
 19740         {
       
 19741             symbol_c *IN_type_symbol = param_data_type;
       
 19742             last_type_symbol = param_data_type;
       
 19743             
       
 19744             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19745             {
       
 19746         
       
 19747                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19748                 return return_type_symbol;
       
 19749                 
       
 19750             }
       
 19751             
       
 19752             
       
 19753             ERROR;
       
 19754         }
       
 19755         
       
 19756     }/*function_string_to_lint*/
       
 19757     break;
       
 19758 
       
 19759 /****
       
 19760  *STRING_TO_DINT
       
 19761  */
       
 19762     case function_string_to_dint :
       
 19763     {
       
 19764         symbol_c *last_type_symbol = NULL;
       
 19765 
       
 19766         {
       
 19767             symbol_c *IN_type_symbol = param_data_type;
       
 19768             last_type_symbol = param_data_type;
       
 19769             
       
 19770             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19771             {
       
 19772         
       
 19773                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19774                 return return_type_symbol;
       
 19775                 
       
 19776             }
       
 19777             
       
 19778             
       
 19779             ERROR;
       
 19780         }
       
 19781         
       
 19782     }/*function_string_to_dint*/
       
 19783     break;
       
 19784 
       
 19785 /****
       
 19786  *STRING_TO_DATE
       
 19787  */
       
 19788     case function_string_to_date :
       
 19789     {
       
 19790         symbol_c *last_type_symbol = NULL;
       
 19791 
       
 19792         {
       
 19793             symbol_c *IN_type_symbol = param_data_type;
       
 19794             last_type_symbol = param_data_type;
       
 19795             
       
 19796             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19797             {
       
 19798         
       
 19799                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 19800                 return return_type_symbol;
       
 19801                 
       
 19802             }
       
 19803             
       
 19804             
       
 19805             ERROR;
       
 19806         }
       
 19807         
       
 19808     }/*function_string_to_date*/
       
 19809     break;
       
 19810 
       
 19811 /****
       
 19812  *STRING_TO_DWORD
       
 19813  */
       
 19814     case function_string_to_dword :
       
 19815     {
       
 19816         symbol_c *last_type_symbol = NULL;
       
 19817 
       
 19818         {
       
 19819             symbol_c *IN_type_symbol = param_data_type;
       
 19820             last_type_symbol = param_data_type;
       
 19821             
       
 19822             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19823             {
       
 19824         
       
 19825                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 19826                 return return_type_symbol;
       
 19827                 
       
 19828             }
       
 19829             
       
 19830             
       
 19831             ERROR;
       
 19832         }
       
 19833         
       
 19834     }/*function_string_to_dword*/
       
 19835     break;
       
 19836 
       
 19837 /****
       
 19838  *STRING_TO_DT
       
 19839  */
       
 19840     case function_string_to_dt :
       
 19841     {
       
 19842         symbol_c *last_type_symbol = NULL;
       
 19843 
       
 19844         {
       
 19845             symbol_c *IN_type_symbol = param_data_type;
       
 19846             last_type_symbol = param_data_type;
       
 19847             
       
 19848             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19849             {
       
 19850         
       
 19851                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 19852                 return return_type_symbol;
       
 19853                 
       
 19854             }
       
 19855             
       
 19856             
       
 19857             ERROR;
       
 19858         }
       
 19859         
       
 19860     }/*function_string_to_dt*/
       
 19861     break;
       
 19862 
       
 19863 /****
       
 19864  *STRING_TO_TOD
       
 19865  */
       
 19866     case function_string_to_tod :
       
 19867     {
       
 19868         symbol_c *last_type_symbol = NULL;
       
 19869 
       
 19870         {
       
 19871             symbol_c *IN_type_symbol = param_data_type;
       
 19872             last_type_symbol = param_data_type;
       
 19873             
       
 19874             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19875             {
       
 19876         
       
 19877                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 19878                 return return_type_symbol;
       
 19879                 
       
 19880             }
       
 19881             
       
 19882             
       
 19883             ERROR;
       
 19884         }
       
 19885         
       
 19886     }/*function_string_to_tod*/
       
 19887     break;
       
 19888 
       
 19889 /****
       
 19890  *STRING_TO_UDINT
       
 19891  */
       
 19892     case function_string_to_udint :
       
 19893     {
       
 19894         symbol_c *last_type_symbol = NULL;
       
 19895 
       
 19896         {
       
 19897             symbol_c *IN_type_symbol = param_data_type;
       
 19898             last_type_symbol = param_data_type;
       
 19899             
       
 19900             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19901             {
       
 19902         
       
 19903                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19904                 return return_type_symbol;
       
 19905                 
       
 19906             }
       
 19907             
       
 19908             
       
 19909             ERROR;
       
 19910         }
       
 19911         
       
 19912     }/*function_string_to_udint*/
       
 19913     break;
       
 19914 
       
 19915 /****
       
 19916  *STRING_TO_WORD
       
 19917  */
       
 19918     case function_string_to_word :
       
 19919     {
       
 19920         symbol_c *last_type_symbol = NULL;
       
 19921 
       
 19922         {
       
 19923             symbol_c *IN_type_symbol = param_data_type;
       
 19924             last_type_symbol = param_data_type;
       
 19925             
       
 19926             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19927             {
       
 19928         
       
 19929                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 19930                 return return_type_symbol;
       
 19931                 
       
 19932             }
       
 19933             
       
 19934             
       
 19935             ERROR;
       
 19936         }
       
 19937         
       
 19938     }/*function_string_to_word*/
       
 19939     break;
       
 19940 
       
 19941 /****
       
 19942  *STRING_TO_LWORD
       
 19943  */
       
 19944     case function_string_to_lword :
       
 19945     {
       
 19946         symbol_c *last_type_symbol = NULL;
       
 19947 
       
 19948         {
       
 19949             symbol_c *IN_type_symbol = param_data_type;
       
 19950             last_type_symbol = param_data_type;
       
 19951             
       
 19952             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19953             {
       
 19954         
       
 19955                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 19956                 return return_type_symbol;
       
 19957                 
       
 19958             }
       
 19959             
       
 19960             
       
 19961             ERROR;
       
 19962         }
       
 19963         
       
 19964     }/*function_string_to_lword*/
       
 19965     break;
       
 19966 
       
 19967 /****
       
 19968  *STRING_TO_UINT
       
 19969  */
       
 19970     case function_string_to_uint :
       
 19971     {
       
 19972         symbol_c *last_type_symbol = NULL;
       
 19973 
       
 19974         {
       
 19975             symbol_c *IN_type_symbol = param_data_type;
       
 19976             last_type_symbol = param_data_type;
       
 19977             
       
 19978             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 19979             {
       
 19980         
       
 19981                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19982                 return return_type_symbol;
       
 19983                 
       
 19984             }
       
 19985             
       
 19986             
       
 19987             ERROR;
       
 19988         }
       
 19989         
       
 19990     }/*function_string_to_uint*/
       
 19991     break;
       
 19992 
       
 19993 /****
       
 19994  *STRING_TO_LREAL
       
 19995  */
       
 19996     case function_string_to_lreal :
       
 19997     {
       
 19998         symbol_c *last_type_symbol = NULL;
       
 19999 
       
 20000         {
       
 20001             symbol_c *IN_type_symbol = param_data_type;
       
 20002             last_type_symbol = param_data_type;
       
 20003             
       
 20004             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 20005             {
       
 20006         
       
 20007                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20008                 return return_type_symbol;
       
 20009                 
       
 20010             }
       
 20011             
       
 20012             
       
 20013             ERROR;
       
 20014         }
       
 20015         
       
 20016     }/*function_string_to_lreal*/
       
 20017     break;
       
 20018 
       
 20019 /****
       
 20020  *STRING_TO_BYTE
       
 20021  */
       
 20022     case function_string_to_byte :
       
 20023     {
       
 20024         symbol_c *last_type_symbol = NULL;
       
 20025 
       
 20026         {
       
 20027             symbol_c *IN_type_symbol = param_data_type;
       
 20028             last_type_symbol = param_data_type;
       
 20029             
       
 20030             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 20031             {
       
 20032         
       
 20033                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20034                 return return_type_symbol;
       
 20035                 
       
 20036             }
       
 20037             
       
 20038             
       
 20039             ERROR;
       
 20040         }
       
 20041         
       
 20042     }/*function_string_to_byte*/
       
 20043     break;
       
 20044 
       
 20045 /****
       
 20046  *STRING_TO_USINT
       
 20047  */
       
 20048     case function_string_to_usint :
       
 20049     {
       
 20050         symbol_c *last_type_symbol = NULL;
       
 20051 
       
 20052         {
       
 20053             symbol_c *IN_type_symbol = param_data_type;
       
 20054             last_type_symbol = param_data_type;
       
 20055             
       
 20056             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 20057             {
       
 20058         
       
 20059                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20060                 return return_type_symbol;
       
 20061                 
       
 20062             }
       
 20063             
       
 20064             
       
 20065             ERROR;
       
 20066         }
       
 20067         
       
 20068     }/*function_string_to_usint*/
       
 20069     break;
       
 20070 
       
 20071 /****
       
 20072  *STRING_TO_ULINT
       
 20073  */
       
 20074     case function_string_to_ulint :
       
 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::string_type_name, last_type_symbol))
       
 20083             {
       
 20084         
       
 20085                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20086                 return return_type_symbol;
       
 20087                 
       
 20088             }
       
 20089             
       
 20090             
       
 20091             ERROR;
       
 20092         }
       
 20093         
       
 20094     }/*function_string_to_ulint*/
       
 20095     break;
       
 20096 
       
 20097 /****
       
 20098  *STRING_TO_BOOL
       
 20099  */
       
 20100     case function_string_to_bool :
       
 20101     {
       
 20102         symbol_c *last_type_symbol = NULL;
       
 20103 
       
 20104         {
       
 20105             symbol_c *IN_type_symbol = param_data_type;
       
 20106             last_type_symbol = param_data_type;
       
 20107             
       
 20108             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 20109             {
       
 20110         
       
 20111                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 20112                 return return_type_symbol;
       
 20113                 
       
 20114             }
       
 20115             
       
 20116             
       
 20117             ERROR;
       
 20118         }
       
 20119         
       
 20120     }/*function_string_to_bool*/
       
 20121     break;
       
 20122 
       
 20123 /****
       
 20124  *STRING_TO_TIME
       
 20125  */
       
 20126     case function_string_to_time :
       
 20127     {
       
 20128         symbol_c *last_type_symbol = NULL;
       
 20129 
       
 20130         {
       
 20131             symbol_c *IN_type_symbol = param_data_type;
       
 20132             last_type_symbol = param_data_type;
       
 20133             
       
 20134             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 20135             {
       
 20136         
       
 20137                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 20138                 return return_type_symbol;
       
 20139                 
       
 20140             }
       
 20141             
       
 20142             
       
 20143             ERROR;
       
 20144         }
       
 20145         
       
 20146     }/*function_string_to_time*/
       
 20147     break;
       
 20148 
       
 20149 /****
       
 20150  *STRING_TO_INT
       
 20151  */
       
 20152     case function_string_to_int :
       
 20153     {
       
 20154         symbol_c *last_type_symbol = NULL;
       
 20155 
       
 20156         {
       
 20157             symbol_c *IN_type_symbol = param_data_type;
       
 20158             last_type_symbol = param_data_type;
       
 20159             
       
 20160             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 20161             {
       
 20162         
       
 20163                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20164                 return return_type_symbol;
       
 20165                 
       
 20166             }
       
 20167             
       
 20168             
       
 20169             ERROR;
       
 20170         }
       
 20171         
       
 20172     }/*function_string_to_int*/
       
 20173     break;
       
 20174 
       
 20175 /****
       
 20176  *LWORD_TO_REAL
       
 20177  */
       
 20178     case function_lword_to_real :
       
 20179     {
       
 20180         symbol_c *last_type_symbol = NULL;
       
 20181 
       
 20182         {
       
 20183             symbol_c *IN_type_symbol = param_data_type;
       
 20184             last_type_symbol = param_data_type;
       
 20185             
       
 20186             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20187             {
       
 20188         
       
 20189                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20190                 return return_type_symbol;
       
 20191                 
       
 20192             }
       
 20193             
       
 20194             
       
 20195             ERROR;
       
 20196         }
       
 20197         
       
 20198     }/*function_lword_to_real*/
       
 20199     break;
       
 20200 
       
 20201 /****
       
 20202  *LWORD_TO_SINT
       
 20203  */
       
 20204     case function_lword_to_sint :
       
 20205     {
       
 20206         symbol_c *last_type_symbol = NULL;
       
 20207 
       
 20208         {
       
 20209             symbol_c *IN_type_symbol = param_data_type;
       
 20210             last_type_symbol = param_data_type;
       
 20211             
       
 20212             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20213             {
       
 20214         
       
 20215                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20216                 return return_type_symbol;
       
 20217                 
       
 20218             }
       
 20219             
       
 20220             
       
 20221             ERROR;
       
 20222         }
       
 20223         
       
 20224     }/*function_lword_to_sint*/
       
 20225     break;
       
 20226 
       
 20227 /****
       
 20228  *LWORD_TO_LINT
       
 20229  */
       
 20230     case function_lword_to_lint :
       
 20231     {
       
 20232         symbol_c *last_type_symbol = NULL;
       
 20233 
       
 20234         {
       
 20235             symbol_c *IN_type_symbol = param_data_type;
       
 20236             last_type_symbol = param_data_type;
       
 20237             
       
 20238             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20239             {
       
 20240         
       
 20241                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20242                 return return_type_symbol;
       
 20243                 
       
 20244             }
       
 20245             
       
 20246             
       
 20247             ERROR;
       
 20248         }
       
 20249         
       
 20250     }/*function_lword_to_lint*/
       
 20251     break;
       
 20252 
       
 20253 /****
       
 20254  *LWORD_TO_DINT
       
 20255  */
       
 20256     case function_lword_to_dint :
       
 20257     {
       
 20258         symbol_c *last_type_symbol = NULL;
       
 20259 
       
 20260         {
       
 20261             symbol_c *IN_type_symbol = param_data_type;
       
 20262             last_type_symbol = param_data_type;
       
 20263             
       
 20264             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20265             {
       
 20266         
       
 20267                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20268                 return return_type_symbol;
       
 20269                 
       
 20270             }
       
 20271             
       
 20272             
       
 20273             ERROR;
       
 20274         }
       
 20275         
       
 20276     }/*function_lword_to_dint*/
       
 20277     break;
       
 20278 
       
 20279 /****
       
 20280  *LWORD_TO_DATE
       
 20281  */
       
 20282     case function_lword_to_date :
       
 20283     {
       
 20284         symbol_c *last_type_symbol = NULL;
       
 20285 
       
 20286         {
       
 20287             symbol_c *IN_type_symbol = param_data_type;
       
 20288             last_type_symbol = param_data_type;
       
 20289             
       
 20290             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20291             {
       
 20292         
       
 20293                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 20294                 return return_type_symbol;
       
 20295                 
       
 20296             }
       
 20297             
       
 20298             
       
 20299             ERROR;
       
 20300         }
       
 20301         
       
 20302     }/*function_lword_to_date*/
       
 20303     break;
       
 20304 
       
 20305 /****
       
 20306  *LWORD_TO_DWORD
       
 20307  */
       
 20308     case function_lword_to_dword :
       
 20309     {
       
 20310         symbol_c *last_type_symbol = NULL;
       
 20311 
       
 20312         {
       
 20313             symbol_c *IN_type_symbol = param_data_type;
       
 20314             last_type_symbol = param_data_type;
       
 20315             
       
 20316             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20317             {
       
 20318         
       
 20319                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20320                 return return_type_symbol;
       
 20321                 
       
 20322             }
       
 20323             
       
 20324             
       
 20325             ERROR;
       
 20326         }
       
 20327         
       
 20328     }/*function_lword_to_dword*/
       
 20329     break;
       
 20330 
       
 20331 /****
       
 20332  *LWORD_TO_DT
       
 20333  */
       
 20334     case function_lword_to_dt :
       
 20335     {
       
 20336         symbol_c *last_type_symbol = NULL;
       
 20337 
       
 20338         {
       
 20339             symbol_c *IN_type_symbol = param_data_type;
       
 20340             last_type_symbol = param_data_type;
       
 20341             
       
 20342             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20343             {
       
 20344         
       
 20345                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 20346                 return return_type_symbol;
       
 20347                 
       
 20348             }
       
 20349             
       
 20350             
       
 20351             ERROR;
       
 20352         }
       
 20353         
       
 20354     }/*function_lword_to_dt*/
       
 20355     break;
       
 20356 
       
 20357 /****
       
 20358  *LWORD_TO_TOD
       
 20359  */
       
 20360     case function_lword_to_tod :
       
 20361     {
       
 20362         symbol_c *last_type_symbol = NULL;
       
 20363 
       
 20364         {
       
 20365             symbol_c *IN_type_symbol = param_data_type;
       
 20366             last_type_symbol = param_data_type;
       
 20367             
       
 20368             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20369             {
       
 20370         
       
 20371                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 20372                 return return_type_symbol;
       
 20373                 
       
 20374             }
       
 20375             
       
 20376             
       
 20377             ERROR;
       
 20378         }
       
 20379         
       
 20380     }/*function_lword_to_tod*/
       
 20381     break;
       
 20382 
       
 20383 /****
       
 20384  *LWORD_TO_UDINT
       
 20385  */
       
 20386     case function_lword_to_udint :
       
 20387     {
       
 20388         symbol_c *last_type_symbol = NULL;
       
 20389 
       
 20390         {
       
 20391             symbol_c *IN_type_symbol = param_data_type;
       
 20392             last_type_symbol = param_data_type;
       
 20393             
       
 20394             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20395             {
       
 20396         
       
 20397                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20398                 return return_type_symbol;
       
 20399                 
       
 20400             }
       
 20401             
       
 20402             
       
 20403             ERROR;
       
 20404         }
       
 20405         
       
 20406     }/*function_lword_to_udint*/
       
 20407     break;
       
 20408 
       
 20409 /****
       
 20410  *LWORD_TO_WORD
       
 20411  */
       
 20412     case function_lword_to_word :
       
 20413     {
       
 20414         symbol_c *last_type_symbol = NULL;
       
 20415 
       
 20416         {
       
 20417             symbol_c *IN_type_symbol = param_data_type;
       
 20418             last_type_symbol = param_data_type;
       
 20419             
       
 20420             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20421             {
       
 20422         
       
 20423                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20424                 return return_type_symbol;
       
 20425                 
       
 20426             }
       
 20427             
       
 20428             
       
 20429             ERROR;
       
 20430         }
       
 20431         
       
 20432     }/*function_lword_to_word*/
       
 20433     break;
       
 20434 
       
 20435 /****
       
 20436  *LWORD_TO_STRING
       
 20437  */
       
 20438     case function_lword_to_string :
       
 20439     {
       
 20440         symbol_c *last_type_symbol = NULL;
       
 20441 
       
 20442         {
       
 20443             symbol_c *IN_type_symbol = param_data_type;
       
 20444             last_type_symbol = param_data_type;
       
 20445             
       
 20446             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20447             {
       
 20448         
       
 20449                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20450                 return return_type_symbol;
       
 20451                 
       
 20452             }
       
 20453             
       
 20454             
       
 20455             ERROR;
       
 20456         }
       
 20457         
       
 20458     }/*function_lword_to_string*/
       
 20459     break;
       
 20460 
       
 20461 /****
       
 20462  *LWORD_TO_UINT
       
 20463  */
       
 20464     case function_lword_to_uint :
       
 20465     {
       
 20466         symbol_c *last_type_symbol = NULL;
       
 20467 
       
 20468         {
       
 20469             symbol_c *IN_type_symbol = param_data_type;
       
 20470             last_type_symbol = param_data_type;
       
 20471             
       
 20472             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20473             {
       
 20474         
       
 20475                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20476                 return return_type_symbol;
       
 20477                 
       
 20478             }
       
 20479             
       
 20480             
       
 20481             ERROR;
       
 20482         }
       
 20483         
       
 20484     }/*function_lword_to_uint*/
       
 20485     break;
       
 20486 
       
 20487 /****
       
 20488  *LWORD_TO_LREAL
       
 20489  */
       
 20490     case function_lword_to_lreal :
       
 20491     {
       
 20492         symbol_c *last_type_symbol = NULL;
       
 20493 
       
 20494         {
       
 20495             symbol_c *IN_type_symbol = param_data_type;
       
 20496             last_type_symbol = param_data_type;
       
 20497             
       
 20498             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20499             {
       
 20500         
       
 20501                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20502                 return return_type_symbol;
       
 20503                 
       
 20504             }
       
 20505             
       
 20506             
       
 20507             ERROR;
       
 20508         }
       
 20509         
       
 20510     }/*function_lword_to_lreal*/
       
 20511     break;
       
 20512 
       
 20513 /****
       
 20514  *LWORD_TO_BYTE
       
 20515  */
       
 20516     case function_lword_to_byte :
       
 20517     {
       
 20518         symbol_c *last_type_symbol = NULL;
       
 20519 
       
 20520         {
       
 20521             symbol_c *IN_type_symbol = param_data_type;
       
 20522             last_type_symbol = param_data_type;
       
 20523             
       
 20524             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20525             {
       
 20526         
       
 20527                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20528                 return return_type_symbol;
       
 20529                 
       
 20530             }
       
 20531             
       
 20532             
       
 20533             ERROR;
       
 20534         }
       
 20535         
       
 20536     }/*function_lword_to_byte*/
       
 20537     break;
       
 20538 
       
 20539 /****
       
 20540  *LWORD_TO_USINT
       
 20541  */
       
 20542     case function_lword_to_usint :
       
 20543     {
       
 20544         symbol_c *last_type_symbol = NULL;
       
 20545 
       
 20546         {
       
 20547             symbol_c *IN_type_symbol = param_data_type;
       
 20548             last_type_symbol = param_data_type;
       
 20549             
       
 20550             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20551             {
       
 20552         
       
 20553                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20554                 return return_type_symbol;
       
 20555                 
       
 20556             }
       
 20557             
       
 20558             
       
 20559             ERROR;
       
 20560         }
       
 20561         
       
 20562     }/*function_lword_to_usint*/
       
 20563     break;
       
 20564 
       
 20565 /****
       
 20566  *LWORD_TO_ULINT
       
 20567  */
       
 20568     case function_lword_to_ulint :
       
 20569     {
       
 20570         symbol_c *last_type_symbol = NULL;
       
 20571 
       
 20572         {
       
 20573             symbol_c *IN_type_symbol = param_data_type;
       
 20574             last_type_symbol = param_data_type;
       
 20575             
       
 20576             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20577             {
       
 20578         
       
 20579                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20580                 return return_type_symbol;
       
 20581                 
       
 20582             }
       
 20583             
       
 20584             
       
 20585             ERROR;
       
 20586         }
       
 20587         
       
 20588     }/*function_lword_to_ulint*/
       
 20589     break;
       
 20590 
       
 20591 /****
       
 20592  *LWORD_TO_BOOL
       
 20593  */
       
 20594     case function_lword_to_bool :
       
 20595     {
       
 20596         symbol_c *last_type_symbol = NULL;
       
 20597 
       
 20598         {
       
 20599             symbol_c *IN_type_symbol = param_data_type;
       
 20600             last_type_symbol = param_data_type;
       
 20601             
       
 20602             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20603             {
       
 20604         
       
 20605                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 20606                 return return_type_symbol;
       
 20607                 
       
 20608             }
       
 20609             
       
 20610             
       
 20611             ERROR;
       
 20612         }
       
 20613         
       
 20614     }/*function_lword_to_bool*/
       
 20615     break;
       
 20616 
       
 20617 /****
       
 20618  *LWORD_TO_TIME
       
 20619  */
       
 20620     case function_lword_to_time :
       
 20621     {
       
 20622         symbol_c *last_type_symbol = NULL;
       
 20623 
       
 20624         {
       
 20625             symbol_c *IN_type_symbol = param_data_type;
       
 20626             last_type_symbol = param_data_type;
       
 20627             
       
 20628             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20629             {
       
 20630         
       
 20631                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 20632                 return return_type_symbol;
       
 20633                 
       
 20634             }
       
 20635             
       
 20636             
       
 20637             ERROR;
       
 20638         }
       
 20639         
       
 20640     }/*function_lword_to_time*/
       
 20641     break;
       
 20642 
       
 20643 /****
       
 20644  *LWORD_TO_INT
       
 20645  */
       
 20646     case function_lword_to_int :
       
 20647     {
       
 20648         symbol_c *last_type_symbol = NULL;
       
 20649 
       
 20650         {
       
 20651             symbol_c *IN_type_symbol = param_data_type;
       
 20652             last_type_symbol = param_data_type;
       
 20653             
       
 20654             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 20655             {
       
 20656         
       
 20657                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20658                 return return_type_symbol;
       
 20659                 
       
 20660             }
       
 20661             
       
 20662             
       
 20663             ERROR;
       
 20664         }
       
 20665         
       
 20666     }/*function_lword_to_int*/
       
 20667     break;
       
 20668 
       
 20669 /****
       
 20670  *UINT_TO_REAL
       
 20671  */
       
 20672     case function_uint_to_real :
       
 20673     {
       
 20674         symbol_c *last_type_symbol = NULL;
       
 20675 
       
 20676         {
       
 20677             symbol_c *IN_type_symbol = param_data_type;
       
 20678             last_type_symbol = param_data_type;
       
 20679             
       
 20680             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20681             {
       
 20682         
       
 20683                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20684                 return return_type_symbol;
       
 20685                 
       
 20686             }
       
 20687             
       
 20688             
       
 20689             ERROR;
       
 20690         }
       
 20691         
       
 20692     }/*function_uint_to_real*/
       
 20693     break;
       
 20694 
       
 20695 /****
       
 20696  *UINT_TO_SINT
       
 20697  */
       
 20698     case function_uint_to_sint :
       
 20699     {
       
 20700         symbol_c *last_type_symbol = NULL;
       
 20701 
       
 20702         {
       
 20703             symbol_c *IN_type_symbol = param_data_type;
       
 20704             last_type_symbol = param_data_type;
       
 20705             
       
 20706             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20707             {
       
 20708         
       
 20709                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20710                 return return_type_symbol;
       
 20711                 
       
 20712             }
       
 20713             
       
 20714             
       
 20715             ERROR;
       
 20716         }
       
 20717         
       
 20718     }/*function_uint_to_sint*/
       
 20719     break;
       
 20720 
       
 20721 /****
       
 20722  *UINT_TO_LINT
       
 20723  */
       
 20724     case function_uint_to_lint :
       
 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::uint_type_name, last_type_symbol))
       
 20733             {
       
 20734         
       
 20735                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20736                 return return_type_symbol;
       
 20737                 
       
 20738             }
       
 20739             
       
 20740             
       
 20741             ERROR;
       
 20742         }
       
 20743         
       
 20744     }/*function_uint_to_lint*/
       
 20745     break;
       
 20746 
       
 20747 /****
       
 20748  *UINT_TO_DINT
       
 20749  */
       
 20750     case function_uint_to_dint :
       
 20751     {
       
 20752         symbol_c *last_type_symbol = NULL;
       
 20753 
       
 20754         {
       
 20755             symbol_c *IN_type_symbol = param_data_type;
       
 20756             last_type_symbol = param_data_type;
       
 20757             
       
 20758             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20759             {
       
 20760         
       
 20761                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20762                 return return_type_symbol;
       
 20763                 
       
 20764             }
       
 20765             
       
 20766             
       
 20767             ERROR;
       
 20768         }
       
 20769         
       
 20770     }/*function_uint_to_dint*/
       
 20771     break;
       
 20772 
       
 20773 /****
       
 20774  *UINT_TO_DATE
       
 20775  */
       
 20776     case function_uint_to_date :
       
 20777     {
       
 20778         symbol_c *last_type_symbol = NULL;
       
 20779 
       
 20780         {
       
 20781             symbol_c *IN_type_symbol = param_data_type;
       
 20782             last_type_symbol = param_data_type;
       
 20783             
       
 20784             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20785             {
       
 20786         
       
 20787                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 20788                 return return_type_symbol;
       
 20789                 
       
 20790             }
       
 20791             
       
 20792             
       
 20793             ERROR;
       
 20794         }
       
 20795         
       
 20796     }/*function_uint_to_date*/
       
 20797     break;
       
 20798 
       
 20799 /****
       
 20800  *UINT_TO_DWORD
       
 20801  */
       
 20802     case function_uint_to_dword :
       
 20803     {
       
 20804         symbol_c *last_type_symbol = NULL;
       
 20805 
       
 20806         {
       
 20807             symbol_c *IN_type_symbol = param_data_type;
       
 20808             last_type_symbol = param_data_type;
       
 20809             
       
 20810             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20811             {
       
 20812         
       
 20813                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20814                 return return_type_symbol;
       
 20815                 
       
 20816             }
       
 20817             
       
 20818             
       
 20819             ERROR;
       
 20820         }
       
 20821         
       
 20822     }/*function_uint_to_dword*/
       
 20823     break;
       
 20824 
       
 20825 /****
       
 20826  *UINT_TO_DT
       
 20827  */
       
 20828     case function_uint_to_dt :
       
 20829     {
       
 20830         symbol_c *last_type_symbol = NULL;
       
 20831 
       
 20832         {
       
 20833             symbol_c *IN_type_symbol = param_data_type;
       
 20834             last_type_symbol = param_data_type;
       
 20835             
       
 20836             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20837             {
       
 20838         
       
 20839                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 20840                 return return_type_symbol;
       
 20841                 
       
 20842             }
       
 20843             
       
 20844             
       
 20845             ERROR;
       
 20846         }
       
 20847         
       
 20848     }/*function_uint_to_dt*/
       
 20849     break;
       
 20850 
       
 20851 /****
       
 20852  *UINT_TO_TOD
       
 20853  */
       
 20854     case function_uint_to_tod :
       
 20855     {
       
 20856         symbol_c *last_type_symbol = NULL;
       
 20857 
       
 20858         {
       
 20859             symbol_c *IN_type_symbol = param_data_type;
       
 20860             last_type_symbol = param_data_type;
       
 20861             
       
 20862             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20863             {
       
 20864         
       
 20865                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 20866                 return return_type_symbol;
       
 20867                 
       
 20868             }
       
 20869             
       
 20870             
       
 20871             ERROR;
       
 20872         }
       
 20873         
       
 20874     }/*function_uint_to_tod*/
       
 20875     break;
       
 20876 
       
 20877 /****
       
 20878  *UINT_TO_UDINT
       
 20879  */
       
 20880     case function_uint_to_udint :
       
 20881     {
       
 20882         symbol_c *last_type_symbol = NULL;
       
 20883 
       
 20884         {
       
 20885             symbol_c *IN_type_symbol = param_data_type;
       
 20886             last_type_symbol = param_data_type;
       
 20887             
       
 20888             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20889             {
       
 20890         
       
 20891                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20892                 return return_type_symbol;
       
 20893                 
       
 20894             }
       
 20895             
       
 20896             
       
 20897             ERROR;
       
 20898         }
       
 20899         
       
 20900     }/*function_uint_to_udint*/
       
 20901     break;
       
 20902 
       
 20903 /****
       
 20904  *UINT_TO_WORD
       
 20905  */
       
 20906     case function_uint_to_word :
       
 20907     {
       
 20908         symbol_c *last_type_symbol = NULL;
       
 20909 
       
 20910         {
       
 20911             symbol_c *IN_type_symbol = param_data_type;
       
 20912             last_type_symbol = param_data_type;
       
 20913             
       
 20914             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20915             {
       
 20916         
       
 20917                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20918                 return return_type_symbol;
       
 20919                 
       
 20920             }
       
 20921             
       
 20922             
       
 20923             ERROR;
       
 20924         }
       
 20925         
       
 20926     }/*function_uint_to_word*/
       
 20927     break;
       
 20928 
       
 20929 /****
       
 20930  *UINT_TO_STRING
       
 20931  */
       
 20932     case function_uint_to_string :
       
 20933     {
       
 20934         symbol_c *last_type_symbol = NULL;
       
 20935 
       
 20936         {
       
 20937             symbol_c *IN_type_symbol = param_data_type;
       
 20938             last_type_symbol = param_data_type;
       
 20939             
       
 20940             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20941             {
       
 20942         
       
 20943                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20944                 return return_type_symbol;
       
 20945                 
       
 20946             }
       
 20947             
       
 20948             
       
 20949             ERROR;
       
 20950         }
       
 20951         
       
 20952     }/*function_uint_to_string*/
       
 20953     break;
       
 20954 
       
 20955 /****
       
 20956  *UINT_TO_LWORD
       
 20957  */
       
 20958     case function_uint_to_lword :
       
 20959     {
       
 20960         symbol_c *last_type_symbol = NULL;
       
 20961 
       
 20962         {
       
 20963             symbol_c *IN_type_symbol = param_data_type;
       
 20964             last_type_symbol = param_data_type;
       
 20965             
       
 20966             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20967             {
       
 20968         
       
 20969                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20970                 return return_type_symbol;
       
 20971                 
       
 20972             }
       
 20973             
       
 20974             
       
 20975             ERROR;
       
 20976         }
       
 20977         
       
 20978     }/*function_uint_to_lword*/
       
 20979     break;
       
 20980 
       
 20981 /****
       
 20982  *UINT_TO_LREAL
       
 20983  */
       
 20984     case function_uint_to_lreal :
       
 20985     {
       
 20986         symbol_c *last_type_symbol = NULL;
       
 20987 
       
 20988         {
       
 20989             symbol_c *IN_type_symbol = param_data_type;
       
 20990             last_type_symbol = param_data_type;
       
 20991             
       
 20992             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 20993             {
       
 20994         
       
 20995                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20996                 return return_type_symbol;
       
 20997                 
       
 20998             }
       
 20999             
       
 21000             
       
 21001             ERROR;
       
 21002         }
       
 21003         
       
 21004     }/*function_uint_to_lreal*/
       
 21005     break;
       
 21006 
       
 21007 /****
       
 21008  *UINT_TO_BYTE
       
 21009  */
       
 21010     case function_uint_to_byte :
       
 21011     {
       
 21012         symbol_c *last_type_symbol = NULL;
       
 21013 
       
 21014         {
       
 21015             symbol_c *IN_type_symbol = param_data_type;
       
 21016             last_type_symbol = param_data_type;
       
 21017             
       
 21018             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 21019             {
       
 21020         
       
 21021                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21022                 return return_type_symbol;
       
 21023                 
       
 21024             }
       
 21025             
       
 21026             
       
 21027             ERROR;
       
 21028         }
       
 21029         
       
 21030     }/*function_uint_to_byte*/
       
 21031     break;
       
 21032 
       
 21033 /****
       
 21034  *UINT_TO_USINT
       
 21035  */
       
 21036     case function_uint_to_usint :
       
 21037     {
       
 21038         symbol_c *last_type_symbol = NULL;
       
 21039 
       
 21040         {
       
 21041             symbol_c *IN_type_symbol = param_data_type;
       
 21042             last_type_symbol = param_data_type;
       
 21043             
       
 21044             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 21045             {
       
 21046         
       
 21047                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21048                 return return_type_symbol;
       
 21049                 
       
 21050             }
       
 21051             
       
 21052             
       
 21053             ERROR;
       
 21054         }
       
 21055         
       
 21056     }/*function_uint_to_usint*/
       
 21057     break;
       
 21058 
       
 21059 /****
       
 21060  *UINT_TO_ULINT
       
 21061  */
       
 21062     case function_uint_to_ulint :
       
 21063     {
       
 21064         symbol_c *last_type_symbol = NULL;
       
 21065 
       
 21066         {
       
 21067             symbol_c *IN_type_symbol = param_data_type;
       
 21068             last_type_symbol = param_data_type;
       
 21069             
       
 21070             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 21071             {
       
 21072         
       
 21073                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21074                 return return_type_symbol;
       
 21075                 
       
 21076             }
       
 21077             
       
 21078             
       
 21079             ERROR;
       
 21080         }
       
 21081         
       
 21082     }/*function_uint_to_ulint*/
       
 21083     break;
       
 21084 
       
 21085 /****
       
 21086  *UINT_TO_BOOL
       
 21087  */
       
 21088     case function_uint_to_bool :
       
 21089     {
       
 21090         symbol_c *last_type_symbol = NULL;
       
 21091 
       
 21092         {
       
 21093             symbol_c *IN_type_symbol = param_data_type;
       
 21094             last_type_symbol = param_data_type;
       
 21095             
       
 21096             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 21097             {
       
 21098         
       
 21099                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21100                 return return_type_symbol;
       
 21101                 
       
 21102             }
       
 21103             
       
 21104             
       
 21105             ERROR;
       
 21106         }
       
 21107         
       
 21108     }/*function_uint_to_bool*/
       
 21109     break;
       
 21110 
       
 21111 /****
       
 21112  *UINT_TO_TIME
       
 21113  */
       
 21114     case function_uint_to_time :
       
 21115     {
       
 21116         symbol_c *last_type_symbol = NULL;
       
 21117 
       
 21118         {
       
 21119             symbol_c *IN_type_symbol = param_data_type;
       
 21120             last_type_symbol = param_data_type;
       
 21121             
       
 21122             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 21123             {
       
 21124         
       
 21125                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21126                 return return_type_symbol;
       
 21127                 
       
 21128             }
       
 21129             
       
 21130             
       
 21131             ERROR;
       
 21132         }
       
 21133         
       
 21134     }/*function_uint_to_time*/
       
 21135     break;
       
 21136 
       
 21137 /****
       
 21138  *UINT_TO_INT
       
 21139  */
       
 21140     case function_uint_to_int :
       
 21141     {
       
 21142         symbol_c *last_type_symbol = NULL;
       
 21143 
       
 21144         {
       
 21145             symbol_c *IN_type_symbol = param_data_type;
       
 21146             last_type_symbol = param_data_type;
       
 21147             
       
 21148             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
       
 21149             {
       
 21150         
       
 21151                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21152                 return return_type_symbol;
       
 21153                 
       
 21154             }
       
 21155             
       
 21156             
       
 21157             ERROR;
       
 21158         }
       
 21159         
       
 21160     }/*function_uint_to_int*/
       
 21161     break;
       
 21162 
       
 21163 /****
       
 21164  *LREAL_TO_REAL
       
 21165  */
       
 21166     case function_lreal_to_real :
       
 21167     {
       
 21168         symbol_c *last_type_symbol = NULL;
       
 21169 
       
 21170         {
       
 21171             symbol_c *IN_type_symbol = param_data_type;
       
 21172             last_type_symbol = param_data_type;
       
 21173             
       
 21174             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21175             {
       
 21176         
       
 21177                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21178                 return return_type_symbol;
       
 21179                 
       
 21180             }
       
 21181             
       
 21182             
       
 21183             ERROR;
       
 21184         }
       
 21185         
       
 21186     }/*function_lreal_to_real*/
       
 21187     break;
       
 21188 
       
 21189 /****
       
 21190  *LREAL_TO_SINT
       
 21191  */
       
 21192     case function_lreal_to_sint :
       
 21193     {
       
 21194         symbol_c *last_type_symbol = NULL;
       
 21195 
       
 21196         {
       
 21197             symbol_c *IN_type_symbol = param_data_type;
       
 21198             last_type_symbol = param_data_type;
       
 21199             
       
 21200             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21201             {
       
 21202         
       
 21203                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21204                 return return_type_symbol;
       
 21205                 
       
 21206             }
       
 21207             
       
 21208             
       
 21209             ERROR;
       
 21210         }
       
 21211         
       
 21212     }/*function_lreal_to_sint*/
       
 21213     break;
       
 21214 
       
 21215 /****
       
 21216  *LREAL_TO_LINT
       
 21217  */
       
 21218     case function_lreal_to_lint :
       
 21219     {
       
 21220         symbol_c *last_type_symbol = NULL;
       
 21221 
       
 21222         {
       
 21223             symbol_c *IN_type_symbol = param_data_type;
       
 21224             last_type_symbol = param_data_type;
       
 21225             
       
 21226             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21227             {
       
 21228         
       
 21229                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21230                 return return_type_symbol;
       
 21231                 
       
 21232             }
       
 21233             
       
 21234             
       
 21235             ERROR;
       
 21236         }
       
 21237         
       
 21238     }/*function_lreal_to_lint*/
       
 21239     break;
       
 21240 
       
 21241 /****
       
 21242  *LREAL_TO_DINT
       
 21243  */
       
 21244     case function_lreal_to_dint :
       
 21245     {
       
 21246         symbol_c *last_type_symbol = NULL;
       
 21247 
       
 21248         {
       
 21249             symbol_c *IN_type_symbol = param_data_type;
       
 21250             last_type_symbol = param_data_type;
       
 21251             
       
 21252             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21253             {
       
 21254         
       
 21255                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21256                 return return_type_symbol;
       
 21257                 
       
 21258             }
       
 21259             
       
 21260             
       
 21261             ERROR;
       
 21262         }
       
 21263         
       
 21264     }/*function_lreal_to_dint*/
       
 21265     break;
       
 21266 
       
 21267 /****
       
 21268  *LREAL_TO_DATE
       
 21269  */
       
 21270     case function_lreal_to_date :
       
 21271     {
       
 21272         symbol_c *last_type_symbol = NULL;
       
 21273 
       
 21274         {
       
 21275             symbol_c *IN_type_symbol = param_data_type;
       
 21276             last_type_symbol = param_data_type;
       
 21277             
       
 21278             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21279             {
       
 21280         
       
 21281                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21282                 return return_type_symbol;
       
 21283                 
       
 21284             }
       
 21285             
       
 21286             
       
 21287             ERROR;
       
 21288         }
       
 21289         
       
 21290     }/*function_lreal_to_date*/
       
 21291     break;
       
 21292 
       
 21293 /****
       
 21294  *LREAL_TO_DWORD
       
 21295  */
       
 21296     case function_lreal_to_dword :
       
 21297     {
       
 21298         symbol_c *last_type_symbol = NULL;
       
 21299 
       
 21300         {
       
 21301             symbol_c *IN_type_symbol = param_data_type;
       
 21302             last_type_symbol = param_data_type;
       
 21303             
       
 21304             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21305             {
       
 21306         
       
 21307                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21308                 return return_type_symbol;
       
 21309                 
       
 21310             }
       
 21311             
       
 21312             
       
 21313             ERROR;
       
 21314         }
       
 21315         
       
 21316     }/*function_lreal_to_dword*/
       
 21317     break;
       
 21318 
       
 21319 /****
       
 21320  *LREAL_TO_DT
       
 21321  */
       
 21322     case function_lreal_to_dt :
       
 21323     {
       
 21324         symbol_c *last_type_symbol = NULL;
       
 21325 
       
 21326         {
       
 21327             symbol_c *IN_type_symbol = param_data_type;
       
 21328             last_type_symbol = param_data_type;
       
 21329             
       
 21330             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21331             {
       
 21332         
       
 21333                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21334                 return return_type_symbol;
       
 21335                 
       
 21336             }
       
 21337             
       
 21338             
       
 21339             ERROR;
       
 21340         }
       
 21341         
       
 21342     }/*function_lreal_to_dt*/
       
 21343     break;
       
 21344 
       
 21345 /****
       
 21346  *LREAL_TO_TOD
       
 21347  */
       
 21348     case function_lreal_to_tod :
       
 21349     {
       
 21350         symbol_c *last_type_symbol = NULL;
       
 21351 
       
 21352         {
       
 21353             symbol_c *IN_type_symbol = param_data_type;
       
 21354             last_type_symbol = param_data_type;
       
 21355             
       
 21356             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21357             {
       
 21358         
       
 21359                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21360                 return return_type_symbol;
       
 21361                 
       
 21362             }
       
 21363             
       
 21364             
       
 21365             ERROR;
       
 21366         }
       
 21367         
       
 21368     }/*function_lreal_to_tod*/
       
 21369     break;
       
 21370 
       
 21371 /****
       
 21372  *LREAL_TO_UDINT
       
 21373  */
       
 21374     case function_lreal_to_udint :
       
 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::lreal_type_name, last_type_symbol))
       
 21383             {
       
 21384         
       
 21385                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21386                 return return_type_symbol;
       
 21387                 
       
 21388             }
       
 21389             
       
 21390             
       
 21391             ERROR;
       
 21392         }
       
 21393         
       
 21394     }/*function_lreal_to_udint*/
       
 21395     break;
       
 21396 
       
 21397 /****
       
 21398  *LREAL_TO_WORD
       
 21399  */
       
 21400     case function_lreal_to_word :
       
 21401     {
       
 21402         symbol_c *last_type_symbol = NULL;
       
 21403 
       
 21404         {
       
 21405             symbol_c *IN_type_symbol = param_data_type;
       
 21406             last_type_symbol = param_data_type;
       
 21407             
       
 21408             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21409             {
       
 21410         
       
 21411                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21412                 return return_type_symbol;
       
 21413                 
       
 21414             }
       
 21415             
       
 21416             
       
 21417             ERROR;
       
 21418         }
       
 21419         
       
 21420     }/*function_lreal_to_word*/
       
 21421     break;
       
 21422 
       
 21423 /****
       
 21424  *LREAL_TO_STRING
       
 21425  */
       
 21426     case function_lreal_to_string :
       
 21427     {
       
 21428         symbol_c *last_type_symbol = NULL;
       
 21429 
       
 21430         {
       
 21431             symbol_c *IN_type_symbol = param_data_type;
       
 21432             last_type_symbol = param_data_type;
       
 21433             
       
 21434             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21435             {
       
 21436         
       
 21437                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21438                 return return_type_symbol;
       
 21439                 
       
 21440             }
       
 21441             
       
 21442             
       
 21443             ERROR;
       
 21444         }
       
 21445         
       
 21446     }/*function_lreal_to_string*/
       
 21447     break;
       
 21448 
       
 21449 /****
       
 21450  *LREAL_TO_LWORD
       
 21451  */
       
 21452     case function_lreal_to_lword :
       
 21453     {
       
 21454         symbol_c *last_type_symbol = NULL;
       
 21455 
       
 21456         {
       
 21457             symbol_c *IN_type_symbol = param_data_type;
       
 21458             last_type_symbol = param_data_type;
       
 21459             
       
 21460             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21461             {
       
 21462         
       
 21463                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21464                 return return_type_symbol;
       
 21465                 
       
 21466             }
       
 21467             
       
 21468             
       
 21469             ERROR;
       
 21470         }
       
 21471         
       
 21472     }/*function_lreal_to_lword*/
       
 21473     break;
       
 21474 
       
 21475 /****
       
 21476  *LREAL_TO_UINT
       
 21477  */
       
 21478     case function_lreal_to_uint :
       
 21479     {
       
 21480         symbol_c *last_type_symbol = NULL;
       
 21481 
       
 21482         {
       
 21483             symbol_c *IN_type_symbol = param_data_type;
       
 21484             last_type_symbol = param_data_type;
       
 21485             
       
 21486             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21487             {
       
 21488         
       
 21489                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21490                 return return_type_symbol;
       
 21491                 
       
 21492             }
       
 21493             
       
 21494             
       
 21495             ERROR;
       
 21496         }
       
 21497         
       
 21498     }/*function_lreal_to_uint*/
       
 21499     break;
       
 21500 
       
 21501 /****
       
 21502  *LREAL_TO_BYTE
       
 21503  */
       
 21504     case function_lreal_to_byte :
       
 21505     {
       
 21506         symbol_c *last_type_symbol = NULL;
       
 21507 
       
 21508         {
       
 21509             symbol_c *IN_type_symbol = param_data_type;
       
 21510             last_type_symbol = param_data_type;
       
 21511             
       
 21512             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21513             {
       
 21514         
       
 21515                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21516                 return return_type_symbol;
       
 21517                 
       
 21518             }
       
 21519             
       
 21520             
       
 21521             ERROR;
       
 21522         }
       
 21523         
       
 21524     }/*function_lreal_to_byte*/
       
 21525     break;
       
 21526 
       
 21527 /****
       
 21528  *LREAL_TO_USINT
       
 21529  */
       
 21530     case function_lreal_to_usint :
       
 21531     {
       
 21532         symbol_c *last_type_symbol = NULL;
       
 21533 
       
 21534         {
       
 21535             symbol_c *IN_type_symbol = param_data_type;
       
 21536             last_type_symbol = param_data_type;
       
 21537             
       
 21538             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21539             {
       
 21540         
       
 21541                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21542                 return return_type_symbol;
       
 21543                 
       
 21544             }
       
 21545             
       
 21546             
       
 21547             ERROR;
       
 21548         }
       
 21549         
       
 21550     }/*function_lreal_to_usint*/
       
 21551     break;
       
 21552 
       
 21553 /****
       
 21554  *LREAL_TO_ULINT
       
 21555  */
       
 21556     case function_lreal_to_ulint :
       
 21557     {
       
 21558         symbol_c *last_type_symbol = NULL;
       
 21559 
       
 21560         {
       
 21561             symbol_c *IN_type_symbol = param_data_type;
       
 21562             last_type_symbol = param_data_type;
       
 21563             
       
 21564             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21565             {
       
 21566         
       
 21567                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21568                 return return_type_symbol;
       
 21569                 
       
 21570             }
       
 21571             
       
 21572             
       
 21573             ERROR;
       
 21574         }
       
 21575         
       
 21576     }/*function_lreal_to_ulint*/
       
 21577     break;
       
 21578 
       
 21579 /****
       
 21580  *LREAL_TO_BOOL
       
 21581  */
       
 21582     case function_lreal_to_bool :
       
 21583     {
       
 21584         symbol_c *last_type_symbol = NULL;
       
 21585 
       
 21586         {
       
 21587             symbol_c *IN_type_symbol = param_data_type;
       
 21588             last_type_symbol = param_data_type;
       
 21589             
       
 21590             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21591             {
       
 21592         
       
 21593                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21594                 return return_type_symbol;
       
 21595                 
       
 21596             }
       
 21597             
       
 21598             
       
 21599             ERROR;
       
 21600         }
       
 21601         
       
 21602     }/*function_lreal_to_bool*/
       
 21603     break;
       
 21604 
       
 21605 /****
       
 21606  *LREAL_TO_TIME
       
 21607  */
       
 21608     case function_lreal_to_time :
       
 21609     {
       
 21610         symbol_c *last_type_symbol = NULL;
       
 21611 
       
 21612         {
       
 21613             symbol_c *IN_type_symbol = param_data_type;
       
 21614             last_type_symbol = param_data_type;
       
 21615             
       
 21616             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21617             {
       
 21618         
       
 21619                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21620                 return return_type_symbol;
       
 21621                 
       
 21622             }
       
 21623             
       
 21624             
       
 21625             ERROR;
       
 21626         }
       
 21627         
       
 21628     }/*function_lreal_to_time*/
       
 21629     break;
       
 21630 
       
 21631 /****
       
 21632  *LREAL_TO_INT
       
 21633  */
       
 21634     case function_lreal_to_int :
       
 21635     {
       
 21636         symbol_c *last_type_symbol = NULL;
       
 21637 
       
 21638         {
       
 21639             symbol_c *IN_type_symbol = param_data_type;
       
 21640             last_type_symbol = param_data_type;
       
 21641             
       
 21642             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
       
 21643             {
       
 21644         
       
 21645                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21646                 return return_type_symbol;
       
 21647                 
       
 21648             }
       
 21649             
       
 21650             
       
 21651             ERROR;
       
 21652         }
       
 21653         
       
 21654     }/*function_lreal_to_int*/
       
 21655     break;
       
 21656 
       
 21657 /****
       
 21658  *BYTE_TO_REAL
       
 21659  */
       
 21660     case function_byte_to_real :
       
 21661     {
       
 21662         symbol_c *last_type_symbol = NULL;
       
 21663 
       
 21664         {
       
 21665             symbol_c *IN_type_symbol = param_data_type;
       
 21666             last_type_symbol = param_data_type;
       
 21667             
       
 21668             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21669             {
       
 21670         
       
 21671                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21672                 return return_type_symbol;
       
 21673                 
       
 21674             }
       
 21675             
       
 21676             
       
 21677             ERROR;
       
 21678         }
       
 21679         
       
 21680     }/*function_byte_to_real*/
       
 21681     break;
       
 21682 
       
 21683 /****
       
 21684  *BYTE_TO_SINT
       
 21685  */
       
 21686     case function_byte_to_sint :
       
 21687     {
       
 21688         symbol_c *last_type_symbol = NULL;
       
 21689 
       
 21690         {
       
 21691             symbol_c *IN_type_symbol = param_data_type;
       
 21692             last_type_symbol = param_data_type;
       
 21693             
       
 21694             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21695             {
       
 21696         
       
 21697                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21698                 return return_type_symbol;
       
 21699                 
       
 21700             }
       
 21701             
       
 21702             
       
 21703             ERROR;
       
 21704         }
       
 21705         
       
 21706     }/*function_byte_to_sint*/
       
 21707     break;
       
 21708 
       
 21709 /****
       
 21710  *BYTE_TO_LINT
       
 21711  */
       
 21712     case function_byte_to_lint :
       
 21713     {
       
 21714         symbol_c *last_type_symbol = NULL;
       
 21715 
       
 21716         {
       
 21717             symbol_c *IN_type_symbol = param_data_type;
       
 21718             last_type_symbol = param_data_type;
       
 21719             
       
 21720             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21721             {
       
 21722         
       
 21723                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21724                 return return_type_symbol;
       
 21725                 
       
 21726             }
       
 21727             
       
 21728             
       
 21729             ERROR;
       
 21730         }
       
 21731         
       
 21732     }/*function_byte_to_lint*/
       
 21733     break;
       
 21734 
       
 21735 /****
       
 21736  *BYTE_TO_DINT
       
 21737  */
       
 21738     case function_byte_to_dint :
       
 21739     {
       
 21740         symbol_c *last_type_symbol = NULL;
       
 21741 
       
 21742         {
       
 21743             symbol_c *IN_type_symbol = param_data_type;
       
 21744             last_type_symbol = param_data_type;
       
 21745             
       
 21746             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21747             {
       
 21748         
       
 21749                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21750                 return return_type_symbol;
       
 21751                 
       
 21752             }
       
 21753             
       
 21754             
       
 21755             ERROR;
       
 21756         }
       
 21757         
       
 21758     }/*function_byte_to_dint*/
       
 21759     break;
       
 21760 
       
 21761 /****
       
 21762  *BYTE_TO_DATE
       
 21763  */
       
 21764     case function_byte_to_date :
       
 21765     {
       
 21766         symbol_c *last_type_symbol = NULL;
       
 21767 
       
 21768         {
       
 21769             symbol_c *IN_type_symbol = param_data_type;
       
 21770             last_type_symbol = param_data_type;
       
 21771             
       
 21772             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21773             {
       
 21774         
       
 21775                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21776                 return return_type_symbol;
       
 21777                 
       
 21778             }
       
 21779             
       
 21780             
       
 21781             ERROR;
       
 21782         }
       
 21783         
       
 21784     }/*function_byte_to_date*/
       
 21785     break;
       
 21786 
       
 21787 /****
       
 21788  *BYTE_TO_DWORD
       
 21789  */
       
 21790     case function_byte_to_dword :
       
 21791     {
       
 21792         symbol_c *last_type_symbol = NULL;
       
 21793 
       
 21794         {
       
 21795             symbol_c *IN_type_symbol = param_data_type;
       
 21796             last_type_symbol = param_data_type;
       
 21797             
       
 21798             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21799             {
       
 21800         
       
 21801                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21802                 return return_type_symbol;
       
 21803                 
       
 21804             }
       
 21805             
       
 21806             
       
 21807             ERROR;
       
 21808         }
       
 21809         
       
 21810     }/*function_byte_to_dword*/
       
 21811     break;
       
 21812 
       
 21813 /****
       
 21814  *BYTE_TO_DT
       
 21815  */
       
 21816     case function_byte_to_dt :
       
 21817     {
       
 21818         symbol_c *last_type_symbol = NULL;
       
 21819 
       
 21820         {
       
 21821             symbol_c *IN_type_symbol = param_data_type;
       
 21822             last_type_symbol = param_data_type;
       
 21823             
       
 21824             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21825             {
       
 21826         
       
 21827                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21828                 return return_type_symbol;
       
 21829                 
       
 21830             }
       
 21831             
       
 21832             
       
 21833             ERROR;
       
 21834         }
       
 21835         
       
 21836     }/*function_byte_to_dt*/
       
 21837     break;
       
 21838 
       
 21839 /****
       
 21840  *BYTE_TO_TOD
       
 21841  */
       
 21842     case function_byte_to_tod :
       
 21843     {
       
 21844         symbol_c *last_type_symbol = NULL;
       
 21845 
       
 21846         {
       
 21847             symbol_c *IN_type_symbol = param_data_type;
       
 21848             last_type_symbol = param_data_type;
       
 21849             
       
 21850             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21851             {
       
 21852         
       
 21853                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21854                 return return_type_symbol;
       
 21855                 
       
 21856             }
       
 21857             
       
 21858             
       
 21859             ERROR;
       
 21860         }
       
 21861         
       
 21862     }/*function_byte_to_tod*/
       
 21863     break;
       
 21864 
       
 21865 /****
       
 21866  *BYTE_TO_UDINT
       
 21867  */
       
 21868     case function_byte_to_udint :
       
 21869     {
       
 21870         symbol_c *last_type_symbol = NULL;
       
 21871 
       
 21872         {
       
 21873             symbol_c *IN_type_symbol = param_data_type;
       
 21874             last_type_symbol = param_data_type;
       
 21875             
       
 21876             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21877             {
       
 21878         
       
 21879                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21880                 return return_type_symbol;
       
 21881                 
       
 21882             }
       
 21883             
       
 21884             
       
 21885             ERROR;
       
 21886         }
       
 21887         
       
 21888     }/*function_byte_to_udint*/
       
 21889     break;
       
 21890 
       
 21891 /****
       
 21892  *BYTE_TO_WORD
       
 21893  */
       
 21894     case function_byte_to_word :
       
 21895     {
       
 21896         symbol_c *last_type_symbol = NULL;
       
 21897 
       
 21898         {
       
 21899             symbol_c *IN_type_symbol = param_data_type;
       
 21900             last_type_symbol = param_data_type;
       
 21901             
       
 21902             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21903             {
       
 21904         
       
 21905                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21906                 return return_type_symbol;
       
 21907                 
       
 21908             }
       
 21909             
       
 21910             
       
 21911             ERROR;
       
 21912         }
       
 21913         
       
 21914     }/*function_byte_to_word*/
       
 21915     break;
       
 21916 
       
 21917 /****
       
 21918  *BYTE_TO_STRING
       
 21919  */
       
 21920     case function_byte_to_string :
       
 21921     {
       
 21922         symbol_c *last_type_symbol = NULL;
       
 21923 
       
 21924         {
       
 21925             symbol_c *IN_type_symbol = param_data_type;
       
 21926             last_type_symbol = param_data_type;
       
 21927             
       
 21928             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21929             {
       
 21930         
       
 21931                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21932                 return return_type_symbol;
       
 21933                 
       
 21934             }
       
 21935             
       
 21936             
       
 21937             ERROR;
       
 21938         }
       
 21939         
       
 21940     }/*function_byte_to_string*/
       
 21941     break;
       
 21942 
       
 21943 /****
       
 21944  *BYTE_TO_LWORD
       
 21945  */
       
 21946     case function_byte_to_lword :
       
 21947     {
       
 21948         symbol_c *last_type_symbol = NULL;
       
 21949 
       
 21950         {
       
 21951             symbol_c *IN_type_symbol = param_data_type;
       
 21952             last_type_symbol = param_data_type;
       
 21953             
       
 21954             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21955             {
       
 21956         
       
 21957                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21958                 return return_type_symbol;
       
 21959                 
       
 21960             }
       
 21961             
       
 21962             
       
 21963             ERROR;
       
 21964         }
       
 21965         
       
 21966     }/*function_byte_to_lword*/
       
 21967     break;
       
 21968 
       
 21969 /****
       
 21970  *BYTE_TO_UINT
       
 21971  */
       
 21972     case function_byte_to_uint :
       
 21973     {
       
 21974         symbol_c *last_type_symbol = NULL;
       
 21975 
       
 21976         {
       
 21977             symbol_c *IN_type_symbol = param_data_type;
       
 21978             last_type_symbol = param_data_type;
       
 21979             
       
 21980             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21981             {
       
 21982         
       
 21983                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21984                 return return_type_symbol;
       
 21985                 
       
 21986             }
       
 21987             
       
 21988             
       
 21989             ERROR;
       
 21990         }
       
 21991         
       
 21992     }/*function_byte_to_uint*/
       
 21993     break;
       
 21994 
       
 21995 /****
       
 21996  *BYTE_TO_LREAL
       
 21997  */
       
 21998     case function_byte_to_lreal :
       
 21999     {
       
 22000         symbol_c *last_type_symbol = NULL;
       
 22001 
       
 22002         {
       
 22003             symbol_c *IN_type_symbol = param_data_type;
       
 22004             last_type_symbol = param_data_type;
       
 22005             
       
 22006             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22007             {
       
 22008         
       
 22009                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22010                 return return_type_symbol;
       
 22011                 
       
 22012             }
       
 22013             
       
 22014             
       
 22015             ERROR;
       
 22016         }
       
 22017         
       
 22018     }/*function_byte_to_lreal*/
       
 22019     break;
       
 22020 
       
 22021 /****
       
 22022  *BYTE_TO_USINT
       
 22023  */
       
 22024     case function_byte_to_usint :
       
 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::usint_type_name;
       
 22036                 return return_type_symbol;
       
 22037                 
       
 22038             }
       
 22039             
       
 22040             
       
 22041             ERROR;
       
 22042         }
       
 22043         
       
 22044     }/*function_byte_to_usint*/
       
 22045     break;
       
 22046 
       
 22047 /****
       
 22048  *BYTE_TO_ULINT
       
 22049  */
       
 22050     case function_byte_to_ulint :
       
 22051     {
       
 22052         symbol_c *last_type_symbol = NULL;
       
 22053 
       
 22054         {
       
 22055             symbol_c *IN_type_symbol = param_data_type;
       
 22056             last_type_symbol = param_data_type;
       
 22057             
       
 22058             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22059             {
       
 22060         
       
 22061                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22062                 return return_type_symbol;
       
 22063                 
       
 22064             }
       
 22065             
       
 22066             
       
 22067             ERROR;
       
 22068         }
       
 22069         
       
 22070     }/*function_byte_to_ulint*/
       
 22071     break;
       
 22072 
       
 22073 /****
       
 22074  *BYTE_TO_BOOL
       
 22075  */
       
 22076     case function_byte_to_bool :
       
 22077     {
       
 22078         symbol_c *last_type_symbol = NULL;
       
 22079 
       
 22080         {
       
 22081             symbol_c *IN_type_symbol = param_data_type;
       
 22082             last_type_symbol = param_data_type;
       
 22083             
       
 22084             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22085             {
       
 22086         
       
 22087                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22088                 return return_type_symbol;
       
 22089                 
       
 22090             }
       
 22091             
       
 22092             
       
 22093             ERROR;
       
 22094         }
       
 22095         
       
 22096     }/*function_byte_to_bool*/
       
 22097     break;
       
 22098 
       
 22099 /****
       
 22100  *BYTE_TO_TIME
       
 22101  */
       
 22102     case function_byte_to_time :
       
 22103     {
       
 22104         symbol_c *last_type_symbol = NULL;
       
 22105 
       
 22106         {
       
 22107             symbol_c *IN_type_symbol = param_data_type;
       
 22108             last_type_symbol = param_data_type;
       
 22109             
       
 22110             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22111             {
       
 22112         
       
 22113                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22114                 return return_type_symbol;
       
 22115                 
       
 22116             }
       
 22117             
       
 22118             
       
 22119             ERROR;
       
 22120         }
       
 22121         
       
 22122     }/*function_byte_to_time*/
       
 22123     break;
       
 22124 
       
 22125 /****
       
 22126  *BYTE_TO_INT
       
 22127  */
       
 22128     case function_byte_to_int :
       
 22129     {
       
 22130         symbol_c *last_type_symbol = NULL;
       
 22131 
       
 22132         {
       
 22133             symbol_c *IN_type_symbol = param_data_type;
       
 22134             last_type_symbol = param_data_type;
       
 22135             
       
 22136             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22137             {
       
 22138         
       
 22139                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22140                 return return_type_symbol;
       
 22141                 
       
 22142             }
       
 22143             
       
 22144             
       
 22145             ERROR;
       
 22146         }
       
 22147         
       
 22148     }/*function_byte_to_int*/
       
 22149     break;
       
 22150 
       
 22151 /****
       
 22152  *USINT_TO_REAL
       
 22153  */
       
 22154     case function_usint_to_real :
       
 22155     {
       
 22156         symbol_c *last_type_symbol = NULL;
       
 22157 
       
 22158         {
       
 22159             symbol_c *IN_type_symbol = param_data_type;
       
 22160             last_type_symbol = param_data_type;
       
 22161             
       
 22162             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22163             {
       
 22164         
       
 22165                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22166                 return return_type_symbol;
       
 22167                 
       
 22168             }
       
 22169             
       
 22170             
       
 22171             ERROR;
       
 22172         }
       
 22173         
       
 22174     }/*function_usint_to_real*/
       
 22175     break;
       
 22176 
       
 22177 /****
       
 22178  *USINT_TO_SINT
       
 22179  */
       
 22180     case function_usint_to_sint :
       
 22181     {
       
 22182         symbol_c *last_type_symbol = NULL;
       
 22183 
       
 22184         {
       
 22185             symbol_c *IN_type_symbol = param_data_type;
       
 22186             last_type_symbol = param_data_type;
       
 22187             
       
 22188             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22189             {
       
 22190         
       
 22191                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22192                 return return_type_symbol;
       
 22193                 
       
 22194             }
       
 22195             
       
 22196             
       
 22197             ERROR;
       
 22198         }
       
 22199         
       
 22200     }/*function_usint_to_sint*/
       
 22201     break;
       
 22202 
       
 22203 /****
       
 22204  *USINT_TO_LINT
       
 22205  */
       
 22206     case function_usint_to_lint :
       
 22207     {
       
 22208         symbol_c *last_type_symbol = NULL;
       
 22209 
       
 22210         {
       
 22211             symbol_c *IN_type_symbol = param_data_type;
       
 22212             last_type_symbol = param_data_type;
       
 22213             
       
 22214             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22215             {
       
 22216         
       
 22217                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22218                 return return_type_symbol;
       
 22219                 
       
 22220             }
       
 22221             
       
 22222             
       
 22223             ERROR;
       
 22224         }
       
 22225         
       
 22226     }/*function_usint_to_lint*/
       
 22227     break;
       
 22228 
       
 22229 /****
       
 22230  *USINT_TO_DINT
       
 22231  */
       
 22232     case function_usint_to_dint :
       
 22233     {
       
 22234         symbol_c *last_type_symbol = NULL;
       
 22235 
       
 22236         {
       
 22237             symbol_c *IN_type_symbol = param_data_type;
       
 22238             last_type_symbol = param_data_type;
       
 22239             
       
 22240             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22241             {
       
 22242         
       
 22243                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22244                 return return_type_symbol;
       
 22245                 
       
 22246             }
       
 22247             
       
 22248             
       
 22249             ERROR;
       
 22250         }
       
 22251         
       
 22252     }/*function_usint_to_dint*/
       
 22253     break;
       
 22254 
       
 22255 /****
       
 22256  *USINT_TO_DATE
       
 22257  */
       
 22258     case function_usint_to_date :
       
 22259     {
       
 22260         symbol_c *last_type_symbol = NULL;
       
 22261 
       
 22262         {
       
 22263             symbol_c *IN_type_symbol = param_data_type;
       
 22264             last_type_symbol = param_data_type;
       
 22265             
       
 22266             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22267             {
       
 22268         
       
 22269                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22270                 return return_type_symbol;
       
 22271                 
       
 22272             }
       
 22273             
       
 22274             
       
 22275             ERROR;
       
 22276         }
       
 22277         
       
 22278     }/*function_usint_to_date*/
       
 22279     break;
       
 22280 
       
 22281 /****
       
 22282  *USINT_TO_DWORD
       
 22283  */
       
 22284     case function_usint_to_dword :
       
 22285     {
       
 22286         symbol_c *last_type_symbol = NULL;
       
 22287 
       
 22288         {
       
 22289             symbol_c *IN_type_symbol = param_data_type;
       
 22290             last_type_symbol = param_data_type;
       
 22291             
       
 22292             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22293             {
       
 22294         
       
 22295                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22296                 return return_type_symbol;
       
 22297                 
       
 22298             }
       
 22299             
       
 22300             
       
 22301             ERROR;
       
 22302         }
       
 22303         
       
 22304     }/*function_usint_to_dword*/
       
 22305     break;
       
 22306 
       
 22307 /****
       
 22308  *USINT_TO_DT
       
 22309  */
       
 22310     case function_usint_to_dt :
       
 22311     {
       
 22312         symbol_c *last_type_symbol = NULL;
       
 22313 
       
 22314         {
       
 22315             symbol_c *IN_type_symbol = param_data_type;
       
 22316             last_type_symbol = param_data_type;
       
 22317             
       
 22318             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22319             {
       
 22320         
       
 22321                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22322                 return return_type_symbol;
       
 22323                 
       
 22324             }
       
 22325             
       
 22326             
       
 22327             ERROR;
       
 22328         }
       
 22329         
       
 22330     }/*function_usint_to_dt*/
       
 22331     break;
       
 22332 
       
 22333 /****
       
 22334  *USINT_TO_TOD
       
 22335  */
       
 22336     case function_usint_to_tod :
       
 22337     {
       
 22338         symbol_c *last_type_symbol = NULL;
       
 22339 
       
 22340         {
       
 22341             symbol_c *IN_type_symbol = param_data_type;
       
 22342             last_type_symbol = param_data_type;
       
 22343             
       
 22344             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22345             {
       
 22346         
       
 22347                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22348                 return return_type_symbol;
       
 22349                 
       
 22350             }
       
 22351             
       
 22352             
       
 22353             ERROR;
       
 22354         }
       
 22355         
       
 22356     }/*function_usint_to_tod*/
       
 22357     break;
       
 22358 
       
 22359 /****
       
 22360  *USINT_TO_UDINT
       
 22361  */
       
 22362     case function_usint_to_udint :
       
 22363     {
       
 22364         symbol_c *last_type_symbol = NULL;
       
 22365 
       
 22366         {
       
 22367             symbol_c *IN_type_symbol = param_data_type;
       
 22368             last_type_symbol = param_data_type;
       
 22369             
       
 22370             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22371             {
       
 22372         
       
 22373                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22374                 return return_type_symbol;
       
 22375                 
       
 22376             }
       
 22377             
       
 22378             
       
 22379             ERROR;
       
 22380         }
       
 22381         
       
 22382     }/*function_usint_to_udint*/
       
 22383     break;
       
 22384 
       
 22385 /****
       
 22386  *USINT_TO_WORD
       
 22387  */
       
 22388     case function_usint_to_word :
       
 22389     {
       
 22390         symbol_c *last_type_symbol = NULL;
       
 22391 
       
 22392         {
       
 22393             symbol_c *IN_type_symbol = param_data_type;
       
 22394             last_type_symbol = param_data_type;
       
 22395             
       
 22396             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22397             {
       
 22398         
       
 22399                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22400                 return return_type_symbol;
       
 22401                 
       
 22402             }
       
 22403             
       
 22404             
       
 22405             ERROR;
       
 22406         }
       
 22407         
       
 22408     }/*function_usint_to_word*/
       
 22409     break;
       
 22410 
       
 22411 /****
       
 22412  *USINT_TO_STRING
       
 22413  */
       
 22414     case function_usint_to_string :
       
 22415     {
       
 22416         symbol_c *last_type_symbol = NULL;
       
 22417 
       
 22418         {
       
 22419             symbol_c *IN_type_symbol = param_data_type;
       
 22420             last_type_symbol = param_data_type;
       
 22421             
       
 22422             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22423             {
       
 22424         
       
 22425                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22426                 return return_type_symbol;
       
 22427                 
       
 22428             }
       
 22429             
       
 22430             
       
 22431             ERROR;
       
 22432         }
       
 22433         
       
 22434     }/*function_usint_to_string*/
       
 22435     break;
       
 22436 
       
 22437 /****
       
 22438  *USINT_TO_LWORD
       
 22439  */
       
 22440     case function_usint_to_lword :
       
 22441     {
       
 22442         symbol_c *last_type_symbol = NULL;
       
 22443 
       
 22444         {
       
 22445             symbol_c *IN_type_symbol = param_data_type;
       
 22446             last_type_symbol = param_data_type;
       
 22447             
       
 22448             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22449             {
       
 22450         
       
 22451                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22452                 return return_type_symbol;
       
 22453                 
       
 22454             }
       
 22455             
       
 22456             
       
 22457             ERROR;
       
 22458         }
       
 22459         
       
 22460     }/*function_usint_to_lword*/
       
 22461     break;
       
 22462 
       
 22463 /****
       
 22464  *USINT_TO_UINT
       
 22465  */
       
 22466     case function_usint_to_uint :
       
 22467     {
       
 22468         symbol_c *last_type_symbol = NULL;
       
 22469 
       
 22470         {
       
 22471             symbol_c *IN_type_symbol = param_data_type;
       
 22472             last_type_symbol = param_data_type;
       
 22473             
       
 22474             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22475             {
       
 22476         
       
 22477                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22478                 return return_type_symbol;
       
 22479                 
       
 22480             }
       
 22481             
       
 22482             
       
 22483             ERROR;
       
 22484         }
       
 22485         
       
 22486     }/*function_usint_to_uint*/
       
 22487     break;
       
 22488 
       
 22489 /****
       
 22490  *USINT_TO_LREAL
       
 22491  */
       
 22492     case function_usint_to_lreal :
       
 22493     {
       
 22494         symbol_c *last_type_symbol = NULL;
       
 22495 
       
 22496         {
       
 22497             symbol_c *IN_type_symbol = param_data_type;
       
 22498             last_type_symbol = param_data_type;
       
 22499             
       
 22500             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22501             {
       
 22502         
       
 22503                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22504                 return return_type_symbol;
       
 22505                 
       
 22506             }
       
 22507             
       
 22508             
       
 22509             ERROR;
       
 22510         }
       
 22511         
       
 22512     }/*function_usint_to_lreal*/
       
 22513     break;
       
 22514 
       
 22515 /****
       
 22516  *USINT_TO_BYTE
       
 22517  */
       
 22518     case function_usint_to_byte :
       
 22519     {
       
 22520         symbol_c *last_type_symbol = NULL;
       
 22521 
       
 22522         {
       
 22523             symbol_c *IN_type_symbol = param_data_type;
       
 22524             last_type_symbol = param_data_type;
       
 22525             
       
 22526             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22527             {
       
 22528         
       
 22529                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22530                 return return_type_symbol;
       
 22531                 
       
 22532             }
       
 22533             
       
 22534             
       
 22535             ERROR;
       
 22536         }
       
 22537         
       
 22538     }/*function_usint_to_byte*/
       
 22539     break;
       
 22540 
       
 22541 /****
       
 22542  *USINT_TO_ULINT
       
 22543  */
       
 22544     case function_usint_to_ulint :
       
 22545     {
       
 22546         symbol_c *last_type_symbol = NULL;
       
 22547 
       
 22548         {
       
 22549             symbol_c *IN_type_symbol = param_data_type;
       
 22550             last_type_symbol = param_data_type;
       
 22551             
       
 22552             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22553             {
       
 22554         
       
 22555                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22556                 return return_type_symbol;
       
 22557                 
       
 22558             }
       
 22559             
       
 22560             
       
 22561             ERROR;
       
 22562         }
       
 22563         
       
 22564     }/*function_usint_to_ulint*/
       
 22565     break;
       
 22566 
       
 22567 /****
       
 22568  *USINT_TO_BOOL
       
 22569  */
       
 22570     case function_usint_to_bool :
       
 22571     {
       
 22572         symbol_c *last_type_symbol = NULL;
       
 22573 
       
 22574         {
       
 22575             symbol_c *IN_type_symbol = param_data_type;
       
 22576             last_type_symbol = param_data_type;
       
 22577             
       
 22578             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22579             {
       
 22580         
       
 22581                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22582                 return return_type_symbol;
       
 22583                 
       
 22584             }
       
 22585             
       
 22586             
       
 22587             ERROR;
       
 22588         }
       
 22589         
       
 22590     }/*function_usint_to_bool*/
       
 22591     break;
       
 22592 
       
 22593 /****
       
 22594  *USINT_TO_TIME
       
 22595  */
       
 22596     case function_usint_to_time :
       
 22597     {
       
 22598         symbol_c *last_type_symbol = NULL;
       
 22599 
       
 22600         {
       
 22601             symbol_c *IN_type_symbol = param_data_type;
       
 22602             last_type_symbol = param_data_type;
       
 22603             
       
 22604             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22605             {
       
 22606         
       
 22607                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22608                 return return_type_symbol;
       
 22609                 
       
 22610             }
       
 22611             
       
 22612             
       
 22613             ERROR;
       
 22614         }
       
 22615         
       
 22616     }/*function_usint_to_time*/
       
 22617     break;
       
 22618 
       
 22619 /****
       
 22620  *USINT_TO_INT
       
 22621  */
       
 22622     case function_usint_to_int :
       
 22623     {
       
 22624         symbol_c *last_type_symbol = NULL;
       
 22625 
       
 22626         {
       
 22627             symbol_c *IN_type_symbol = param_data_type;
       
 22628             last_type_symbol = param_data_type;
       
 22629             
       
 22630             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 22631             {
       
 22632         
       
 22633                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22634                 return return_type_symbol;
       
 22635                 
       
 22636             }
       
 22637             
       
 22638             
       
 22639             ERROR;
       
 22640         }
       
 22641         
       
 22642     }/*function_usint_to_int*/
       
 22643     break;
       
 22644 
       
 22645 /****
       
 22646  *ULINT_TO_REAL
       
 22647  */
       
 22648     case function_ulint_to_real :
       
 22649     {
       
 22650         symbol_c *last_type_symbol = NULL;
       
 22651 
       
 22652         {
       
 22653             symbol_c *IN_type_symbol = param_data_type;
       
 22654             last_type_symbol = param_data_type;
       
 22655             
       
 22656             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22657             {
       
 22658         
       
 22659                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22660                 return return_type_symbol;
       
 22661                 
       
 22662             }
       
 22663             
       
 22664             
       
 22665             ERROR;
       
 22666         }
       
 22667         
       
 22668     }/*function_ulint_to_real*/
       
 22669     break;
       
 22670 
       
 22671 /****
       
 22672  *ULINT_TO_SINT
       
 22673  */
       
 22674     case function_ulint_to_sint :
       
 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::ulint_type_name, last_type_symbol))
       
 22683             {
       
 22684         
       
 22685                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22686                 return return_type_symbol;
       
 22687                 
       
 22688             }
       
 22689             
       
 22690             
       
 22691             ERROR;
       
 22692         }
       
 22693         
       
 22694     }/*function_ulint_to_sint*/
       
 22695     break;
       
 22696 
       
 22697 /****
       
 22698  *ULINT_TO_LINT
       
 22699  */
       
 22700     case function_ulint_to_lint :
       
 22701     {
       
 22702         symbol_c *last_type_symbol = NULL;
       
 22703 
       
 22704         {
       
 22705             symbol_c *IN_type_symbol = param_data_type;
       
 22706             last_type_symbol = param_data_type;
       
 22707             
       
 22708             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22709             {
       
 22710         
       
 22711                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22712                 return return_type_symbol;
       
 22713                 
       
 22714             }
       
 22715             
       
 22716             
       
 22717             ERROR;
       
 22718         }
       
 22719         
       
 22720     }/*function_ulint_to_lint*/
       
 22721     break;
       
 22722 
       
 22723 /****
       
 22724  *ULINT_TO_DINT
       
 22725  */
       
 22726     case function_ulint_to_dint :
       
 22727     {
       
 22728         symbol_c *last_type_symbol = NULL;
       
 22729 
       
 22730         {
       
 22731             symbol_c *IN_type_symbol = param_data_type;
       
 22732             last_type_symbol = param_data_type;
       
 22733             
       
 22734             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22735             {
       
 22736         
       
 22737                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22738                 return return_type_symbol;
       
 22739                 
       
 22740             }
       
 22741             
       
 22742             
       
 22743             ERROR;
       
 22744         }
       
 22745         
       
 22746     }/*function_ulint_to_dint*/
       
 22747     break;
       
 22748 
       
 22749 /****
       
 22750  *ULINT_TO_DATE
       
 22751  */
       
 22752     case function_ulint_to_date :
       
 22753     {
       
 22754         symbol_c *last_type_symbol = NULL;
       
 22755 
       
 22756         {
       
 22757             symbol_c *IN_type_symbol = param_data_type;
       
 22758             last_type_symbol = param_data_type;
       
 22759             
       
 22760             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22761             {
       
 22762         
       
 22763                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22764                 return return_type_symbol;
       
 22765                 
       
 22766             }
       
 22767             
       
 22768             
       
 22769             ERROR;
       
 22770         }
       
 22771         
       
 22772     }/*function_ulint_to_date*/
       
 22773     break;
       
 22774 
       
 22775 /****
       
 22776  *ULINT_TO_DWORD
       
 22777  */
       
 22778     case function_ulint_to_dword :
       
 22779     {
       
 22780         symbol_c *last_type_symbol = NULL;
       
 22781 
       
 22782         {
       
 22783             symbol_c *IN_type_symbol = param_data_type;
       
 22784             last_type_symbol = param_data_type;
       
 22785             
       
 22786             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22787             {
       
 22788         
       
 22789                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22790                 return return_type_symbol;
       
 22791                 
       
 22792             }
       
 22793             
       
 22794             
       
 22795             ERROR;
       
 22796         }
       
 22797         
       
 22798     }/*function_ulint_to_dword*/
       
 22799     break;
       
 22800 
       
 22801 /****
       
 22802  *ULINT_TO_DT
       
 22803  */
       
 22804     case function_ulint_to_dt :
       
 22805     {
       
 22806         symbol_c *last_type_symbol = NULL;
       
 22807 
       
 22808         {
       
 22809             symbol_c *IN_type_symbol = param_data_type;
       
 22810             last_type_symbol = param_data_type;
       
 22811             
       
 22812             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22813             {
       
 22814         
       
 22815                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22816                 return return_type_symbol;
       
 22817                 
       
 22818             }
       
 22819             
       
 22820             
       
 22821             ERROR;
       
 22822         }
       
 22823         
       
 22824     }/*function_ulint_to_dt*/
       
 22825     break;
       
 22826 
       
 22827 /****
       
 22828  *ULINT_TO_TOD
       
 22829  */
       
 22830     case function_ulint_to_tod :
       
 22831     {
       
 22832         symbol_c *last_type_symbol = NULL;
       
 22833 
       
 22834         {
       
 22835             symbol_c *IN_type_symbol = param_data_type;
       
 22836             last_type_symbol = param_data_type;
       
 22837             
       
 22838             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22839             {
       
 22840         
       
 22841                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22842                 return return_type_symbol;
       
 22843                 
       
 22844             }
       
 22845             
       
 22846             
       
 22847             ERROR;
       
 22848         }
       
 22849         
       
 22850     }/*function_ulint_to_tod*/
       
 22851     break;
       
 22852 
       
 22853 /****
       
 22854  *ULINT_TO_UDINT
       
 22855  */
       
 22856     case function_ulint_to_udint :
       
 22857     {
       
 22858         symbol_c *last_type_symbol = NULL;
       
 22859 
       
 22860         {
       
 22861             symbol_c *IN_type_symbol = param_data_type;
       
 22862             last_type_symbol = param_data_type;
       
 22863             
       
 22864             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22865             {
       
 22866         
       
 22867                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22868                 return return_type_symbol;
       
 22869                 
       
 22870             }
       
 22871             
       
 22872             
       
 22873             ERROR;
       
 22874         }
       
 22875         
       
 22876     }/*function_ulint_to_udint*/
       
 22877     break;
       
 22878 
       
 22879 /****
       
 22880  *ULINT_TO_WORD
       
 22881  */
       
 22882     case function_ulint_to_word :
       
 22883     {
       
 22884         symbol_c *last_type_symbol = NULL;
       
 22885 
       
 22886         {
       
 22887             symbol_c *IN_type_symbol = param_data_type;
       
 22888             last_type_symbol = param_data_type;
       
 22889             
       
 22890             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22891             {
       
 22892         
       
 22893                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22894                 return return_type_symbol;
       
 22895                 
       
 22896             }
       
 22897             
       
 22898             
       
 22899             ERROR;
       
 22900         }
       
 22901         
       
 22902     }/*function_ulint_to_word*/
       
 22903     break;
       
 22904 
       
 22905 /****
       
 22906  *ULINT_TO_STRING
       
 22907  */
       
 22908     case function_ulint_to_string :
       
 22909     {
       
 22910         symbol_c *last_type_symbol = NULL;
       
 22911 
       
 22912         {
       
 22913             symbol_c *IN_type_symbol = param_data_type;
       
 22914             last_type_symbol = param_data_type;
       
 22915             
       
 22916             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22917             {
       
 22918         
       
 22919                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22920                 return return_type_symbol;
       
 22921                 
       
 22922             }
       
 22923             
       
 22924             
       
 22925             ERROR;
       
 22926         }
       
 22927         
       
 22928     }/*function_ulint_to_string*/
       
 22929     break;
       
 22930 
       
 22931 /****
       
 22932  *ULINT_TO_LWORD
       
 22933  */
       
 22934     case function_ulint_to_lword :
       
 22935     {
       
 22936         symbol_c *last_type_symbol = NULL;
       
 22937 
       
 22938         {
       
 22939             symbol_c *IN_type_symbol = param_data_type;
       
 22940             last_type_symbol = param_data_type;
       
 22941             
       
 22942             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22943             {
       
 22944         
       
 22945                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22946                 return return_type_symbol;
       
 22947                 
       
 22948             }
       
 22949             
       
 22950             
       
 22951             ERROR;
       
 22952         }
       
 22953         
       
 22954     }/*function_ulint_to_lword*/
       
 22955     break;
       
 22956 
       
 22957 /****
       
 22958  *ULINT_TO_UINT
       
 22959  */
       
 22960     case function_ulint_to_uint :
       
 22961     {
       
 22962         symbol_c *last_type_symbol = NULL;
       
 22963 
       
 22964         {
       
 22965             symbol_c *IN_type_symbol = param_data_type;
       
 22966             last_type_symbol = param_data_type;
       
 22967             
       
 22968             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22969             {
       
 22970         
       
 22971                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22972                 return return_type_symbol;
       
 22973                 
       
 22974             }
       
 22975             
       
 22976             
       
 22977             ERROR;
       
 22978         }
       
 22979         
       
 22980     }/*function_ulint_to_uint*/
       
 22981     break;
       
 22982 
       
 22983 /****
       
 22984  *ULINT_TO_LREAL
       
 22985  */
       
 22986     case function_ulint_to_lreal :
       
 22987     {
       
 22988         symbol_c *last_type_symbol = NULL;
       
 22989 
       
 22990         {
       
 22991             symbol_c *IN_type_symbol = param_data_type;
       
 22992             last_type_symbol = param_data_type;
       
 22993             
       
 22994             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 22995             {
       
 22996         
       
 22997                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22998                 return return_type_symbol;
       
 22999                 
       
 23000             }
       
 23001             
       
 23002             
       
 23003             ERROR;
       
 23004         }
       
 23005         
       
 23006     }/*function_ulint_to_lreal*/
       
 23007     break;
       
 23008 
       
 23009 /****
       
 23010  *ULINT_TO_BYTE
       
 23011  */
       
 23012     case function_ulint_to_byte :
       
 23013     {
       
 23014         symbol_c *last_type_symbol = NULL;
       
 23015 
       
 23016         {
       
 23017             symbol_c *IN_type_symbol = param_data_type;
       
 23018             last_type_symbol = param_data_type;
       
 23019             
       
 23020             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 23021             {
       
 23022         
       
 23023                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23024                 return return_type_symbol;
       
 23025                 
       
 23026             }
       
 23027             
       
 23028             
       
 23029             ERROR;
       
 23030         }
       
 23031         
       
 23032     }/*function_ulint_to_byte*/
       
 23033     break;
       
 23034 
       
 23035 /****
       
 23036  *ULINT_TO_USINT
       
 23037  */
       
 23038     case function_ulint_to_usint :
       
 23039     {
       
 23040         symbol_c *last_type_symbol = NULL;
       
 23041 
       
 23042         {
       
 23043             symbol_c *IN_type_symbol = param_data_type;
       
 23044             last_type_symbol = param_data_type;
       
 23045             
       
 23046             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 23047             {
       
 23048         
       
 23049                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23050                 return return_type_symbol;
       
 23051                 
       
 23052             }
       
 23053             
       
 23054             
       
 23055             ERROR;
       
 23056         }
       
 23057         
       
 23058     }/*function_ulint_to_usint*/
       
 23059     break;
       
 23060 
       
 23061 /****
       
 23062  *ULINT_TO_BOOL
       
 23063  */
       
 23064     case function_ulint_to_bool :
       
 23065     {
       
 23066         symbol_c *last_type_symbol = NULL;
       
 23067 
       
 23068         {
       
 23069             symbol_c *IN_type_symbol = param_data_type;
       
 23070             last_type_symbol = param_data_type;
       
 23071             
       
 23072             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 23073             {
       
 23074         
       
 23075                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23076                 return return_type_symbol;
       
 23077                 
       
 23078             }
       
 23079             
       
 23080             
       
 23081             ERROR;
       
 23082         }
       
 23083         
       
 23084     }/*function_ulint_to_bool*/
       
 23085     break;
       
 23086 
       
 23087 /****
       
 23088  *ULINT_TO_TIME
       
 23089  */
       
 23090     case function_ulint_to_time :
       
 23091     {
       
 23092         symbol_c *last_type_symbol = NULL;
       
 23093 
       
 23094         {
       
 23095             symbol_c *IN_type_symbol = param_data_type;
       
 23096             last_type_symbol = param_data_type;
       
 23097             
       
 23098             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 23099             {
       
 23100         
       
 23101                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23102                 return return_type_symbol;
       
 23103                 
       
 23104             }
       
 23105             
       
 23106             
       
 23107             ERROR;
       
 23108         }
       
 23109         
       
 23110     }/*function_ulint_to_time*/
       
 23111     break;
       
 23112 
       
 23113 /****
       
 23114  *ULINT_TO_INT
       
 23115  */
       
 23116     case function_ulint_to_int :
       
 23117     {
       
 23118         symbol_c *last_type_symbol = NULL;
       
 23119 
       
 23120         {
       
 23121             symbol_c *IN_type_symbol = param_data_type;
       
 23122             last_type_symbol = param_data_type;
       
 23123             
       
 23124             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 23125             {
       
 23126         
       
 23127                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23128                 return return_type_symbol;
       
 23129                 
       
 23130             }
       
 23131             
       
 23132             
       
 23133             ERROR;
       
 23134         }
       
 23135         
       
 23136     }/*function_ulint_to_int*/
       
 23137     break;
       
 23138 
       
 23139 /****
       
 23140  *BOOL_TO_REAL
       
 23141  */
       
 23142     case function_bool_to_real :
       
 23143     {
       
 23144         symbol_c *last_type_symbol = NULL;
       
 23145 
       
 23146         {
       
 23147             symbol_c *IN_type_symbol = param_data_type;
       
 23148             last_type_symbol = param_data_type;
       
 23149             
       
 23150             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23151             {
       
 23152         
       
 23153                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23154                 return return_type_symbol;
       
 23155                 
       
 23156             }
       
 23157             
       
 23158             
       
 23159             ERROR;
       
 23160         }
       
 23161         
       
 23162     }/*function_bool_to_real*/
       
 23163     break;
       
 23164 
       
 23165 /****
 14572  *BOOL_TO_SINT
 23166  *BOOL_TO_SINT
 14573  */
 23167  */
 14574     case function_bool_to_sint :
 23168     case function_bool_to_sint :
 14575     {
 23169     {
 14576         symbol_c *last_type_symbol = NULL;
 23170         symbol_c *last_type_symbol = NULL;
 14585                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 23179                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 14586                 return return_type_symbol;
 23180                 return return_type_symbol;
 14587                 
 23181                 
 14588             }
 23182             }
 14589             
 23183             
       
 23184             
 14590             ERROR;
 23185             ERROR;
 14591         }
 23186         }
 14592         
 23187         
 14593     }/*function_bool_to_sint*/
 23188     }/*function_bool_to_sint*/
 14594     break;
 23189     break;
 14595 
 23190 
 14596 /****
 23191 /****
       
 23192  *BOOL_TO_LINT
       
 23193  */
       
 23194     case function_bool_to_lint :
       
 23195     {
       
 23196         symbol_c *last_type_symbol = NULL;
       
 23197 
       
 23198         {
       
 23199             symbol_c *IN_type_symbol = param_data_type;
       
 23200             last_type_symbol = param_data_type;
       
 23201             
       
 23202             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23203             {
       
 23204         
       
 23205                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23206                 return return_type_symbol;
       
 23207                 
       
 23208             }
       
 23209             
       
 23210             
       
 23211             ERROR;
       
 23212         }
       
 23213         
       
 23214     }/*function_bool_to_lint*/
       
 23215     break;
       
 23216 
       
 23217 /****
       
 23218  *BOOL_TO_DINT
       
 23219  */
       
 23220     case function_bool_to_dint :
       
 23221     {
       
 23222         symbol_c *last_type_symbol = NULL;
       
 23223 
       
 23224         {
       
 23225             symbol_c *IN_type_symbol = param_data_type;
       
 23226             last_type_symbol = param_data_type;
       
 23227             
       
 23228             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23229             {
       
 23230         
       
 23231                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23232                 return return_type_symbol;
       
 23233                 
       
 23234             }
       
 23235             
       
 23236             
       
 23237             ERROR;
       
 23238         }
       
 23239         
       
 23240     }/*function_bool_to_dint*/
       
 23241     break;
       
 23242 
       
 23243 /****
       
 23244  *BOOL_TO_DATE
       
 23245  */
       
 23246     case function_bool_to_date :
       
 23247     {
       
 23248         symbol_c *last_type_symbol = NULL;
       
 23249 
       
 23250         {
       
 23251             symbol_c *IN_type_symbol = param_data_type;
       
 23252             last_type_symbol = param_data_type;
       
 23253             
       
 23254             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23255             {
       
 23256         
       
 23257                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23258                 return return_type_symbol;
       
 23259                 
       
 23260             }
       
 23261             
       
 23262             
       
 23263             ERROR;
       
 23264         }
       
 23265         
       
 23266     }/*function_bool_to_date*/
       
 23267     break;
       
 23268 
       
 23269 /****
       
 23270  *BOOL_TO_DWORD
       
 23271  */
       
 23272     case function_bool_to_dword :
       
 23273     {
       
 23274         symbol_c *last_type_symbol = NULL;
       
 23275 
       
 23276         {
       
 23277             symbol_c *IN_type_symbol = param_data_type;
       
 23278             last_type_symbol = param_data_type;
       
 23279             
       
 23280             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23281             {
       
 23282         
       
 23283                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 23284                 return return_type_symbol;
       
 23285                 
       
 23286             }
       
 23287             
       
 23288             
       
 23289             ERROR;
       
 23290         }
       
 23291         
       
 23292     }/*function_bool_to_dword*/
       
 23293     break;
       
 23294 
       
 23295 /****
       
 23296  *BOOL_TO_DT
       
 23297  */
       
 23298     case function_bool_to_dt :
       
 23299     {
       
 23300         symbol_c *last_type_symbol = NULL;
       
 23301 
       
 23302         {
       
 23303             symbol_c *IN_type_symbol = param_data_type;
       
 23304             last_type_symbol = param_data_type;
       
 23305             
       
 23306             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23307             {
       
 23308         
       
 23309                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23310                 return return_type_symbol;
       
 23311                 
       
 23312             }
       
 23313             
       
 23314             
       
 23315             ERROR;
       
 23316         }
       
 23317         
       
 23318     }/*function_bool_to_dt*/
       
 23319     break;
       
 23320 
       
 23321 /****
       
 23322  *BOOL_TO_TOD
       
 23323  */
       
 23324     case function_bool_to_tod :
       
 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::bool_type_name, last_type_symbol))
       
 23333             {
       
 23334         
       
 23335                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23336                 return return_type_symbol;
       
 23337                 
       
 23338             }
       
 23339             
       
 23340             
       
 23341             ERROR;
       
 23342         }
       
 23343         
       
 23344     }/*function_bool_to_tod*/
       
 23345     break;
       
 23346 
       
 23347 /****
       
 23348  *BOOL_TO_UDINT
       
 23349  */
       
 23350     case function_bool_to_udint :
       
 23351     {
       
 23352         symbol_c *last_type_symbol = NULL;
       
 23353 
       
 23354         {
       
 23355             symbol_c *IN_type_symbol = param_data_type;
       
 23356             last_type_symbol = param_data_type;
       
 23357             
       
 23358             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23359             {
       
 23360         
       
 23361                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23362                 return return_type_symbol;
       
 23363                 
       
 23364             }
       
 23365             
       
 23366             
       
 23367             ERROR;
       
 23368         }
       
 23369         
       
 23370     }/*function_bool_to_udint*/
       
 23371     break;
       
 23372 
       
 23373 /****
       
 23374  *BOOL_TO_WORD
       
 23375  */
       
 23376     case function_bool_to_word :
       
 23377     {
       
 23378         symbol_c *last_type_symbol = NULL;
       
 23379 
       
 23380         {
       
 23381             symbol_c *IN_type_symbol = param_data_type;
       
 23382             last_type_symbol = param_data_type;
       
 23383             
       
 23384             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23385             {
       
 23386         
       
 23387                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23388                 return return_type_symbol;
       
 23389                 
       
 23390             }
       
 23391             
       
 23392             
       
 23393             ERROR;
       
 23394         }
       
 23395         
       
 23396     }/*function_bool_to_word*/
       
 23397     break;
       
 23398 
       
 23399 /****
       
 23400  *BOOL_TO_STRING
       
 23401  */
       
 23402     case function_bool_to_string :
       
 23403     {
       
 23404         symbol_c *last_type_symbol = NULL;
       
 23405 
       
 23406         {
       
 23407             symbol_c *IN_type_symbol = param_data_type;
       
 23408             last_type_symbol = param_data_type;
       
 23409             
       
 23410             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23411             {
       
 23412         
       
 23413                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23414                 return return_type_symbol;
       
 23415                 
       
 23416             }
       
 23417             
       
 23418             
       
 23419             ERROR;
       
 23420         }
       
 23421         
       
 23422     }/*function_bool_to_string*/
       
 23423     break;
       
 23424 
       
 23425 /****
       
 23426  *BOOL_TO_LWORD
       
 23427  */
       
 23428     case function_bool_to_lword :
       
 23429     {
       
 23430         symbol_c *last_type_symbol = NULL;
       
 23431 
       
 23432         {
       
 23433             symbol_c *IN_type_symbol = param_data_type;
       
 23434             last_type_symbol = param_data_type;
       
 23435             
       
 23436             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23437             {
       
 23438         
       
 23439                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23440                 return return_type_symbol;
       
 23441                 
       
 23442             }
       
 23443             
       
 23444             
       
 23445             ERROR;
       
 23446         }
       
 23447         
       
 23448     }/*function_bool_to_lword*/
       
 23449     break;
       
 23450 
       
 23451 /****
       
 23452  *BOOL_TO_UINT
       
 23453  */
       
 23454     case function_bool_to_uint :
       
 23455     {
       
 23456         symbol_c *last_type_symbol = NULL;
       
 23457 
       
 23458         {
       
 23459             symbol_c *IN_type_symbol = param_data_type;
       
 23460             last_type_symbol = param_data_type;
       
 23461             
       
 23462             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23463             {
       
 23464         
       
 23465                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23466                 return return_type_symbol;
       
 23467                 
       
 23468             }
       
 23469             
       
 23470             
       
 23471             ERROR;
       
 23472         }
       
 23473         
       
 23474     }/*function_bool_to_uint*/
       
 23475     break;
       
 23476 
       
 23477 /****
       
 23478  *BOOL_TO_LREAL
       
 23479  */
       
 23480     case function_bool_to_lreal :
       
 23481     {
       
 23482         symbol_c *last_type_symbol = NULL;
       
 23483 
       
 23484         {
       
 23485             symbol_c *IN_type_symbol = param_data_type;
       
 23486             last_type_symbol = param_data_type;
       
 23487             
       
 23488             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23489             {
       
 23490         
       
 23491                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23492                 return return_type_symbol;
       
 23493                 
       
 23494             }
       
 23495             
       
 23496             
       
 23497             ERROR;
       
 23498         }
       
 23499         
       
 23500     }/*function_bool_to_lreal*/
       
 23501     break;
       
 23502 
       
 23503 /****
       
 23504  *BOOL_TO_BYTE
       
 23505  */
       
 23506     case function_bool_to_byte :
       
 23507     {
       
 23508         symbol_c *last_type_symbol = NULL;
       
 23509 
       
 23510         {
       
 23511             symbol_c *IN_type_symbol = param_data_type;
       
 23512             last_type_symbol = param_data_type;
       
 23513             
       
 23514             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23515             {
       
 23516         
       
 23517                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23518                 return return_type_symbol;
       
 23519                 
       
 23520             }
       
 23521             
       
 23522             
       
 23523             ERROR;
       
 23524         }
       
 23525         
       
 23526     }/*function_bool_to_byte*/
       
 23527     break;
       
 23528 
       
 23529 /****
       
 23530  *BOOL_TO_USINT
       
 23531  */
       
 23532     case function_bool_to_usint :
       
 23533     {
       
 23534         symbol_c *last_type_symbol = NULL;
       
 23535 
       
 23536         {
       
 23537             symbol_c *IN_type_symbol = param_data_type;
       
 23538             last_type_symbol = param_data_type;
       
 23539             
       
 23540             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23541             {
       
 23542         
       
 23543                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23544                 return return_type_symbol;
       
 23545                 
       
 23546             }
       
 23547             
       
 23548             
       
 23549             ERROR;
       
 23550         }
       
 23551         
       
 23552     }/*function_bool_to_usint*/
       
 23553     break;
       
 23554 
       
 23555 /****
       
 23556  *BOOL_TO_ULINT
       
 23557  */
       
 23558     case function_bool_to_ulint :
       
 23559     {
       
 23560         symbol_c *last_type_symbol = NULL;
       
 23561 
       
 23562         {
       
 23563             symbol_c *IN_type_symbol = param_data_type;
       
 23564             last_type_symbol = param_data_type;
       
 23565             
       
 23566             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23567             {
       
 23568         
       
 23569                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23570                 return return_type_symbol;
       
 23571                 
       
 23572             }
       
 23573             
       
 23574             
       
 23575             ERROR;
       
 23576         }
       
 23577         
       
 23578     }/*function_bool_to_ulint*/
       
 23579     break;
       
 23580 
       
 23581 /****
       
 23582  *BOOL_TO_TIME
       
 23583  */
       
 23584     case function_bool_to_time :
       
 23585     {
       
 23586         symbol_c *last_type_symbol = NULL;
       
 23587 
       
 23588         {
       
 23589             symbol_c *IN_type_symbol = param_data_type;
       
 23590             last_type_symbol = param_data_type;
       
 23591             
       
 23592             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
       
 23593             {
       
 23594         
       
 23595                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23596                 return return_type_symbol;
       
 23597                 
       
 23598             }
       
 23599             
       
 23600             
       
 23601             ERROR;
       
 23602         }
       
 23603         
       
 23604     }/*function_bool_to_time*/
       
 23605     break;
       
 23606 
       
 23607 /****
 14597  *BOOL_TO_INT
 23608  *BOOL_TO_INT
 14598  */
 23609  */
 14599     case function_bool_to_int :
 23610     case function_bool_to_int :
 14600     {
 23611     {
 14601         symbol_c *last_type_symbol = NULL;
 23612         symbol_c *last_type_symbol = NULL;
 14610                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 23621                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 14611                 return return_type_symbol;
 23622                 return return_type_symbol;
 14612                 
 23623                 
 14613             }
 23624             }
 14614             
 23625             
       
 23626             
 14615             ERROR;
 23627             ERROR;
 14616         }
 23628         }
 14617         
 23629         
 14618     }/*function_bool_to_int*/
 23630     }/*function_bool_to_int*/
 14619     break;
 23631     break;
 14620 
 23632 
 14621 /****
 23633 /****
 14622  *BOOL_TO_DINT
 23634  *TIME_TO_REAL
 14623  */
 23635  */
 14624     case function_bool_to_dint :
 23636     case function_time_to_real :
 14625     {
 23637     {
 14626         symbol_c *last_type_symbol = NULL;
 23638         symbol_c *last_type_symbol = NULL;
 14627 
 23639 
 14628         {
 23640         {
 14629             symbol_c *IN_type_symbol = param_data_type;
 23641             symbol_c *IN_type_symbol = param_data_type;
 14630             last_type_symbol = param_data_type;
 23642             last_type_symbol = param_data_type;
 14631             
 23643             
 14632             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 23644             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23645             {
       
 23646         
       
 23647                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23648                 return return_type_symbol;
       
 23649                 
       
 23650             }
       
 23651             
       
 23652             
       
 23653             ERROR;
       
 23654         }
       
 23655         
       
 23656     }/*function_time_to_real*/
       
 23657     break;
       
 23658 
       
 23659 /****
       
 23660  *TIME_TO_SINT
       
 23661  */
       
 23662     case function_time_to_sint :
       
 23663     {
       
 23664         symbol_c *last_type_symbol = NULL;
       
 23665 
       
 23666         {
       
 23667             symbol_c *IN_type_symbol = param_data_type;
       
 23668             last_type_symbol = param_data_type;
       
 23669             
       
 23670             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23671             {
       
 23672         
       
 23673                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23674                 return return_type_symbol;
       
 23675                 
       
 23676             }
       
 23677             
       
 23678             
       
 23679             ERROR;
       
 23680         }
       
 23681         
       
 23682     }/*function_time_to_sint*/
       
 23683     break;
       
 23684 
       
 23685 /****
       
 23686  *TIME_TO_LINT
       
 23687  */
       
 23688     case function_time_to_lint :
       
 23689     {
       
 23690         symbol_c *last_type_symbol = NULL;
       
 23691 
       
 23692         {
       
 23693             symbol_c *IN_type_symbol = param_data_type;
       
 23694             last_type_symbol = param_data_type;
       
 23695             
       
 23696             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23697             {
       
 23698         
       
 23699                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23700                 return return_type_symbol;
       
 23701                 
       
 23702             }
       
 23703             
       
 23704             
       
 23705             ERROR;
       
 23706         }
       
 23707         
       
 23708     }/*function_time_to_lint*/
       
 23709     break;
       
 23710 
       
 23711 /****
       
 23712  *TIME_TO_DINT
       
 23713  */
       
 23714     case function_time_to_dint :
       
 23715     {
       
 23716         symbol_c *last_type_symbol = NULL;
       
 23717 
       
 23718         {
       
 23719             symbol_c *IN_type_symbol = param_data_type;
       
 23720             last_type_symbol = param_data_type;
       
 23721             
       
 23722             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 14633             {
 23723             {
 14634         
 23724         
 14635                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 23725                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 14636                 return return_type_symbol;
 23726                 return return_type_symbol;
 14637                 
 23727                 
 14638             }
 23728             }
 14639             
 23729             
 14640             ERROR;
 23730             
 14641         }
 23731             ERROR;
 14642         
 23732         }
 14643     }/*function_bool_to_dint*/
 23733         
 14644     break;
 23734     }/*function_time_to_dint*/
 14645 
 23735     break;
 14646 /****
 23736 
 14647  *BOOL_TO_LINT
 23737 /****
 14648  */
 23738  *TIME_TO_DWORD
 14649     case function_bool_to_lint :
 23739  */
 14650     {
 23740     case function_time_to_dword :
 14651         symbol_c *last_type_symbol = NULL;
 23741     {
 14652 
 23742         symbol_c *last_type_symbol = NULL;
 14653         {
 23743 
 14654             symbol_c *IN_type_symbol = param_data_type;
 23744         {
 14655             last_type_symbol = param_data_type;
 23745             symbol_c *IN_type_symbol = param_data_type;
 14656             
 23746             last_type_symbol = param_data_type;
 14657             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 23747             
       
 23748             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23749             {
       
 23750         
       
 23751                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 23752                 return return_type_symbol;
       
 23753                 
       
 23754             }
       
 23755             
       
 23756             
       
 23757             ERROR;
       
 23758         }
       
 23759         
       
 23760     }/*function_time_to_dword*/
       
 23761     break;
       
 23762 
       
 23763 /****
       
 23764  *TIME_TO_UDINT
       
 23765  */
       
 23766     case function_time_to_udint :
       
 23767     {
       
 23768         symbol_c *last_type_symbol = NULL;
       
 23769 
       
 23770         {
       
 23771             symbol_c *IN_type_symbol = param_data_type;
       
 23772             last_type_symbol = param_data_type;
       
 23773             
       
 23774             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23775             {
       
 23776         
       
 23777                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23778                 return return_type_symbol;
       
 23779                 
       
 23780             }
       
 23781             
       
 23782             
       
 23783             ERROR;
       
 23784         }
       
 23785         
       
 23786     }/*function_time_to_udint*/
       
 23787     break;
       
 23788 
       
 23789 /****
       
 23790  *TIME_TO_WORD
       
 23791  */
       
 23792     case function_time_to_word :
       
 23793     {
       
 23794         symbol_c *last_type_symbol = NULL;
       
 23795 
       
 23796         {
       
 23797             symbol_c *IN_type_symbol = param_data_type;
       
 23798             last_type_symbol = param_data_type;
       
 23799             
       
 23800             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23801             {
       
 23802         
       
 23803                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23804                 return return_type_symbol;
       
 23805                 
       
 23806             }
       
 23807             
       
 23808             
       
 23809             ERROR;
       
 23810         }
       
 23811         
       
 23812     }/*function_time_to_word*/
       
 23813     break;
       
 23814 
       
 23815 /****
       
 23816  *TIME_TO_STRING
       
 23817  */
       
 23818     case function_time_to_string :
       
 23819     {
       
 23820         symbol_c *last_type_symbol = NULL;
       
 23821 
       
 23822         {
       
 23823             symbol_c *IN_type_symbol = param_data_type;
       
 23824             last_type_symbol = param_data_type;
       
 23825             
       
 23826             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23827             {
       
 23828         
       
 23829                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23830                 return return_type_symbol;
       
 23831                 
       
 23832             }
       
 23833             
       
 23834             
       
 23835             ERROR;
       
 23836         }
       
 23837         
       
 23838     }/*function_time_to_string*/
       
 23839     break;
       
 23840 
       
 23841 /****
       
 23842  *TIME_TO_LWORD
       
 23843  */
       
 23844     case function_time_to_lword :
       
 23845     {
       
 23846         symbol_c *last_type_symbol = NULL;
       
 23847 
       
 23848         {
       
 23849             symbol_c *IN_type_symbol = param_data_type;
       
 23850             last_type_symbol = param_data_type;
       
 23851             
       
 23852             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23853             {
       
 23854         
       
 23855                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23856                 return return_type_symbol;
       
 23857                 
       
 23858             }
       
 23859             
       
 23860             
       
 23861             ERROR;
       
 23862         }
       
 23863         
       
 23864     }/*function_time_to_lword*/
       
 23865     break;
       
 23866 
       
 23867 /****
       
 23868  *TIME_TO_UINT
       
 23869  */
       
 23870     case function_time_to_uint :
       
 23871     {
       
 23872         symbol_c *last_type_symbol = NULL;
       
 23873 
       
 23874         {
       
 23875             symbol_c *IN_type_symbol = param_data_type;
       
 23876             last_type_symbol = param_data_type;
       
 23877             
       
 23878             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23879             {
       
 23880         
       
 23881                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23882                 return return_type_symbol;
       
 23883                 
       
 23884             }
       
 23885             
       
 23886             
       
 23887             ERROR;
       
 23888         }
       
 23889         
       
 23890     }/*function_time_to_uint*/
       
 23891     break;
       
 23892 
       
 23893 /****
       
 23894  *TIME_TO_LREAL
       
 23895  */
       
 23896     case function_time_to_lreal :
       
 23897     {
       
 23898         symbol_c *last_type_symbol = NULL;
       
 23899 
       
 23900         {
       
 23901             symbol_c *IN_type_symbol = param_data_type;
       
 23902             last_type_symbol = param_data_type;
       
 23903             
       
 23904             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23905             {
       
 23906         
       
 23907                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23908                 return return_type_symbol;
       
 23909                 
       
 23910             }
       
 23911             
       
 23912             
       
 23913             ERROR;
       
 23914         }
       
 23915         
       
 23916     }/*function_time_to_lreal*/
       
 23917     break;
       
 23918 
       
 23919 /****
       
 23920  *TIME_TO_BYTE
       
 23921  */
       
 23922     case function_time_to_byte :
       
 23923     {
       
 23924         symbol_c *last_type_symbol = NULL;
       
 23925 
       
 23926         {
       
 23927             symbol_c *IN_type_symbol = param_data_type;
       
 23928             last_type_symbol = param_data_type;
       
 23929             
       
 23930             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23931             {
       
 23932         
       
 23933                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23934                 return return_type_symbol;
       
 23935                 
       
 23936             }
       
 23937             
       
 23938             
       
 23939             ERROR;
       
 23940         }
       
 23941         
       
 23942     }/*function_time_to_byte*/
       
 23943     break;
       
 23944 
       
 23945 /****
       
 23946  *TIME_TO_USINT
       
 23947  */
       
 23948     case function_time_to_usint :
       
 23949     {
       
 23950         symbol_c *last_type_symbol = NULL;
       
 23951 
       
 23952         {
       
 23953             symbol_c *IN_type_symbol = param_data_type;
       
 23954             last_type_symbol = param_data_type;
       
 23955             
       
 23956             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23957             {
       
 23958         
       
 23959                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23960                 return return_type_symbol;
       
 23961                 
       
 23962             }
       
 23963             
       
 23964             
       
 23965             ERROR;
       
 23966         }
       
 23967         
       
 23968     }/*function_time_to_usint*/
       
 23969     break;
       
 23970 
       
 23971 /****
       
 23972  *TIME_TO_ULINT
       
 23973  */
       
 23974     case function_time_to_ulint :
       
 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_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 23983             {
       
 23984         
       
 23985                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23986                 return return_type_symbol;
       
 23987                 
       
 23988             }
       
 23989             
       
 23990             
       
 23991             ERROR;
       
 23992         }
       
 23993         
       
 23994     }/*function_time_to_ulint*/
       
 23995     break;
       
 23996 
       
 23997 /****
       
 23998  *TIME_TO_INT
       
 23999  */
       
 24000     case function_time_to_int :
       
 24001     {
       
 24002         symbol_c *last_type_symbol = NULL;
       
 24003 
       
 24004         {
       
 24005             symbol_c *IN_type_symbol = param_data_type;
       
 24006             last_type_symbol = param_data_type;
       
 24007             
       
 24008             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 24009             {
       
 24010         
       
 24011                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 24012                 return return_type_symbol;
       
 24013                 
       
 24014             }
       
 24015             
       
 24016             
       
 24017             ERROR;
       
 24018         }
       
 24019         
       
 24020     }/*function_time_to_int*/
       
 24021     break;
       
 24022 
       
 24023 /****
       
 24024  *INT_TO_REAL
       
 24025  */
       
 24026     case function_int_to_real :
       
 24027     {
       
 24028         symbol_c *last_type_symbol = NULL;
       
 24029 
       
 24030         {
       
 24031             symbol_c *IN_type_symbol = param_data_type;
       
 24032             last_type_symbol = param_data_type;
       
 24033             
       
 24034             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24035             {
       
 24036         
       
 24037                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 24038                 return return_type_symbol;
       
 24039                 
       
 24040             }
       
 24041             
       
 24042             
       
 24043             ERROR;
       
 24044         }
       
 24045         
       
 24046     }/*function_int_to_real*/
       
 24047     break;
       
 24048 
       
 24049 /****
       
 24050  *INT_TO_SINT
       
 24051  */
       
 24052     case function_int_to_sint :
       
 24053     {
       
 24054         symbol_c *last_type_symbol = NULL;
       
 24055 
       
 24056         {
       
 24057             symbol_c *IN_type_symbol = param_data_type;
       
 24058             last_type_symbol = param_data_type;
       
 24059             
       
 24060             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24061             {
       
 24062         
       
 24063                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 24064                 return return_type_symbol;
       
 24065                 
       
 24066             }
       
 24067             
       
 24068             
       
 24069             ERROR;
       
 24070         }
       
 24071         
       
 24072     }/*function_int_to_sint*/
       
 24073     break;
       
 24074 
       
 24075 /****
       
 24076  *INT_TO_LINT
       
 24077  */
       
 24078     case function_int_to_lint :
       
 24079     {
       
 24080         symbol_c *last_type_symbol = NULL;
       
 24081 
       
 24082         {
       
 24083             symbol_c *IN_type_symbol = param_data_type;
       
 24084             last_type_symbol = param_data_type;
       
 24085             
       
 24086             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 14658             {
 24087             {
 14659         
 24088         
 14660                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 24089                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 14661                 return return_type_symbol;
 24090                 return return_type_symbol;
 14662                 
 24091                 
 14663             }
 24092             }
 14664             
 24093             
 14665             ERROR;
 24094             
 14666         }
 24095             ERROR;
 14667         
 24096         }
 14668     }/*function_bool_to_lint*/
 24097         
 14669     break;
 24098     }/*function_int_to_lint*/
 14670 
 24099     break;
 14671 /****
 24100 
 14672  *BOOL_TO_USINT
 24101 /****
 14673  */
 24102  *INT_TO_DINT
 14674     case function_bool_to_usint :
 24103  */
 14675     {
 24104     case function_int_to_dint :
 14676         symbol_c *last_type_symbol = NULL;
 24105     {
 14677 
 24106         symbol_c *last_type_symbol = NULL;
 14678         {
 24107 
 14679             symbol_c *IN_type_symbol = param_data_type;
 24108         {
 14680             last_type_symbol = param_data_type;
 24109             symbol_c *IN_type_symbol = param_data_type;
 14681             
 24110             last_type_symbol = param_data_type;
 14682             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 24111             
       
 24112             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24113             {
       
 24114         
       
 24115                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 24116                 return return_type_symbol;
       
 24117                 
       
 24118             }
       
 24119             
       
 24120             
       
 24121             ERROR;
       
 24122         }
       
 24123         
       
 24124     }/*function_int_to_dint*/
       
 24125     break;
       
 24126 
       
 24127 /****
       
 24128  *INT_TO_DATE
       
 24129  */
       
 24130     case function_int_to_date :
       
 24131     {
       
 24132         symbol_c *last_type_symbol = NULL;
       
 24133 
       
 24134         {
       
 24135             symbol_c *IN_type_symbol = param_data_type;
       
 24136             last_type_symbol = param_data_type;
       
 24137             
       
 24138             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24139             {
       
 24140         
       
 24141                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 24142                 return return_type_symbol;
       
 24143                 
       
 24144             }
       
 24145             
       
 24146             
       
 24147             ERROR;
       
 24148         }
       
 24149         
       
 24150     }/*function_int_to_date*/
       
 24151     break;
       
 24152 
       
 24153 /****
       
 24154  *INT_TO_DWORD
       
 24155  */
       
 24156     case function_int_to_dword :
       
 24157     {
       
 24158         symbol_c *last_type_symbol = NULL;
       
 24159 
       
 24160         {
       
 24161             symbol_c *IN_type_symbol = param_data_type;
       
 24162             last_type_symbol = param_data_type;
       
 24163             
       
 24164             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24165             {
       
 24166         
       
 24167                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 24168                 return return_type_symbol;
       
 24169                 
       
 24170             }
       
 24171             
       
 24172             
       
 24173             ERROR;
       
 24174         }
       
 24175         
       
 24176     }/*function_int_to_dword*/
       
 24177     break;
       
 24178 
       
 24179 /****
       
 24180  *INT_TO_DT
       
 24181  */
       
 24182     case function_int_to_dt :
       
 24183     {
       
 24184         symbol_c *last_type_symbol = NULL;
       
 24185 
       
 24186         {
       
 24187             symbol_c *IN_type_symbol = param_data_type;
       
 24188             last_type_symbol = param_data_type;
       
 24189             
       
 24190             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24191             {
       
 24192         
       
 24193                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 24194                 return return_type_symbol;
       
 24195                 
       
 24196             }
       
 24197             
       
 24198             
       
 24199             ERROR;
       
 24200         }
       
 24201         
       
 24202     }/*function_int_to_dt*/
       
 24203     break;
       
 24204 
       
 24205 /****
       
 24206  *INT_TO_TOD
       
 24207  */
       
 24208     case function_int_to_tod :
       
 24209     {
       
 24210         symbol_c *last_type_symbol = NULL;
       
 24211 
       
 24212         {
       
 24213             symbol_c *IN_type_symbol = param_data_type;
       
 24214             last_type_symbol = param_data_type;
       
 24215             
       
 24216             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24217             {
       
 24218         
       
 24219                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24220                 return return_type_symbol;
       
 24221                 
       
 24222             }
       
 24223             
       
 24224             
       
 24225             ERROR;
       
 24226         }
       
 24227         
       
 24228     }/*function_int_to_tod*/
       
 24229     break;
       
 24230 
       
 24231 /****
       
 24232  *INT_TO_UDINT
       
 24233  */
       
 24234     case function_int_to_udint :
       
 24235     {
       
 24236         symbol_c *last_type_symbol = NULL;
       
 24237 
       
 24238         {
       
 24239             symbol_c *IN_type_symbol = param_data_type;
       
 24240             last_type_symbol = param_data_type;
       
 24241             
       
 24242             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24243             {
       
 24244         
       
 24245                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 24246                 return return_type_symbol;
       
 24247                 
       
 24248             }
       
 24249             
       
 24250             
       
 24251             ERROR;
       
 24252         }
       
 24253         
       
 24254     }/*function_int_to_udint*/
       
 24255     break;
       
 24256 
       
 24257 /****
       
 24258  *INT_TO_WORD
       
 24259  */
       
 24260     case function_int_to_word :
       
 24261     {
       
 24262         symbol_c *last_type_symbol = NULL;
       
 24263 
       
 24264         {
       
 24265             symbol_c *IN_type_symbol = param_data_type;
       
 24266             last_type_symbol = param_data_type;
       
 24267             
       
 24268             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24269             {
       
 24270         
       
 24271                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 24272                 return return_type_symbol;
       
 24273                 
       
 24274             }
       
 24275             
       
 24276             
       
 24277             ERROR;
       
 24278         }
       
 24279         
       
 24280     }/*function_int_to_word*/
       
 24281     break;
       
 24282 
       
 24283 /****
       
 24284  *INT_TO_STRING
       
 24285  */
       
 24286     case function_int_to_string :
       
 24287     {
       
 24288         symbol_c *last_type_symbol = NULL;
       
 24289 
       
 24290         {
       
 24291             symbol_c *IN_type_symbol = param_data_type;
       
 24292             last_type_symbol = param_data_type;
       
 24293             
       
 24294             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24295             {
       
 24296         
       
 24297                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 24298                 return return_type_symbol;
       
 24299                 
       
 24300             }
       
 24301             
       
 24302             
       
 24303             ERROR;
       
 24304         }
       
 24305         
       
 24306     }/*function_int_to_string*/
       
 24307     break;
       
 24308 
       
 24309 /****
       
 24310  *INT_TO_LWORD
       
 24311  */
       
 24312     case function_int_to_lword :
       
 24313     {
       
 24314         symbol_c *last_type_symbol = NULL;
       
 24315 
       
 24316         {
       
 24317             symbol_c *IN_type_symbol = param_data_type;
       
 24318             last_type_symbol = param_data_type;
       
 24319             
       
 24320             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24321             {
       
 24322         
       
 24323                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 24324                 return return_type_symbol;
       
 24325                 
       
 24326             }
       
 24327             
       
 24328             
       
 24329             ERROR;
       
 24330         }
       
 24331         
       
 24332     }/*function_int_to_lword*/
       
 24333     break;
       
 24334 
       
 24335 /****
       
 24336  *INT_TO_UINT
       
 24337  */
       
 24338     case function_int_to_uint :
       
 24339     {
       
 24340         symbol_c *last_type_symbol = NULL;
       
 24341 
       
 24342         {
       
 24343             symbol_c *IN_type_symbol = param_data_type;
       
 24344             last_type_symbol = param_data_type;
       
 24345             
       
 24346             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24347             {
       
 24348         
       
 24349                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 24350                 return return_type_symbol;
       
 24351                 
       
 24352             }
       
 24353             
       
 24354             
       
 24355             ERROR;
       
 24356         }
       
 24357         
       
 24358     }/*function_int_to_uint*/
       
 24359     break;
       
 24360 
       
 24361 /****
       
 24362  *INT_TO_LREAL
       
 24363  */
       
 24364     case function_int_to_lreal :
       
 24365     {
       
 24366         symbol_c *last_type_symbol = NULL;
       
 24367 
       
 24368         {
       
 24369             symbol_c *IN_type_symbol = param_data_type;
       
 24370             last_type_symbol = param_data_type;
       
 24371             
       
 24372             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24373             {
       
 24374         
       
 24375                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 24376                 return return_type_symbol;
       
 24377                 
       
 24378             }
       
 24379             
       
 24380             
       
 24381             ERROR;
       
 24382         }
       
 24383         
       
 24384     }/*function_int_to_lreal*/
       
 24385     break;
       
 24386 
       
 24387 /****
       
 24388  *INT_TO_BYTE
       
 24389  */
       
 24390     case function_int_to_byte :
       
 24391     {
       
 24392         symbol_c *last_type_symbol = NULL;
       
 24393 
       
 24394         {
       
 24395             symbol_c *IN_type_symbol = param_data_type;
       
 24396             last_type_symbol = param_data_type;
       
 24397             
       
 24398             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24399             {
       
 24400         
       
 24401                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 24402                 return return_type_symbol;
       
 24403                 
       
 24404             }
       
 24405             
       
 24406             
       
 24407             ERROR;
       
 24408         }
       
 24409         
       
 24410     }/*function_int_to_byte*/
       
 24411     break;
       
 24412 
       
 24413 /****
       
 24414  *INT_TO_USINT
       
 24415  */
       
 24416     case function_int_to_usint :
       
 24417     {
       
 24418         symbol_c *last_type_symbol = NULL;
       
 24419 
       
 24420         {
       
 24421             symbol_c *IN_type_symbol = param_data_type;
       
 24422             last_type_symbol = param_data_type;
       
 24423             
       
 24424             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 14683             {
 24425             {
 14684         
 24426         
 14685                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 24427                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 14686                 return return_type_symbol;
 24428                 return return_type_symbol;
 14687                 
 24429                 
 14688             }
 24430             }
 14689             
 24431             
 14690             ERROR;
 24432             
 14691         }
 24433             ERROR;
 14692         
 24434         }
 14693     }/*function_bool_to_usint*/
 24435         
 14694     break;
 24436     }/*function_int_to_usint*/
 14695 
 24437     break;
 14696 /****
 24438 
 14697  *BOOL_TO_UINT
 24439 /****
 14698  */
 24440  *INT_TO_ULINT
 14699     case function_bool_to_uint :
 24441  */
 14700     {
 24442     case function_int_to_ulint :
 14701         symbol_c *last_type_symbol = NULL;
 24443     {
 14702 
 24444         symbol_c *last_type_symbol = NULL;
 14703         {
 24445 
 14704             symbol_c *IN_type_symbol = param_data_type;
 24446         {
 14705             last_type_symbol = param_data_type;
 24447             symbol_c *IN_type_symbol = param_data_type;
 14706             
 24448             last_type_symbol = param_data_type;
 14707             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 24449             
       
 24450             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24451             {
       
 24452         
       
 24453                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 24454                 return return_type_symbol;
       
 24455                 
       
 24456             }
       
 24457             
       
 24458             
       
 24459             ERROR;
       
 24460         }
       
 24461         
       
 24462     }/*function_int_to_ulint*/
       
 24463     break;
       
 24464 
       
 24465 /****
       
 24466  *INT_TO_BOOL
       
 24467  */
       
 24468     case function_int_to_bool :
       
 24469     {
       
 24470         symbol_c *last_type_symbol = NULL;
       
 24471 
       
 24472         {
       
 24473             symbol_c *IN_type_symbol = param_data_type;
       
 24474             last_type_symbol = param_data_type;
       
 24475             
       
 24476             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24477             {
       
 24478         
       
 24479                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 24480                 return return_type_symbol;
       
 24481                 
       
 24482             }
       
 24483             
       
 24484             
       
 24485             ERROR;
       
 24486         }
       
 24487         
       
 24488     }/*function_int_to_bool*/
       
 24489     break;
       
 24490 
       
 24491 /****
       
 24492  *INT_TO_TIME
       
 24493  */
       
 24494     case function_int_to_time :
       
 24495     {
       
 24496         symbol_c *last_type_symbol = NULL;
       
 24497 
       
 24498         {
       
 24499             symbol_c *IN_type_symbol = param_data_type;
       
 24500             last_type_symbol = param_data_type;
       
 24501             
       
 24502             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
       
 24503             {
       
 24504         
       
 24505                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 24506                 return return_type_symbol;
       
 24507                 
       
 24508             }
       
 24509             
       
 24510             
       
 24511             ERROR;
       
 24512         }
       
 24513         
       
 24514     }/*function_int_to_time*/
       
 24515     break;
       
 24516 
       
 24517 /****
       
 24518  *TRUNC
       
 24519  */
       
 24520     case function_trunc :
       
 24521     {
       
 24522         symbol_c *last_type_symbol = NULL;
       
 24523 
       
 24524         {
       
 24525             symbol_c *IN_type_symbol = param_data_type;
       
 24526             last_type_symbol = param_data_type;
       
 24527             
       
 24528             if(search_expression_type->is_real_type(IN_type_symbol))
       
 24529             {
       
 24530         
       
 24531                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 24532                 return return_type_symbol;
       
 24533                 
       
 24534             }
       
 24535             
       
 24536             
       
 24537             ERROR;
       
 24538         }
       
 24539         
       
 24540     }/*function_trunc*/
       
 24541     break;
       
 24542 
       
 24543 /****
       
 24544  *BCD_TO_UDINT
       
 24545  */
       
 24546     case function_bcd_to_udint :
       
 24547     {
       
 24548         symbol_c *last_type_symbol = NULL;
       
 24549 
       
 24550         {
       
 24551             symbol_c *IN_type_symbol = param_data_type;
       
 24552             last_type_symbol = param_data_type;
       
 24553             
       
 24554             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 24555             {
       
 24556         
       
 24557                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 24558                 return return_type_symbol;
       
 24559                 
       
 24560             }
       
 24561             
       
 24562             
       
 24563             ERROR;
       
 24564         }
       
 24565         
       
 24566     }/*function_bcd_to_udint*/
       
 24567     break;
       
 24568 
       
 24569 /****
       
 24570  *BCD_TO_UINT
       
 24571  */
       
 24572     case function_bcd_to_uint :
       
 24573     {
       
 24574         symbol_c *last_type_symbol = NULL;
       
 24575 
       
 24576         {
       
 24577             symbol_c *IN_type_symbol = param_data_type;
       
 24578             last_type_symbol = param_data_type;
       
 24579             
       
 24580             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
 14708             {
 24581             {
 14709         
 24582         
 14710                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 24583                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 14711                 return return_type_symbol;
 24584                 return return_type_symbol;
 14712                 
 24585                 
 14713             }
 24586             }
 14714             
 24587             
 14715             ERROR;
 24588             
 14716         }
 24589             ERROR;
 14717         
 24590         }
 14718     }/*function_bool_to_uint*/
 24591         
 14719     break;
 24592     }/*function_bcd_to_uint*/
 14720 
 24593     break;
 14721 /****
 24594 
 14722  *BOOL_TO_UDINT
 24595 /****
 14723  */
 24596  *BCD_TO_ULINT
 14724     case function_bool_to_udint :
 24597  */
 14725     {
 24598     case function_bcd_to_ulint :
 14726         symbol_c *last_type_symbol = NULL;
 24599     {
 14727 
 24600         symbol_c *last_type_symbol = NULL;
 14728         {
 24601 
 14729             symbol_c *IN_type_symbol = param_data_type;
 24602         {
 14730             last_type_symbol = param_data_type;
 24603             symbol_c *IN_type_symbol = param_data_type;
 14731             
 24604             last_type_symbol = param_data_type;
 14732             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 24605             
 14733             {
 24606             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
 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             {
 24607             {
 14759         
 24608         
 14760                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 24609                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 14761                 return return_type_symbol;
 24610                 return return_type_symbol;
 14762                 
 24611                 
 14763             }
 24612             }
 14764             
 24613             
 14765             ERROR;
 24614             
 14766         }
 24615             ERROR;
 14767         
 24616         }
 14768     }/*function_bool_to_ulint*/
 24617         
 14769     break;
 24618     }/*function_bcd_to_ulint*/
 14770 
 24619     break;
 14771 /****
 24620 
 14772  *BOOL_TO_REAL
 24621 /****
 14773  */
 24622  *BCD_TO_USINT
 14774     case function_bool_to_real :
 24623  */
 14775     {
 24624     case function_bcd_to_usint :
 14776         symbol_c *last_type_symbol = NULL;
 24625     {
 14777 
 24626         symbol_c *last_type_symbol = NULL;
 14778         {
 24627 
 14779             symbol_c *IN_type_symbol = param_data_type;
 24628         {
 14780             last_type_symbol = param_data_type;
 24629             symbol_c *IN_type_symbol = param_data_type;
 14781             
 24630             last_type_symbol = param_data_type;
 14782             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 24631             
 14783             {
 24632             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
 14784         
 24633             {
 14785                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 24634         
 14786                 return return_type_symbol;
 24635                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 14787                 
 24636                 return return_type_symbol;
 14788             }
 24637                 
 14789             
 24638             }
 14790             ERROR;
 24639             
 14791         }
 24640             
 14792         
 24641             ERROR;
 14793     }/*function_bool_to_real*/
 24642         }
 14794     break;
 24643         
 14795 
 24644     }/*function_bcd_to_usint*/
 14796 /****
 24645     break;
 14797  *BOOL_TO_LREAL
 24646 
 14798  */
 24647 /****
 14799     case function_bool_to_lreal :
 24648  *UDINT_TO_BCD
 14800     {
 24649  */
 14801         symbol_c *last_type_symbol = NULL;
 24650     case function_udint_to_bcd :
 14802 
 24651     {
 14803         {
 24652         symbol_c *last_type_symbol = NULL;
 14804             symbol_c *IN_type_symbol = param_data_type;
 24653 
 14805             last_type_symbol = param_data_type;
 24654         {
 14806             
 24655             symbol_c *IN_type_symbol = param_data_type;
 14807             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 24656             last_type_symbol = param_data_type;
 14808             {
 24657             
 14809         
 24658             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 14810                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 24659             {
 14811                 return return_type_symbol;
 24660         
 14812                 
 24661                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 14813             }
 24662                 return return_type_symbol;
 14814             
 24663                 
 14815             ERROR;
 24664             }
 14816         }
 24665             
 14817         
 24666             
 14818     }/*function_bool_to_lreal*/
 24667             ERROR;
 14819     break;
 24668         }
 14820 
 24669         
 14821 /****
 24670     }/*function_udint_to_bcd*/
 14822  *BOOL_TO_TIME
 24671     break;
 14823  */
 24672 
 14824     case function_bool_to_time :
 24673 /****
 14825     {
 24674  *UINT_TO_BCD
 14826         symbol_c *last_type_symbol = NULL;
 24675  */
 14827 
 24676     case function_uint_to_bcd :
 14828         {
 24677     {
 14829             symbol_c *IN_type_symbol = param_data_type;
 24678         symbol_c *last_type_symbol = NULL;
 14830             last_type_symbol = param_data_type;
 24679 
 14831             
 24680         {
 14832             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 24681             symbol_c *IN_type_symbol = param_data_type;
 14833             {
 24682             last_type_symbol = param_data_type;
 14834         
 24683             
 14835                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24684             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 14836                 return return_type_symbol;
 24685             {
 14837                 
 24686         
 14838             }
 24687                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 14839             
 24688                 return return_type_symbol;
 14840             ERROR;
 24689                 
 14841         }
 24690             }
 14842         
 24691             
 14843     }/*function_bool_to_time*/
 24692             
 14844     break;
 24693             ERROR;
 14845 
 24694         }
 14846 /****
 24695         
 14847  *BOOL_TO_DATE
 24696     }/*function_uint_to_bcd*/
 14848  */
 24697     break;
 14849     case function_bool_to_date :
 24698 
 14850     {
 24699 /****
 14851         symbol_c *last_type_symbol = NULL;
 24700  *USINT_TO_BCD
 14852 
 24701  */
 14853         {
 24702     case function_usint_to_bcd :
 14854             symbol_c *IN_type_symbol = param_data_type;
 24703     {
 14855             last_type_symbol = param_data_type;
 24704         symbol_c *last_type_symbol = NULL;
 14856             
 24705 
 14857             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 24706         {
       
 24707             symbol_c *IN_type_symbol = param_data_type;
       
 24708             last_type_symbol = param_data_type;
       
 24709             
       
 24710             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
       
 24711             {
       
 24712         
       
 24713                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 24714                 return return_type_symbol;
       
 24715                 
       
 24716             }
       
 24717             
       
 24718             
       
 24719             ERROR;
       
 24720         }
       
 24721         
       
 24722     }/*function_usint_to_bcd*/
       
 24723     break;
       
 24724 
       
 24725 /****
       
 24726  *ULINT_TO_BCD
       
 24727  */
       
 24728     case function_ulint_to_bcd :
       
 24729     {
       
 24730         symbol_c *last_type_symbol = NULL;
       
 24731 
       
 24732         {
       
 24733             symbol_c *IN_type_symbol = param_data_type;
       
 24734             last_type_symbol = param_data_type;
       
 24735             
       
 24736             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
       
 24737             {
       
 24738         
       
 24739                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 24740                 return return_type_symbol;
       
 24741                 
       
 24742             }
       
 24743             
       
 24744             
       
 24745             ERROR;
       
 24746         }
       
 24747         
       
 24748     }/*function_ulint_to_bcd*/
       
 24749     break;
       
 24750 
       
 24751 /****
       
 24752  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 24753  */
       
 24754     case function_date_and_time_to_time_of_day :
       
 24755     {
       
 24756         symbol_c *last_type_symbol = NULL;
       
 24757 
       
 24758         {
       
 24759             symbol_c *IN_type_symbol = param_data_type;
       
 24760             last_type_symbol = param_data_type;
       
 24761             
       
 24762             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 24763             {
       
 24764         
       
 24765                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24766                 return return_type_symbol;
       
 24767                 
       
 24768             }
       
 24769             
       
 24770             
       
 24771             ERROR;
       
 24772         }
       
 24773         
       
 24774     }/*function_date_and_time_to_time_of_day*/
       
 24775     break;
       
 24776 
       
 24777 /****
       
 24778  *DATE_AND_TIME_TO_DATE
       
 24779  */
       
 24780     case function_date_and_time_to_date :
       
 24781     {
       
 24782         symbol_c *last_type_symbol = NULL;
       
 24783 
       
 24784         {
       
 24785             symbol_c *IN_type_symbol = param_data_type;
       
 24786             last_type_symbol = param_data_type;
       
 24787             
       
 24788             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 14858             {
 24789             {
 14859         
 24790         
 14860                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 24791                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 14861                 return return_type_symbol;
 24792                 return return_type_symbol;
 14862                 
 24793                 
 14863             }
 24794             }
 14864             
 24795             
 14865             ERROR;
 24796             
 14866         }
 24797             ERROR;
 14867         
 24798         }
 14868     }/*function_bool_to_date*/
 24799         
 14869     break;
 24800     }/*function_date_and_time_to_date*/
 14870 
 24801     break;
 14871 /****
 24802 
 14872  *BOOL_TO_TOD
 24803 /****
 14873  */
 24804  *ABS
 14874     case function_bool_to_tod :
 24805  */
 14875     {
 24806     case function_abs :
 14876         symbol_c *last_type_symbol = NULL;
 24807     {
 14877 
 24808         symbol_c *last_type_symbol = NULL;
 14878         {
 24809 
 14879             symbol_c *IN_type_symbol = param_data_type;
 24810         {
 14880             last_type_symbol = param_data_type;
 24811             symbol_c *IN_type_symbol = param_data_type;
 14881             
 24812             last_type_symbol = param_data_type;
 14882             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 24813             
 14883             {
 24814             if(search_expression_type->is_num_type(IN_type_symbol))
 14884         
 24815             {
 14885                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 24816         
 14886                 return return_type_symbol;
 24817                 symbol_c * return_type_symbol = IN_type_symbol;
 14887                 
 24818                 return return_type_symbol;
 14888             }
 24819                 
 14889             
 24820             }
 14890             ERROR;
 24821             
 14891         }
 24822             
 14892         
 24823             ERROR;
 14893     }/*function_bool_to_tod*/
 24824         }
 14894     break;
 24825         
 14895 
 24826     }/*function_abs*/
 14896 /****
 24827     break;
 14897  *BOOL_TO_DT
 24828 
 14898  */
 24829 /****
 14899     case function_bool_to_dt :
 24830  *SQRT
 14900     {
 24831  */
 14901         symbol_c *last_type_symbol = NULL;
 24832     case function_sqrt :
 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     {
 24833     {
 23676         symbol_c *last_type_symbol = NULL;
 24834         symbol_c *last_type_symbol = NULL;
 23677 
 24835 
 23678         {
 24836         {
 23679             symbol_c *IN_type_symbol = param_data_type;
 24837             symbol_c *IN_type_symbol = param_data_type;
 23680             last_type_symbol = param_data_type;
 24838             last_type_symbol = param_data_type;
 23681             
 24839             
 23682             if(search_expression_type->is_real_type(IN_type_symbol))
 24840             if(search_expression_type->is_real_type(IN_type_symbol))
 23683             {
 24841             {
 23684         
 24842         
 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;
 24843                 symbol_c * return_type_symbol = IN_type_symbol;
 23961                 return return_type_symbol;
 24844                 return return_type_symbol;
 23962                 
 24845                 
 23963             }
 24846             }
 23964             
 24847             
 23965             ERROR;
 24848             
 23966         }
 24849             ERROR;
 23967         
 24850         }
 23968     }/*function_abs*/
 24851         
 23969     break;
 24852     }/*function_sqrt*/
 23970 
 24853     break;
 23971 /****
 24854 
 23972  *SQRT
 24855 /****
 23973  */
 24856  *LN
 23974     case function_sqrt :
 24857  */
       
 24858     case function_ln :
 23975     {
 24859     {
 23976         symbol_c *last_type_symbol = NULL;
 24860         symbol_c *last_type_symbol = NULL;
 23977 
 24861 
 23978         {
 24862         {
 23979             symbol_c *IN_type_symbol = param_data_type;
 24863             symbol_c *IN_type_symbol = param_data_type;
 23985                 symbol_c * return_type_symbol = IN_type_symbol;
 24869                 symbol_c * return_type_symbol = IN_type_symbol;
 23986                 return return_type_symbol;
 24870                 return return_type_symbol;
 23987                 
 24871                 
 23988             }
 24872             }
 23989             
 24873             
 23990             ERROR;
 24874             
 23991         }
 24875             ERROR;
 23992         
 24876         }
 23993     }/*function_sqrt*/
 24877         
 23994     break;
 24878     }/*function_ln*/
 23995 
 24879     break;
 23996 /****
 24880 
 23997  *LN
 24881 /****
 23998  */
 24882  *LOG
 23999     case function_ln :
 24883  */
       
 24884     case function_log :
 24000     {
 24885     {
 24001         symbol_c *last_type_symbol = NULL;
 24886         symbol_c *last_type_symbol = NULL;
 24002 
 24887 
 24003         {
 24888         {
 24004             symbol_c *IN_type_symbol = param_data_type;
 24889             symbol_c *IN_type_symbol = param_data_type;
 24010                 symbol_c * return_type_symbol = IN_type_symbol;
 24895                 symbol_c * return_type_symbol = IN_type_symbol;
 24011                 return return_type_symbol;
 24896                 return return_type_symbol;
 24012                 
 24897                 
 24013             }
 24898             }
 24014             
 24899             
 24015             ERROR;
 24900             
 24016         }
 24901             ERROR;
 24017         
 24902         }
 24018     }/*function_ln*/
 24903         
 24019     break;
 24904     }/*function_log*/
 24020 
 24905     break;
 24021 /****
 24906 
 24022  *LOG
 24907 /****
 24023  */
 24908  *EXP
 24024     case function_log :
 24909  */
       
 24910     case function_exp :
 24025     {
 24911     {
 24026         symbol_c *last_type_symbol = NULL;
 24912         symbol_c *last_type_symbol = NULL;
 24027 
 24913 
 24028         {
 24914         {
 24029             symbol_c *IN_type_symbol = param_data_type;
 24915             symbol_c *IN_type_symbol = param_data_type;
 24035                 symbol_c * return_type_symbol = IN_type_symbol;
 24921                 symbol_c * return_type_symbol = IN_type_symbol;
 24036                 return return_type_symbol;
 24922                 return return_type_symbol;
 24037                 
 24923                 
 24038             }
 24924             }
 24039             
 24925             
 24040             ERROR;
 24926             
 24041         }
 24927             ERROR;
 24042         
 24928         }
 24043     }/*function_log*/
 24929         
 24044     break;
 24930     }/*function_exp*/
 24045 
 24931     break;
 24046 /****
 24932 
 24047  *EXP
 24933 /****
 24048  */
 24934  *SIN
 24049     case function_exp :
 24935  */
       
 24936     case function_sin :
 24050     {
 24937     {
 24051         symbol_c *last_type_symbol = NULL;
 24938         symbol_c *last_type_symbol = NULL;
 24052 
 24939 
 24053         {
 24940         {
 24054             symbol_c *IN_type_symbol = param_data_type;
 24941             symbol_c *IN_type_symbol = param_data_type;
 24060                 symbol_c * return_type_symbol = IN_type_symbol;
 24947                 symbol_c * return_type_symbol = IN_type_symbol;
 24061                 return return_type_symbol;
 24948                 return return_type_symbol;
 24062                 
 24949                 
 24063             }
 24950             }
 24064             
 24951             
 24065             ERROR;
 24952             
 24066         }
 24953             ERROR;
 24067         
 24954         }
 24068     }/*function_exp*/
 24955         
 24069     break;
 24956     }/*function_sin*/
 24070 
 24957     break;
 24071 /****
 24958 
 24072  *SIN
 24959 /****
 24073  */
 24960  *COS
 24074     case function_sin :
 24961  */
       
 24962     case function_cos :
 24075     {
 24963     {
 24076         symbol_c *last_type_symbol = NULL;
 24964         symbol_c *last_type_symbol = NULL;
 24077 
 24965 
 24078         {
 24966         {
 24079             symbol_c *IN_type_symbol = param_data_type;
 24967             symbol_c *IN_type_symbol = param_data_type;
 24085                 symbol_c * return_type_symbol = IN_type_symbol;
 24973                 symbol_c * return_type_symbol = IN_type_symbol;
 24086                 return return_type_symbol;
 24974                 return return_type_symbol;
 24087                 
 24975                 
 24088             }
 24976             }
 24089             
 24977             
 24090             ERROR;
 24978             
 24091         }
 24979             ERROR;
 24092         
 24980         }
 24093     }/*function_sin*/
 24981         
 24094     break;
 24982     }/*function_cos*/
 24095 
 24983     break;
 24096 /****
 24984 
 24097  *COS
 24985 /****
 24098  */
 24986  *TAN
 24099     case function_cos :
 24987  */
       
 24988     case function_tan :
 24100     {
 24989     {
 24101         symbol_c *last_type_symbol = NULL;
 24990         symbol_c *last_type_symbol = NULL;
 24102 
 24991 
 24103         {
 24992         {
 24104             symbol_c *IN_type_symbol = param_data_type;
 24993             symbol_c *IN_type_symbol = param_data_type;
 24110                 symbol_c * return_type_symbol = IN_type_symbol;
 24999                 symbol_c * return_type_symbol = IN_type_symbol;
 24111                 return return_type_symbol;
 25000                 return return_type_symbol;
 24112                 
 25001                 
 24113             }
 25002             }
 24114             
 25003             
 24115             ERROR;
 25004             
 24116         }
 25005             ERROR;
 24117         
 25006         }
 24118     }/*function_cos*/
 25007         
 24119     break;
 25008     }/*function_tan*/
 24120 
 25009     break;
 24121 /****
 25010 
 24122  *TAN
 25011 /****
 24123  */
 25012  *ASIN
 24124     case function_tan :
 25013  */
       
 25014     case function_asin :
 24125     {
 25015     {
 24126         symbol_c *last_type_symbol = NULL;
 25016         symbol_c *last_type_symbol = NULL;
 24127 
 25017 
 24128         {
 25018         {
 24129             symbol_c *IN_type_symbol = param_data_type;
 25019             symbol_c *IN_type_symbol = param_data_type;
 24135                 symbol_c * return_type_symbol = IN_type_symbol;
 25025                 symbol_c * return_type_symbol = IN_type_symbol;
 24136                 return return_type_symbol;
 25026                 return return_type_symbol;
 24137                 
 25027                 
 24138             }
 25028             }
 24139             
 25029             
 24140             ERROR;
 25030             
 24141         }
 25031             ERROR;
 24142         
 25032         }
 24143     }/*function_tan*/
 25033         
 24144     break;
 25034     }/*function_asin*/
 24145 
 25035     break;
 24146 /****
 25036 
 24147  *ASIN
 25037 /****
 24148  */
 25038  *ACOS
 24149     case function_asin :
 25039  */
       
 25040     case function_acos :
 24150     {
 25041     {
 24151         symbol_c *last_type_symbol = NULL;
 25042         symbol_c *last_type_symbol = NULL;
 24152 
 25043 
 24153         {
 25044         {
 24154             symbol_c *IN_type_symbol = param_data_type;
 25045             symbol_c *IN_type_symbol = param_data_type;
 24160                 symbol_c * return_type_symbol = IN_type_symbol;
 25051                 symbol_c * return_type_symbol = IN_type_symbol;
 24161                 return return_type_symbol;
 25052                 return return_type_symbol;
 24162                 
 25053                 
 24163             }
 25054             }
 24164             
 25055             
 24165             ERROR;
 25056             
 24166         }
 25057             ERROR;
 24167         
 25058         }
 24168     }/*function_asin*/
 25059         
 24169     break;
 25060     }/*function_acos*/
 24170 
 25061     break;
 24171 /****
 25062 
 24172  *ACOS
 25063 /****
 24173  */
 25064  *ATAN
 24174     case function_acos :
 25065  */
       
 25066     case function_atan :
 24175     {
 25067     {
 24176         symbol_c *last_type_symbol = NULL;
 25068         symbol_c *last_type_symbol = NULL;
 24177 
 25069 
 24178         {
 25070         {
 24179             symbol_c *IN_type_symbol = param_data_type;
 25071             symbol_c *IN_type_symbol = param_data_type;
 24185                 symbol_c * return_type_symbol = IN_type_symbol;
 25077                 symbol_c * return_type_symbol = IN_type_symbol;
 24186                 return return_type_symbol;
 25078                 return return_type_symbol;
 24187                 
 25079                 
 24188             }
 25080             }
 24189             
 25081             
 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             
 25082             
 24215             ERROR;
 25083             ERROR;
 24216         }
 25084         }
 24217         
 25085         
 24218     }/*function_atan*/
 25086     }/*function_atan*/
 24249                         symbol_c * return_type_symbol = last_type_symbol;
 25117                         symbol_c * return_type_symbol = last_type_symbol;
 24250                         return return_type_symbol;
 25118                         return return_type_symbol;
 24251                         
 25119                         
 24252                     }
 25120                     }
 24253                     
 25121                     
       
 25122                     
 24254                     ERROR;
 25123                     ERROR;
 24255                 }
 25124                 }
 24256                 
 25125                 
 24257             }
 25126             }
 24258             
 25127             
 24276                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 25145                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 24277                         return return_type_symbol;
 25146                         return return_type_symbol;
 24278                         
 25147                         
 24279                     }
 25148                     }
 24280                     
 25149                     
       
 25150                     
 24281                     ERROR;
 25151                     ERROR;
 24282                 }
 25152                 }
 24283                 
 25153                 
 24284             }
 25154             }
 24285             
 25155             
 24303                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 25173                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 24304                         return return_type_symbol;
 25174                         return return_type_symbol;
 24305                         
 25175                         
 24306                     }
 25176                     }
 24307                     
 25177                     
       
 25178                     
 24308                     ERROR;
 25179                     ERROR;
 24309                 }
 25180                 }
 24310                 
 25181                 
 24311             }
 25182             }
 24312             
 25183             
 24330                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 25201                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24331                         return return_type_symbol;
 25202                         return return_type_symbol;
 24332                         
 25203                         
 24333                     }
 25204                     }
 24334                     
 25205                     
       
 25206                     
 24335                     ERROR;
 25207                     ERROR;
 24336                 }
 25208                 }
 24337                 
 25209                 
 24338             }
 25210             }
       
 25211             
 24339             
 25212             
 24340             ERROR;
 25213             ERROR;
 24341         }
 25214         }
 24342         
 25215         
 24343     }/*function_add*/
 25216     }/*function_add*/
 24374                         symbol_c * return_type_symbol = last_type_symbol;
 25247                         symbol_c * return_type_symbol = last_type_symbol;
 24375                         return return_type_symbol;
 25248                         return return_type_symbol;
 24376                         
 25249                         
 24377                     }
 25250                     }
 24378                     
 25251                     
       
 25252                     
 24379                     ERROR;
 25253                     ERROR;
 24380                 }
 25254                 }
 24381                 
 25255                 
 24382             }
 25256             }
 24383             
 25257             
 24401                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 25275                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24402                         return return_type_symbol;
 25276                         return return_type_symbol;
 24403                         
 25277                         
 24404                     }
 25278                     }
 24405                     
 25279                     
       
 25280                     
 24406                     ERROR;
 25281                     ERROR;
 24407                 }
 25282                 }
 24408                 
 25283                 
 24409             }
 25284             }
       
 25285             
 24410             
 25286             
 24411             ERROR;
 25287             ERROR;
 24412         }
 25288         }
 24413         
 25289         
 24414     }/*function_mul*/
 25290     }/*function_mul*/
 24445                         symbol_c * return_type_symbol = last_type_symbol;
 25321                         symbol_c * return_type_symbol = last_type_symbol;
 24446                         return return_type_symbol;
 25322                         return return_type_symbol;
 24447                         
 25323                         
 24448                     }
 25324                     }
 24449                     
 25325                     
       
 25326                     
 24450                     ERROR;
 25327                     ERROR;
 24451                 }
 25328                 }
 24452                 
 25329                 
 24453             }
 25330             }
 24454             
 25331             
 24472                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 25349                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24473                         return return_type_symbol;
 25350                         return return_type_symbol;
 24474                         
 25351                         
 24475                     }
 25352                     }
 24476                     
 25353                     
       
 25354                     
 24477                     ERROR;
 25355                     ERROR;
 24478                 }
 25356                 }
 24479                 
 25357                 
 24480             }
 25358             }
 24481             
 25359             
 24507                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 25385                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 24508                         return return_type_symbol;
 25386                         return return_type_symbol;
 24509                         
 25387                         
 24510                     }
 25388                     }
 24511                     
 25389                     
       
 25390                     
 24512                     ERROR;
 25391                     ERROR;
 24513                 }
 25392                 }
 24514                 
 25393                 
 24515             }
 25394             }
 24516             
 25395             
 24542                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 25421                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 24543                         return return_type_symbol;
 25422                         return return_type_symbol;
 24544                         
 25423                         
 24545                     }
 25424                     }
 24546                     
 25425                     
       
 25426                     
 24547                     ERROR;
 25427                     ERROR;
 24548                 }
 25428                 }
 24549                 
 25429                 
 24550             }
 25430             }
 24551             
 25431             
 24569                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 25449                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24570                         return return_type_symbol;
 25450                         return return_type_symbol;
 24571                         
 25451                         
 24572                     }
 25452                     }
 24573                     
 25453                     
       
 25454                     
 24574                     ERROR;
 25455                     ERROR;
 24575                 }
 25456                 }
 24576                 
 25457                 
 24577             }
 25458             }
       
 25459             
 24578             
 25460             
 24579             ERROR;
 25461             ERROR;
 24580         }
 25462         }
 24581         
 25463         
 24582     }/*function_sub*/
 25464     }/*function_sub*/
 24613                         symbol_c * return_type_symbol = last_type_symbol;
 25495                         symbol_c * return_type_symbol = last_type_symbol;
 24614                         return return_type_symbol;
 25496                         return return_type_symbol;
 24615                         
 25497                         
 24616                     }
 25498                     }
 24617                     
 25499                     
       
 25500                     
 24618                     ERROR;
 25501                     ERROR;
 24619                 }
 25502                 }
 24620                 
 25503                 
 24621             }
 25504             }
 24622             
 25505             
 24640                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 25523                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24641                         return return_type_symbol;
 25524                         return return_type_symbol;
 24642                         
 25525                         
 24643                     }
 25526                     }
 24644                     
 25527                     
       
 25528                     
 24645                     ERROR;
 25529                     ERROR;
 24646                 }
 25530                 }
 24647                 
 25531                 
 24648             }
 25532             }
       
 25533             
 24649             
 25534             
 24650             ERROR;
 25535             ERROR;
 24651         }
 25536         }
 24652         
 25537         
 24653     }/*function_div*/
 25538     }/*function_div*/
 24684                         symbol_c * return_type_symbol = last_type_symbol;
 25569                         symbol_c * return_type_symbol = last_type_symbol;
 24685                         return return_type_symbol;
 25570                         return return_type_symbol;
 24686                         
 25571                         
 24687                     }
 25572                     }
 24688                     
 25573                     
       
 25574                     
 24689                     ERROR;
 25575                     ERROR;
 24690                 }
 25576                 }
 24691                 
 25577                 
 24692             }
 25578             }
       
 25579             
 24693             
 25580             
 24694             ERROR;
 25581             ERROR;
 24695         }
 25582         }
 24696         
 25583         
 24697     }/*function_mod*/
 25584     }/*function_mod*/
 24728                         symbol_c * return_type_symbol = last_type_symbol;
 25615                         symbol_c * return_type_symbol = last_type_symbol;
 24729                         return return_type_symbol;
 25616                         return return_type_symbol;
 24730                         
 25617                         
 24731                     }
 25618                     }
 24732                     
 25619                     
       
 25620                     
 24733                     ERROR;
 25621                     ERROR;
 24734                 }
 25622                 }
 24735                 
 25623                 
 24736             }
 25624             }
 24737             
 25625             
       
 25626             
 24738             ERROR;
 25627             ERROR;
 24739         }
 25628         }
 24740         
 25629         
 24741     }/*function_expt*/
 25630     }/*function_expt*/
 24742     break;
 25631     break;
 24757         
 25646         
 24758                 symbol_c * return_type_symbol = last_type_symbol;
 25647                 symbol_c * return_type_symbol = last_type_symbol;
 24759                 return return_type_symbol;
 25648                 return return_type_symbol;
 24760                 
 25649                 
 24761             }
 25650             }
       
 25651             
 24762             
 25652             
 24763             ERROR;
 25653             ERROR;
 24764         }
 25654         }
 24765         
 25655         
 24766     }/*function_move*/
 25656     }/*function_move*/
 24797                         symbol_c * return_type_symbol = IN_type_symbol;
 25687                         symbol_c * return_type_symbol = IN_type_symbol;
 24798                         return return_type_symbol;
 25688                         return return_type_symbol;
 24799                         
 25689                         
 24800                     }
 25690                     }
 24801                     
 25691                     
       
 25692                     
 24802                     ERROR;
 25693                     ERROR;
 24803                 }
 25694                 }
 24804                 
 25695                 
 24805             }
 25696             }
       
 25697             
 24806             
 25698             
 24807             ERROR;
 25699             ERROR;
 24808         }
 25700         }
 24809         
 25701         
 24810     }/*function_shl*/
 25702     }/*function_shl*/
 24841                         symbol_c * return_type_symbol = IN_type_symbol;
 25733                         symbol_c * return_type_symbol = IN_type_symbol;
 24842                         return return_type_symbol;
 25734                         return return_type_symbol;
 24843                         
 25735                         
 24844                     }
 25736                     }
 24845                     
 25737                     
       
 25738                     
 24846                     ERROR;
 25739                     ERROR;
 24847                 }
 25740                 }
 24848                 
 25741                 
 24849             }
 25742             }
       
 25743             
 24850             
 25744             
 24851             ERROR;
 25745             ERROR;
 24852         }
 25746         }
 24853         
 25747         
 24854     }/*function_shr*/
 25748     }/*function_shr*/
 24885                         symbol_c * return_type_symbol = IN_type_symbol;
 25779                         symbol_c * return_type_symbol = IN_type_symbol;
 24886                         return return_type_symbol;
 25780                         return return_type_symbol;
 24887                         
 25781                         
 24888                     }
 25782                     }
 24889                     
 25783                     
       
 25784                     
 24890                     ERROR;
 25785                     ERROR;
 24891                 }
 25786                 }
 24892                 
 25787                 
 24893             }
 25788             }
       
 25789             
 24894             
 25790             
 24895             ERROR;
 25791             ERROR;
 24896         }
 25792         }
 24897         
 25793         
 24898     }/*function_ror*/
 25794     }/*function_ror*/
 24929                         symbol_c * return_type_symbol = IN_type_symbol;
 25825                         symbol_c * return_type_symbol = IN_type_symbol;
 24930                         return return_type_symbol;
 25826                         return return_type_symbol;
 24931                         
 25827                         
 24932                     }
 25828                     }
 24933                     
 25829                     
       
 25830                     
 24934                     ERROR;
 25831                     ERROR;
 24935                 }
 25832                 }
 24936                 
 25833                 
 24937             }
 25834             }
       
 25835             
 24938             
 25836             
 24939             ERROR;
 25837             ERROR;
 24940         }
 25838         }
 24941         
 25839         
 24942     }/*function_rol*/
 25840     }/*function_rol*/
 24973                         symbol_c * return_type_symbol = last_type_symbol;
 25871                         symbol_c * return_type_symbol = last_type_symbol;
 24974                         return return_type_symbol;
 25872                         return return_type_symbol;
 24975                         
 25873                         
 24976                     }
 25874                     }
 24977                     
 25875                     
       
 25876                     
 24978                     ERROR;
 25877                     ERROR;
 24979                 }
 25878                 }
 24980                 
 25879                 
 24981             }
 25880             }
       
 25881             
 24982             
 25882             
 24983             ERROR;
 25883             ERROR;
 24984         }
 25884         }
 24985         
 25885         
 24986     }/*function_and*/
 25886     }/*function_and*/
 25017                         symbol_c * return_type_symbol = last_type_symbol;
 25917                         symbol_c * return_type_symbol = last_type_symbol;
 25018                         return return_type_symbol;
 25918                         return return_type_symbol;
 25019                         
 25919                         
 25020                     }
 25920                     }
 25021                     
 25921                     
       
 25922                     
 25022                     ERROR;
 25923                     ERROR;
 25023                 }
 25924                 }
 25024                 
 25925                 
 25025             }
 25926             }
       
 25927             
 25026             
 25928             
 25027             ERROR;
 25929             ERROR;
 25028         }
 25930         }
 25029         
 25931         
 25030     }/*function_or*/
 25932     }/*function_or*/
 25061                         symbol_c * return_type_symbol = last_type_symbol;
 25963                         symbol_c * return_type_symbol = last_type_symbol;
 25062                         return return_type_symbol;
 25964                         return return_type_symbol;
 25063                         
 25965                         
 25064                     }
 25966                     }
 25065                     
 25967                     
       
 25968                     
 25066                     ERROR;
 25969                     ERROR;
 25067                 }
 25970                 }
 25068                 
 25971                 
 25069             }
 25972             }
 25070             
 25973             
       
 25974             
 25071             ERROR;
 25975             ERROR;
 25072         }
 25976         }
 25073         
 25977         
 25074     }/*function_xor*/
 25978     }/*function_xor*/
 25075     break;
 25979     break;
 25090         
 25994         
 25091                 symbol_c * return_type_symbol = IN_type_symbol;
 25995                 symbol_c * return_type_symbol = IN_type_symbol;
 25092                 return return_type_symbol;
 25996                 return return_type_symbol;
 25093                 
 25997                 
 25094             }
 25998             }
       
 25999             
 25095             
 26000             
 25096             ERROR;
 26001             ERROR;
 25097         }
 26002         }
 25098         
 26003         
 25099     }/*function_not*/
 26004     }/*function_not*/
 25144                                 symbol_c * return_type_symbol = last_type_symbol;
 26049                                 symbol_c * return_type_symbol = last_type_symbol;
 25145                                 return return_type_symbol;
 26050                                 return return_type_symbol;
 25146                                 
 26051                                 
 25147                             }
 26052                             }
 25148                             
 26053                             
       
 26054                             
 25149                             ERROR;
 26055                             ERROR;
 25150                         }
 26056                         }
 25151                         
 26057                         
 25152                     }
 26058                     }
 25153                     
 26059                     
       
 26060                     
 25154                     ERROR;
 26061                     ERROR;
 25155                 }
 26062                 }
 25156                 
 26063                 
 25157             }
 26064             }
       
 26065             
 25158             
 26066             
 25159             ERROR;
 26067             ERROR;
 25160         }
 26068         }
 25161         
 26069         
 25162     }/*function_sel*/
 26070     }/*function_sel*/
 25193                         symbol_c * return_type_symbol = last_type_symbol;
 26101                         symbol_c * return_type_symbol = last_type_symbol;
 25194                         return return_type_symbol;
 26102                         return return_type_symbol;
 25195                         
 26103                         
 25196                     }
 26104                     }
 25197                     
 26105                     
       
 26106                     
 25198                     ERROR;
 26107                     ERROR;
 25199                 }
 26108                 }
 25200                 
 26109                 
 25201             }
 26110             }
       
 26111             
 25202             
 26112             
 25203             ERROR;
 26113             ERROR;
 25204         }
 26114         }
 25205         
 26115         
 25206     }/*function_max*/
 26116     }/*function_max*/
 25237                         symbol_c * return_type_symbol = last_type_symbol;
 26147                         symbol_c * return_type_symbol = last_type_symbol;
 25238                         return return_type_symbol;
 26148                         return return_type_symbol;
 25239                         
 26149                         
 25240                     }
 26150                     }
 25241                     
 26151                     
       
 26152                     
 25242                     ERROR;
 26153                     ERROR;
 25243                 }
 26154                 }
 25244                 
 26155                 
 25245             }
 26156             }
       
 26157             
 25246             
 26158             
 25247             ERROR;
 26159             ERROR;
 25248         }
 26160         }
 25249         
 26161         
 25250     }/*function_min*/
 26162     }/*function_min*/
 25295                                 symbol_c * return_type_symbol = IN_type_symbol;
 26207                                 symbol_c * return_type_symbol = IN_type_symbol;
 25296                                 return return_type_symbol;
 26208                                 return return_type_symbol;
 25297                                 
 26209                                 
 25298                             }
 26210                             }
 25299                             
 26211                             
       
 26212                             
 25300                             ERROR;
 26213                             ERROR;
 25301                         }
 26214                         }
 25302                         
 26215                         
 25303                     }
 26216                     }
 25304                     
 26217                     
       
 26218                     
 25305                     ERROR;
 26219                     ERROR;
 25306                 }
 26220                 }
 25307                 
 26221                 
 25308             }
 26222             }
       
 26223             
 25309             
 26224             
 25310             ERROR;
 26225             ERROR;
 25311         }
 26226         }
 25312         
 26227         
 25313     }/*function_limit*/
 26228     }/*function_limit*/
 25358                                 symbol_c * return_type_symbol = last_type_symbol;
 26273                                 symbol_c * return_type_symbol = last_type_symbol;
 25359                                 return return_type_symbol;
 26274                                 return return_type_symbol;
 25360                                 
 26275                                 
 25361                             }
 26276                             }
 25362                             
 26277                             
       
 26278                             
 25363                             ERROR;
 26279                             ERROR;
 25364                         }
 26280                         }
 25365                         
 26281                         
 25366                     }
 26282                     }
 25367                     
 26283                     
       
 26284                     
 25368                     ERROR;
 26285                     ERROR;
 25369                 }
 26286                 }
 25370                 
 26287                 
 25371             }
 26288             }
       
 26289             
 25372             
 26290             
 25373             ERROR;
 26291             ERROR;
 25374         }
 26292         }
 25375         
 26293         
 25376     }/*function_mux*/
 26294     }/*function_mux*/
 25407                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 26325                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 25408                         return return_type_symbol;
 26326                         return return_type_symbol;
 25409                         
 26327                         
 25410                     }
 26328                     }
 25411                     
 26329                     
       
 26330                     
 25412                     ERROR;
 26331                     ERROR;
 25413                 }
 26332                 }
 25414                 
 26333                 
 25415             }
 26334             }
       
 26335             
 25416             
 26336             
 25417             ERROR;
 26337             ERROR;
 25418         }
 26338         }
 25419         
 26339         
 25420     }/*function_gt*/
 26340     }/*function_gt*/
 25451                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 26371                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 25452                         return return_type_symbol;
 26372                         return return_type_symbol;
 25453                         
 26373                         
 25454                     }
 26374                     }
 25455                     
 26375                     
       
 26376                     
 25456                     ERROR;
 26377                     ERROR;
 25457                 }
 26378                 }
 25458                 
 26379                 
 25459             }
 26380             }
       
 26381             
 25460             
 26382             
 25461             ERROR;
 26383             ERROR;
 25462         }
 26384         }
 25463         
 26385         
 25464     }/*function_ge*/
 26386     }/*function_ge*/
 25495                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 26417                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 25496                         return return_type_symbol;
 26418                         return return_type_symbol;
 25497                         
 26419                         
 25498                     }
 26420                     }
 25499                     
 26421                     
       
 26422                     
 25500                     ERROR;
 26423                     ERROR;
 25501                 }
 26424                 }
 25502                 
 26425                 
 25503             }
 26426             }
       
 26427             
 25504             
 26428             
 25505             ERROR;
 26429             ERROR;
 25506         }
 26430         }
 25507         
 26431         
 25508     }/*function_eq*/
 26432     }/*function_eq*/
 25539                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 26463                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 25540                         return return_type_symbol;
 26464                         return return_type_symbol;
 25541                         
 26465                         
 25542                     }
 26466                     }
 25543                     
 26467                     
       
 26468                     
 25544                     ERROR;
 26469                     ERROR;
 25545                 }
 26470                 }
 25546                 
 26471                 
 25547             }
 26472             }
       
 26473             
 25548             
 26474             
 25549             ERROR;
 26475             ERROR;
 25550         }
 26476         }
 25551         
 26477         
 25552     }/*function_lt*/
 26478     }/*function_lt*/
 25583                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 26509                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 25584                         return return_type_symbol;
 26510                         return return_type_symbol;
 25585                         
 26511                         
 25586                     }
 26512                     }
 25587                     
 26513                     
       
 26514                     
 25588                     ERROR;
 26515                     ERROR;
 25589                 }
 26516                 }
 25590                 
 26517                 
 25591             }
 26518             }
       
 26519             
 25592             
 26520             
 25593             ERROR;
 26521             ERROR;
 25594         }
 26522         }
 25595         
 26523         
 25596     }/*function_le*/
 26524     }/*function_le*/
 25627                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 26555                         symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 25628                         return return_type_symbol;
 26556                         return return_type_symbol;
 25629                         
 26557                         
 25630                     }
 26558                     }
 25631                     
 26559                     
       
 26560                     
 25632                     ERROR;
 26561                     ERROR;
 25633                 }
 26562                 }
 25634                 
 26563                 
 25635             }
 26564             }
 25636             
 26565             
       
 26566             
 25637             ERROR;
 26567             ERROR;
 25638         }
 26568         }
 25639         
 26569         
 25640     }/*function_ne*/
 26570     }/*function_ne*/
 25641     break;
 26571     break;
 25656         
 26586         
 25657                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 26587                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 25658                 return return_type_symbol;
 26588                 return return_type_symbol;
 25659                 
 26589                 
 25660             }
 26590             }
       
 26591             
 25661             
 26592             
 25662             ERROR;
 26593             ERROR;
 25663         }
 26594         }
 25664         
 26595         
 25665     }/*function_len*/
 26596     }/*function_len*/
 25696                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 26627                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 25697                         return return_type_symbol;
 26628                         return return_type_symbol;
 25698                         
 26629                         
 25699                     }
 26630                     }
 25700                     
 26631                     
       
 26632                     
 25701                     ERROR;
 26633                     ERROR;
 25702                 }
 26634                 }
 25703                 
 26635                 
 25704             }
 26636             }
       
 26637             
 25705             
 26638             
 25706             ERROR;
 26639             ERROR;
 25707         }
 26640         }
 25708         
 26641         
 25709     }/*function_left*/
 26642     }/*function_left*/
 25740                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 26673                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 25741                         return return_type_symbol;
 26674                         return return_type_symbol;
 25742                         
 26675                         
 25743                     }
 26676                     }
 25744                     
 26677                     
       
 26678                     
 25745                     ERROR;
 26679                     ERROR;
 25746                 }
 26680                 }
 25747                 
 26681                 
 25748             }
 26682             }
       
 26683             
 25749             
 26684             
 25750             ERROR;
 26685             ERROR;
 25751         }
 26686         }
 25752         
 26687         
 25753     }/*function_right*/
 26688     }/*function_right*/
 25798                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 26733                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 25799                                 return return_type_symbol;
 26734                                 return return_type_symbol;
 25800                                 
 26735                                 
 25801                             }
 26736                             }
 25802                             
 26737                             
       
 26738                             
 25803                             ERROR;
 26739                             ERROR;
 25804                         }
 26740                         }
 25805                         
 26741                         
 25806                     }
 26742                     }
 25807                     
 26743                     
       
 26744                     
 25808                     ERROR;
 26745                     ERROR;
 25809                 }
 26746                 }
 25810                 
 26747                 
 25811             }
 26748             }
       
 26749             
 25812             
 26750             
 25813             ERROR;
 26751             ERROR;
 25814         }
 26752         }
 25815         
 26753         
 25816     }/*function_mid*/
 26754     }/*function_mid*/
 25847                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 26785                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 25848                         return return_type_symbol;
 26786                         return return_type_symbol;
 25849                         
 26787                         
 25850                     }
 26788                     }
 25851                     
 26789                     
       
 26790                     
 25852                     ERROR;
 26791                     ERROR;
 25853                 }
 26792                 }
 25854                 
 26793                 
 25855             }
 26794             }
 25856             
 26795             
 25874                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 26813                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 25875                         return return_type_symbol;
 26814                         return return_type_symbol;
 25876                         
 26815                         
 25877                     }
 26816                     }
 25878                     
 26817                     
       
 26818                     
 25879                     ERROR;
 26819                     ERROR;
 25880                 }
 26820                 }
 25881                 
 26821                 
 25882             }
 26822             }
       
 26823             
 25883             
 26824             
 25884             ERROR;
 26825             ERROR;
 25885         }
 26826         }
 25886         
 26827         
 25887     }/*function_concat*/
 26828     }/*function_concat*/
 25932                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 26873                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 25933                                 return return_type_symbol;
 26874                                 return return_type_symbol;
 25934                                 
 26875                                 
 25935                             }
 26876                             }
 25936                             
 26877                             
       
 26878                             
 25937                             ERROR;
 26879                             ERROR;
 25938                         }
 26880                         }
 25939                         
 26881                         
 25940                     }
 26882                     }
 25941                     
 26883                     
       
 26884                     
 25942                     ERROR;
 26885                     ERROR;
 25943                 }
 26886                 }
 25944                 
 26887                 
 25945             }
 26888             }
       
 26889             
 25946             
 26890             
 25947             ERROR;
 26891             ERROR;
 25948         }
 26892         }
 25949         
 26893         
 25950     }/*function_insert*/
 26894     }/*function_insert*/
 25995                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 26939                                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 25996                                 return return_type_symbol;
 26940                                 return return_type_symbol;
 25997                                 
 26941                                 
 25998                             }
 26942                             }
 25999                             
 26943                             
       
 26944                             
 26000                             ERROR;
 26945                             ERROR;
 26001                         }
 26946                         }
 26002                         
 26947                         
 26003                     }
 26948                     }
 26004                     
 26949                     
       
 26950                     
 26005                     ERROR;
 26951                     ERROR;
 26006                 }
 26952                 }
 26007                 
 26953                 
 26008             }
 26954             }
       
 26955             
 26009             
 26956             
 26010             ERROR;
 26957             ERROR;
 26011         }
 26958         }
 26012         
 26959         
 26013     }/*function_delete*/
 26960     }/*function_delete*/
 26072                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 27019                                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 26073                                         return return_type_symbol;
 27020                                         return return_type_symbol;
 26074                                         
 27021                                         
 26075                                     }
 27022                                     }
 26076                                     
 27023                                     
       
 27024                                     
 26077                                     ERROR;
 27025                                     ERROR;
 26078                                 }
 27026                                 }
 26079                                 
 27027                                 
 26080                             }
 27028                             }
 26081                             
 27029                             
       
 27030                             
 26082                             ERROR;
 27031                             ERROR;
 26083                         }
 27032                         }
 26084                         
 27033                         
 26085                     }
 27034                     }
 26086                     
 27035                     
       
 27036                     
 26087                     ERROR;
 27037                     ERROR;
 26088                 }
 27038                 }
 26089                 
 27039                 
 26090             }
 27040             }
       
 27041             
 26091             
 27042             
 26092             ERROR;
 27043             ERROR;
 26093         }
 27044         }
 26094         
 27045         
 26095     }/*function_replace*/
 27046     }/*function_replace*/
 26126                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 27077                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 26127                         return return_type_symbol;
 27078                         return return_type_symbol;
 26128                         
 27079                         
 26129                     }
 27080                     }
 26130                     
 27081                     
       
 27082                     
 26131                     ERROR;
 27083                     ERROR;
 26132                 }
 27084                 }
 26133                 
 27085                 
 26134             }
 27086             }
       
 27087             
 26135             
 27088             
 26136             ERROR;
 27089             ERROR;
 26137         }
 27090         }
 26138         
 27091         
 26139     }/*function_find*/
 27092     }/*function_find*/