stage4/generate_cc/search_type_code.c
changeset 42 b45c7f34dec1
parent 40 873a5b60a7ea
child 49 c96d1a4c23f8
equal deleted inserted replaced
41:8998c8b24b60 42:b45c7f34dec1
    28             if (IN_param_value == NULL)
    28             if (IN_param_value == NULL)
    29               IN_param_value = function_call_param_iterator.next();
    29               IN_param_value = function_call_param_iterator.next();
    30             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    30             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    31             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    31             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    32             
    32             
    33             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
    33             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
    34             {
    34             {
    35         
    35         
    36                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    36                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
    37                 return return_type_symbol;
    37                 return return_type_symbol;
    38                 
    38                 
    60             if (IN_param_value == NULL)
    60             if (IN_param_value == NULL)
    61               IN_param_value = function_call_param_iterator.next();
    61               IN_param_value = function_call_param_iterator.next();
    62             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    62             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    63             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    63             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    64             
    64             
    65             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
    65             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
    66             {
    66             {
    67         
    67         
    68                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
    68                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
    69                 return return_type_symbol;
    69                 return return_type_symbol;
    70                 
    70                 
    92             if (IN_param_value == NULL)
    92             if (IN_param_value == NULL)
    93               IN_param_value = function_call_param_iterator.next();
    93               IN_param_value = function_call_param_iterator.next();
    94             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    94             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
    95             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    95             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
    96             
    96             
    97             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
    97             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
    98             {
    98             {
    99         
    99         
   100                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   100                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   101                 return return_type_symbol;
   101                 return return_type_symbol;
   102                 
   102                 
   124             if (IN_param_value == NULL)
   124             if (IN_param_value == NULL)
   125               IN_param_value = function_call_param_iterator.next();
   125               IN_param_value = function_call_param_iterator.next();
   126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   128             
   128             
   129             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   129             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   130             {
   130             {
   131         
   131         
   132                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   132                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   133                 return return_type_symbol;
   133                 return return_type_symbol;
   134                 
   134                 
   156             if (IN_param_value == NULL)
   156             if (IN_param_value == NULL)
   157               IN_param_value = function_call_param_iterator.next();
   157               IN_param_value = function_call_param_iterator.next();
   158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   160             
   160             
   161             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   161             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   162             {
   162             {
   163         
   163         
   164                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   164                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   165                 return return_type_symbol;
   165                 return return_type_symbol;
   166                 
   166                 
   188             if (IN_param_value == NULL)
   188             if (IN_param_value == NULL)
   189               IN_param_value = function_call_param_iterator.next();
   189               IN_param_value = function_call_param_iterator.next();
   190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   192             
   192             
   193             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   193             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   194             {
   194             {
   195         
   195         
   196                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   196                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   197                 return return_type_symbol;
   197                 return return_type_symbol;
   198                 
   198                 
   220             if (IN_param_value == NULL)
   220             if (IN_param_value == NULL)
   221               IN_param_value = function_call_param_iterator.next();
   221               IN_param_value = function_call_param_iterator.next();
   222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   224             
   224             
   225             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   225             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   226             {
   226             {
   227         
   227         
   228                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   228                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   229                 return return_type_symbol;
   229                 return return_type_symbol;
   230                 
   230                 
   252             if (IN_param_value == NULL)
   252             if (IN_param_value == NULL)
   253               IN_param_value = function_call_param_iterator.next();
   253               IN_param_value = function_call_param_iterator.next();
   254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   256             
   256             
   257             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   257             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   258             {
   258             {
   259         
   259         
   260                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   260                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   261                 return return_type_symbol;
   261                 return return_type_symbol;
   262                 
   262                 
   284             if (IN_param_value == NULL)
   284             if (IN_param_value == NULL)
   285               IN_param_value = function_call_param_iterator.next();
   285               IN_param_value = function_call_param_iterator.next();
   286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   288             
   288             
   289             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   289             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   290             {
   290             {
   291         
   291         
   292                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   292                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   293                 return return_type_symbol;
   293                 return return_type_symbol;
   294                 
   294                 
   316             if (IN_param_value == NULL)
   316             if (IN_param_value == NULL)
   317               IN_param_value = function_call_param_iterator.next();
   317               IN_param_value = function_call_param_iterator.next();
   318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   320             
   320             
   321             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   321             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   322             {
   322             {
   323         
   323         
   324                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
   324                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
   325                 return return_type_symbol;
   325                 return return_type_symbol;
   326                 
   326                 
   348             if (IN_param_value == NULL)
   348             if (IN_param_value == NULL)
   349               IN_param_value = function_call_param_iterator.next();
   349               IN_param_value = function_call_param_iterator.next();
   350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   352             
   352             
   353             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   353             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   354             {
   354             {
   355         
   355         
   356                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
   356                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
   357                 return return_type_symbol;
   357                 return return_type_symbol;
   358                 
   358                 
   380             if (IN_param_value == NULL)
   380             if (IN_param_value == NULL)
   381               IN_param_value = function_call_param_iterator.next();
   381               IN_param_value = function_call_param_iterator.next();
   382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   384             
   384             
   385             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   385             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   386             {
   386             {
   387         
   387         
   388                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   388                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   389                 return return_type_symbol;
   389                 return return_type_symbol;
   390                 
   390                 
   412             if (IN_param_value == NULL)
   412             if (IN_param_value == NULL)
   413               IN_param_value = function_call_param_iterator.next();
   413               IN_param_value = function_call_param_iterator.next();
   414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   416             
   416             
   417             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   417             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   418             {
   418             {
   419         
   419         
   420                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   420                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
   421                 return return_type_symbol;
   421                 return return_type_symbol;
   422                 
   422                 
   444             if (IN_param_value == NULL)
   444             if (IN_param_value == NULL)
   445               IN_param_value = function_call_param_iterator.next();
   445               IN_param_value = function_call_param_iterator.next();
   446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   448             
   448             
   449             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   449             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   450             {
   450             {
   451         
   451         
   452                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   452                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
   453                 return return_type_symbol;
   453                 return return_type_symbol;
   454                 
   454                 
   476             if (IN_param_value == NULL)
   476             if (IN_param_value == NULL)
   477               IN_param_value = function_call_param_iterator.next();
   477               IN_param_value = function_call_param_iterator.next();
   478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   480             
   480             
   481             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   481             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   482             {
   482             {
   483         
   483         
   484                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
   484                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
   485                 return return_type_symbol;
   485                 return return_type_symbol;
   486                 
   486                 
   508             if (IN_param_value == NULL)
   508             if (IN_param_value == NULL)
   509               IN_param_value = function_call_param_iterator.next();
   509               IN_param_value = function_call_param_iterator.next();
   510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   512             
   512             
   513             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   513             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   514             {
   514             {
   515         
   515         
   516                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
   516                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
   517                 return return_type_symbol;
   517                 return return_type_symbol;
   518                 
   518                 
   540             if (IN_param_value == NULL)
   540             if (IN_param_value == NULL)
   541               IN_param_value = function_call_param_iterator.next();
   541               IN_param_value = function_call_param_iterator.next();
   542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   544             
   544             
   545             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   545             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   546             {
   546             {
   547         
   547         
   548                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
   548                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
   549                 return return_type_symbol;
   549                 return return_type_symbol;
   550                 
   550                 
   572             if (IN_param_value == NULL)
   572             if (IN_param_value == NULL)
   573               IN_param_value = function_call_param_iterator.next();
   573               IN_param_value = function_call_param_iterator.next();
   574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   576             
   576             
   577             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   577             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   578             {
   578             {
   579         
   579         
   580                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
   580                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
   581                 return return_type_symbol;
   581                 return return_type_symbol;
   582                 
   582                 
   604             if (IN_param_value == NULL)
   604             if (IN_param_value == NULL)
   605               IN_param_value = function_call_param_iterator.next();
   605               IN_param_value = function_call_param_iterator.next();
   606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   608             
   608             
   609             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
   609             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
   610             {
   610             {
   611         
   611         
   612                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
   612                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
   613                 return return_type_symbol;
   613                 return return_type_symbol;
   614                 
   614                 
   636             if (IN_param_value == NULL)
   636             if (IN_param_value == NULL)
   637               IN_param_value = function_call_param_iterator.next();
   637               IN_param_value = function_call_param_iterator.next();
   638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   640             
   640             
   641             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   641             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   642             {
   642             {
   643         
   643         
   644                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
   644                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
   645                 return return_type_symbol;
   645                 return return_type_symbol;
   646                 
   646                 
   668             if (IN_param_value == NULL)
   668             if (IN_param_value == NULL)
   669               IN_param_value = function_call_param_iterator.next();
   669               IN_param_value = function_call_param_iterator.next();
   670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   672             
   672             
   673             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   673             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   674             {
   674             {
   675         
   675         
   676                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
   676                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
   677                 return return_type_symbol;
   677                 return return_type_symbol;
   678                 
   678                 
   700             if (IN_param_value == NULL)
   700             if (IN_param_value == NULL)
   701               IN_param_value = function_call_param_iterator.next();
   701               IN_param_value = function_call_param_iterator.next();
   702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   704             
   704             
   705             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   705             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   706             {
   706             {
   707         
   707         
   708                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   708                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
   709                 return return_type_symbol;
   709                 return return_type_symbol;
   710                 
   710                 
   732             if (IN_param_value == NULL)
   732             if (IN_param_value == NULL)
   733               IN_param_value = function_call_param_iterator.next();
   733               IN_param_value = function_call_param_iterator.next();
   734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   736             
   736             
   737             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   737             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   738             {
   738             {
   739         
   739         
   740                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   740                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
   741                 return return_type_symbol;
   741                 return return_type_symbol;
   742                 
   742                 
   764             if (IN_param_value == NULL)
   764             if (IN_param_value == NULL)
   765               IN_param_value = function_call_param_iterator.next();
   765               IN_param_value = function_call_param_iterator.next();
   766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   768             
   768             
   769             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   769             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   770             {
   770             {
   771         
   771         
   772                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   772                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
   773                 return return_type_symbol;
   773                 return return_type_symbol;
   774                 
   774                 
   796             if (IN_param_value == NULL)
   796             if (IN_param_value == NULL)
   797               IN_param_value = function_call_param_iterator.next();
   797               IN_param_value = function_call_param_iterator.next();
   798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   800             
   800             
   801             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   801             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   802             {
   802             {
   803         
   803         
   804                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   804                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
   805                 return return_type_symbol;
   805                 return return_type_symbol;
   806                 
   806                 
   828             if (IN_param_value == NULL)
   828             if (IN_param_value == NULL)
   829               IN_param_value = function_call_param_iterator.next();
   829               IN_param_value = function_call_param_iterator.next();
   830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   832             
   832             
   833             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   833             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   834             {
   834             {
   835         
   835         
   836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   836                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
   837                 return return_type_symbol;
   837                 return return_type_symbol;
   838                 
   838                 
   860             if (IN_param_value == NULL)
   860             if (IN_param_value == NULL)
   861               IN_param_value = function_call_param_iterator.next();
   861               IN_param_value = function_call_param_iterator.next();
   862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   864             
   864             
   865             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   865             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   866             {
   866             {
   867         
   867         
   868                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   868                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
   869                 return return_type_symbol;
   869                 return return_type_symbol;
   870                 
   870                 
   892             if (IN_param_value == NULL)
   892             if (IN_param_value == NULL)
   893               IN_param_value = function_call_param_iterator.next();
   893               IN_param_value = function_call_param_iterator.next();
   894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   896             
   896             
   897             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   897             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   898             {
   898             {
   899         
   899         
   900                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   900                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
   901                 return return_type_symbol;
   901                 return return_type_symbol;
   902                 
   902                 
   924             if (IN_param_value == NULL)
   924             if (IN_param_value == NULL)
   925               IN_param_value = function_call_param_iterator.next();
   925               IN_param_value = function_call_param_iterator.next();
   926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   928             
   928             
   929             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   929             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   930             {
   930             {
   931         
   931         
   932                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
   932                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
   933                 return return_type_symbol;
   933                 return return_type_symbol;
   934                 
   934                 
   956             if (IN_param_value == NULL)
   956             if (IN_param_value == NULL)
   957               IN_param_value = function_call_param_iterator.next();
   957               IN_param_value = function_call_param_iterator.next();
   958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   960             
   960             
   961             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   961             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   962             {
   962             {
   963         
   963         
   964                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
   964                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
   965                 return return_type_symbol;
   965                 return return_type_symbol;
   966                 
   966                 
   988             if (IN_param_value == NULL)
   988             if (IN_param_value == NULL)
   989               IN_param_value = function_call_param_iterator.next();
   989               IN_param_value = function_call_param_iterator.next();
   990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
   991             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
   992             
   992             
   993             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
   993             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
   994             {
   994             {
   995         
   995         
   996                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   996                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
   997                 return return_type_symbol;
   997                 return return_type_symbol;
   998                 
   998                 
  1020             if (IN_param_value == NULL)
  1020             if (IN_param_value == NULL)
  1021               IN_param_value = function_call_param_iterator.next();
  1021               IN_param_value = function_call_param_iterator.next();
  1022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  1024             
  1025             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1025             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1026             {
  1026             {
  1027         
  1027         
  1028                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1028                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1029                 return return_type_symbol;
  1029                 return return_type_symbol;
  1030                 
  1030                 
  1052             if (IN_param_value == NULL)
  1052             if (IN_param_value == NULL)
  1053               IN_param_value = function_call_param_iterator.next();
  1053               IN_param_value = function_call_param_iterator.next();
  1054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1056             
  1056             
  1057             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1057             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1058             {
  1058             {
  1059         
  1059         
  1060                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1060                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1061                 return return_type_symbol;
  1061                 return return_type_symbol;
  1062                 
  1062                 
  1084             if (IN_param_value == NULL)
  1084             if (IN_param_value == NULL)
  1085               IN_param_value = function_call_param_iterator.next();
  1085               IN_param_value = function_call_param_iterator.next();
  1086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1088             
  1088             
  1089             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1089             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1090             {
  1090             {
  1091         
  1091         
  1092                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1092                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1093                 return return_type_symbol;
  1093                 return return_type_symbol;
  1094                 
  1094                 
  1116             if (IN_param_value == NULL)
  1116             if (IN_param_value == NULL)
  1117               IN_param_value = function_call_param_iterator.next();
  1117               IN_param_value = function_call_param_iterator.next();
  1118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1120             
  1120             
  1121             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1121             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1122             {
  1122             {
  1123         
  1123         
  1124                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1124                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1125                 return return_type_symbol;
  1125                 return return_type_symbol;
  1126                 
  1126                 
  1148             if (IN_param_value == NULL)
  1148             if (IN_param_value == NULL)
  1149               IN_param_value = function_call_param_iterator.next();
  1149               IN_param_value = function_call_param_iterator.next();
  1150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1152             
  1152             
  1153             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1153             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1154             {
  1154             {
  1155         
  1155         
  1156                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1156                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1157                 return return_type_symbol;
  1157                 return return_type_symbol;
  1158                 
  1158                 
  1180             if (IN_param_value == NULL)
  1180             if (IN_param_value == NULL)
  1181               IN_param_value = function_call_param_iterator.next();
  1181               IN_param_value = function_call_param_iterator.next();
  1182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1184             
  1184             
  1185             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1185             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1186             {
  1186             {
  1187         
  1187         
  1188                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1188                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1189                 return return_type_symbol;
  1189                 return return_type_symbol;
  1190                 
  1190                 
  1212             if (IN_param_value == NULL)
  1212             if (IN_param_value == NULL)
  1213               IN_param_value = function_call_param_iterator.next();
  1213               IN_param_value = function_call_param_iterator.next();
  1214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1216             
  1216             
  1217             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
  1217             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
  1218             {
  1218             {
  1219         
  1219         
  1220                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1220                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1221                 return return_type_symbol;
  1221                 return return_type_symbol;
  1222                 
  1222                 
  1244             if (IN_param_value == NULL)
  1244             if (IN_param_value == NULL)
  1245               IN_param_value = function_call_param_iterator.next();
  1245               IN_param_value = function_call_param_iterator.next();
  1246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1248             
  1248             
  1249             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1249             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1250             {
  1250             {
  1251         
  1251         
  1252                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1252                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1253                 return return_type_symbol;
  1253                 return return_type_symbol;
  1254                 
  1254                 
  1276             if (IN_param_value == NULL)
  1276             if (IN_param_value == NULL)
  1277               IN_param_value = function_call_param_iterator.next();
  1277               IN_param_value = function_call_param_iterator.next();
  1278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1280             
  1280             
  1281             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1281             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1282             {
  1282             {
  1283         
  1283         
  1284                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1284                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1285                 return return_type_symbol;
  1285                 return return_type_symbol;
  1286                 
  1286                 
  1308             if (IN_param_value == NULL)
  1308             if (IN_param_value == NULL)
  1309               IN_param_value = function_call_param_iterator.next();
  1309               IN_param_value = function_call_param_iterator.next();
  1310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1312             
  1312             
  1313             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1313             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1314             {
  1314             {
  1315         
  1315         
  1316                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1316                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  1317                 return return_type_symbol;
  1317                 return return_type_symbol;
  1318                 
  1318                 
  1340             if (IN_param_value == NULL)
  1340             if (IN_param_value == NULL)
  1341               IN_param_value = function_call_param_iterator.next();
  1341               IN_param_value = function_call_param_iterator.next();
  1342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1344             
  1344             
  1345             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1345             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1346             {
  1346             {
  1347         
  1347         
  1348                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1348                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1349                 return return_type_symbol;
  1349                 return return_type_symbol;
  1350                 
  1350                 
  1372             if (IN_param_value == NULL)
  1372             if (IN_param_value == NULL)
  1373               IN_param_value = function_call_param_iterator.next();
  1373               IN_param_value = function_call_param_iterator.next();
  1374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1376             
  1376             
  1377             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1377             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1378             {
  1378             {
  1379         
  1379         
  1380                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1380                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1381                 return return_type_symbol;
  1381                 return return_type_symbol;
  1382                 
  1382                 
  1404             if (IN_param_value == NULL)
  1404             if (IN_param_value == NULL)
  1405               IN_param_value = function_call_param_iterator.next();
  1405               IN_param_value = function_call_param_iterator.next();
  1406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1408             
  1408             
  1409             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1409             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1410             {
  1410             {
  1411         
  1411         
  1412                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  1412                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  1413                 return return_type_symbol;
  1413                 return return_type_symbol;
  1414                 
  1414                 
  1436             if (IN_param_value == NULL)
  1436             if (IN_param_value == NULL)
  1437               IN_param_value = function_call_param_iterator.next();
  1437               IN_param_value = function_call_param_iterator.next();
  1438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1440             
  1440             
  1441             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1441             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1442             {
  1442             {
  1443         
  1443         
  1444                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  1444                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  1445                 return return_type_symbol;
  1445                 return return_type_symbol;
  1446                 
  1446                 
  1468             if (IN_param_value == NULL)
  1468             if (IN_param_value == NULL)
  1469               IN_param_value = function_call_param_iterator.next();
  1469               IN_param_value = function_call_param_iterator.next();
  1470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1472             
  1472             
  1473             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1473             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1474             {
  1474             {
  1475         
  1475         
  1476                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1476                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  1477                 return return_type_symbol;
  1477                 return return_type_symbol;
  1478                 
  1478                 
  1500             if (IN_param_value == NULL)
  1500             if (IN_param_value == NULL)
  1501               IN_param_value = function_call_param_iterator.next();
  1501               IN_param_value = function_call_param_iterator.next();
  1502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1504             
  1504             
  1505             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1505             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1506             {
  1506             {
  1507         
  1507         
  1508                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1508                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  1509                 return return_type_symbol;
  1509                 return return_type_symbol;
  1510                 
  1510                 
  1532             if (IN_param_value == NULL)
  1532             if (IN_param_value == NULL)
  1533               IN_param_value = function_call_param_iterator.next();
  1533               IN_param_value = function_call_param_iterator.next();
  1534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1536             
  1536             
  1537             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1537             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1538             {
  1538             {
  1539         
  1539         
  1540                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1540                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  1541                 return return_type_symbol;
  1541                 return return_type_symbol;
  1542                 
  1542                 
  1564             if (IN_param_value == NULL)
  1564             if (IN_param_value == NULL)
  1565               IN_param_value = function_call_param_iterator.next();
  1565               IN_param_value = function_call_param_iterator.next();
  1566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1568             
  1568             
  1569             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1569             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1570             {
  1570             {
  1571         
  1571         
  1572                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1572                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  1573                 return return_type_symbol;
  1573                 return return_type_symbol;
  1574                 
  1574                 
  1596             if (IN_param_value == NULL)
  1596             if (IN_param_value == NULL)
  1597               IN_param_value = function_call_param_iterator.next();
  1597               IN_param_value = function_call_param_iterator.next();
  1598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1600             
  1600             
  1601             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1601             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1602             {
  1602             {
  1603         
  1603         
  1604                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1604                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  1605                 return return_type_symbol;
  1605                 return return_type_symbol;
  1606                 
  1606                 
  1628             if (IN_param_value == NULL)
  1628             if (IN_param_value == NULL)
  1629               IN_param_value = function_call_param_iterator.next();
  1629               IN_param_value = function_call_param_iterator.next();
  1630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1632             
  1632             
  1633             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1633             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1634             {
  1634             {
  1635         
  1635         
  1636                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1636                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  1637                 return return_type_symbol;
  1637                 return return_type_symbol;
  1638                 
  1638                 
  1660             if (IN_param_value == NULL)
  1660             if (IN_param_value == NULL)
  1661               IN_param_value = function_call_param_iterator.next();
  1661               IN_param_value = function_call_param_iterator.next();
  1662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1664             
  1664             
  1665             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1665             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1666             {
  1666             {
  1667         
  1667         
  1668                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1668                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  1669                 return return_type_symbol;
  1669                 return return_type_symbol;
  1670                 
  1670                 
  1692             if (IN_param_value == NULL)
  1692             if (IN_param_value == NULL)
  1693               IN_param_value = function_call_param_iterator.next();
  1693               IN_param_value = function_call_param_iterator.next();
  1694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1696             
  1696             
  1697             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1697             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1698             {
  1698             {
  1699         
  1699         
  1700                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1700                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  1701                 return return_type_symbol;
  1701                 return return_type_symbol;
  1702                 
  1702                 
  1724             if (IN_param_value == NULL)
  1724             if (IN_param_value == NULL)
  1725               IN_param_value = function_call_param_iterator.next();
  1725               IN_param_value = function_call_param_iterator.next();
  1726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1728             
  1728             
  1729             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1729             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1730             {
  1730             {
  1731         
  1731         
  1732                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1732                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  1733                 return return_type_symbol;
  1733                 return return_type_symbol;
  1734                 
  1734                 
  1756             if (IN_param_value == NULL)
  1756             if (IN_param_value == NULL)
  1757               IN_param_value = function_call_param_iterator.next();
  1757               IN_param_value = function_call_param_iterator.next();
  1758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1760             
  1760             
  1761             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1761             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1762             {
  1762             {
  1763         
  1763         
  1764                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1764                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  1765                 return return_type_symbol;
  1765                 return return_type_symbol;
  1766                 
  1766                 
  1788             if (IN_param_value == NULL)
  1788             if (IN_param_value == NULL)
  1789               IN_param_value = function_call_param_iterator.next();
  1789               IN_param_value = function_call_param_iterator.next();
  1790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1792             
  1792             
  1793             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1793             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1794             {
  1794             {
  1795         
  1795         
  1796                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1796                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  1797                 return return_type_symbol;
  1797                 return return_type_symbol;
  1798                 
  1798                 
  1820             if (IN_param_value == NULL)
  1820             if (IN_param_value == NULL)
  1821               IN_param_value = function_call_param_iterator.next();
  1821               IN_param_value = function_call_param_iterator.next();
  1822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1824             
  1824             
  1825             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
  1825             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
  1826             {
  1826             {
  1827         
  1827         
  1828                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1828                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  1829                 return return_type_symbol;
  1829                 return return_type_symbol;
  1830                 
  1830                 
  1852             if (IN_param_value == NULL)
  1852             if (IN_param_value == NULL)
  1853               IN_param_value = function_call_param_iterator.next();
  1853               IN_param_value = function_call_param_iterator.next();
  1854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1856             
  1856             
  1857             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  1857             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  1858             {
  1858             {
  1859         
  1859         
  1860                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1860                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  1861                 return return_type_symbol;
  1861                 return return_type_symbol;
  1862                 
  1862                 
  1884             if (IN_param_value == NULL)
  1884             if (IN_param_value == NULL)
  1885               IN_param_value = function_call_param_iterator.next();
  1885               IN_param_value = function_call_param_iterator.next();
  1886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1888             
  1888             
  1889             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  1889             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  1890             {
  1890             {
  1891         
  1891         
  1892                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1892                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  1893                 return return_type_symbol;
  1893                 return return_type_symbol;
  1894                 
  1894                 
  1916             if (IN_param_value == NULL)
  1916             if (IN_param_value == NULL)
  1917               IN_param_value = function_call_param_iterator.next();
  1917               IN_param_value = function_call_param_iterator.next();
  1918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1920             
  1920             
  1921             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  1921             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  1922             {
  1922             {
  1923         
  1923         
  1924                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  1924                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  1925                 return return_type_symbol;
  1925                 return return_type_symbol;
  1926                 
  1926                 
  1948             if (IN_param_value == NULL)
  1948             if (IN_param_value == NULL)
  1949               IN_param_value = function_call_param_iterator.next();
  1949               IN_param_value = function_call_param_iterator.next();
  1950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1952             
  1952             
  1953             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  1953             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  1954             {
  1954             {
  1955         
  1955         
  1956                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1956                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  1957                 return return_type_symbol;
  1957                 return return_type_symbol;
  1958                 
  1958                 
  1980             if (IN_param_value == NULL)
  1980             if (IN_param_value == NULL)
  1981               IN_param_value = function_call_param_iterator.next();
  1981               IN_param_value = function_call_param_iterator.next();
  1982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  1983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  1984             
  1984             
  1985             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  1985             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  1986             {
  1986             {
  1987         
  1987         
  1988                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1988                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  1989                 return return_type_symbol;
  1989                 return return_type_symbol;
  1990                 
  1990                 
  2012             if (IN_param_value == NULL)
  2012             if (IN_param_value == NULL)
  2013               IN_param_value = function_call_param_iterator.next();
  2013               IN_param_value = function_call_param_iterator.next();
  2014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2016             
  2016             
  2017             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2017             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2018             {
  2018             {
  2019         
  2019         
  2020                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2020                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2021                 return return_type_symbol;
  2021                 return return_type_symbol;
  2022                 
  2022                 
  2044             if (IN_param_value == NULL)
  2044             if (IN_param_value == NULL)
  2045               IN_param_value = function_call_param_iterator.next();
  2045               IN_param_value = function_call_param_iterator.next();
  2046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2047             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2048             
  2048             
  2049             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2049             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2050             {
  2050             {
  2051         
  2051         
  2052                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2052                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2053                 return return_type_symbol;
  2053                 return return_type_symbol;
  2054                 
  2054                 
  2076             if (IN_param_value == NULL)
  2076             if (IN_param_value == NULL)
  2077               IN_param_value = function_call_param_iterator.next();
  2077               IN_param_value = function_call_param_iterator.next();
  2078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  2080             
  2081             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2081             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2082             {
  2082             {
  2083         
  2083         
  2084                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2084                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2085                 return return_type_symbol;
  2085                 return return_type_symbol;
  2086                 
  2086                 
  2108             if (IN_param_value == NULL)
  2108             if (IN_param_value == NULL)
  2109               IN_param_value = function_call_param_iterator.next();
  2109               IN_param_value = function_call_param_iterator.next();
  2110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2112             
  2112             
  2113             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2113             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2114             {
  2114             {
  2115         
  2115         
  2116                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2116                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2117                 return return_type_symbol;
  2117                 return return_type_symbol;
  2118                 
  2118                 
  2140             if (IN_param_value == NULL)
  2140             if (IN_param_value == NULL)
  2141               IN_param_value = function_call_param_iterator.next();
  2141               IN_param_value = function_call_param_iterator.next();
  2142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2144             
  2144             
  2145             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2145             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2146             {
  2146             {
  2147         
  2147         
  2148                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2148                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2149                 return return_type_symbol;
  2149                 return return_type_symbol;
  2150                 
  2150                 
  2172             if (IN_param_value == NULL)
  2172             if (IN_param_value == NULL)
  2173               IN_param_value = function_call_param_iterator.next();
  2173               IN_param_value = function_call_param_iterator.next();
  2174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2176             
  2176             
  2177             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2177             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2178             {
  2178             {
  2179         
  2179         
  2180                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2180                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2181                 return return_type_symbol;
  2181                 return return_type_symbol;
  2182                 
  2182                 
  2204             if (IN_param_value == NULL)
  2204             if (IN_param_value == NULL)
  2205               IN_param_value = function_call_param_iterator.next();
  2205               IN_param_value = function_call_param_iterator.next();
  2206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2208             
  2208             
  2209             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2209             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2210             {
  2210             {
  2211         
  2211         
  2212                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2212                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2213                 return return_type_symbol;
  2213                 return return_type_symbol;
  2214                 
  2214                 
  2236             if (IN_param_value == NULL)
  2236             if (IN_param_value == NULL)
  2237               IN_param_value = function_call_param_iterator.next();
  2237               IN_param_value = function_call_param_iterator.next();
  2238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2240             
  2240             
  2241             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2241             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2242             {
  2242             {
  2243         
  2243         
  2244                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2244                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2245                 return return_type_symbol;
  2245                 return return_type_symbol;
  2246                 
  2246                 
  2268             if (IN_param_value == NULL)
  2268             if (IN_param_value == NULL)
  2269               IN_param_value = function_call_param_iterator.next();
  2269               IN_param_value = function_call_param_iterator.next();
  2270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2272             
  2272             
  2273             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2273             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2274             {
  2274             {
  2275         
  2275         
  2276                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2276                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2277                 return return_type_symbol;
  2277                 return return_type_symbol;
  2278                 
  2278                 
  2300             if (IN_param_value == NULL)
  2300             if (IN_param_value == NULL)
  2301               IN_param_value = function_call_param_iterator.next();
  2301               IN_param_value = function_call_param_iterator.next();
  2302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2304             
  2304             
  2305             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2305             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2306             {
  2306             {
  2307         
  2307         
  2308                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2308                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2309                 return return_type_symbol;
  2309                 return return_type_symbol;
  2310                 
  2310                 
  2332             if (IN_param_value == NULL)
  2332             if (IN_param_value == NULL)
  2333               IN_param_value = function_call_param_iterator.next();
  2333               IN_param_value = function_call_param_iterator.next();
  2334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2336             
  2336             
  2337             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2337             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2338             {
  2338             {
  2339         
  2339         
  2340                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2340                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2341                 return return_type_symbol;
  2341                 return return_type_symbol;
  2342                 
  2342                 
  2364             if (IN_param_value == NULL)
  2364             if (IN_param_value == NULL)
  2365               IN_param_value = function_call_param_iterator.next();
  2365               IN_param_value = function_call_param_iterator.next();
  2366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2368             
  2368             
  2369             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2369             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2370             {
  2370             {
  2371         
  2371         
  2372                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2372                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2373                 return return_type_symbol;
  2373                 return return_type_symbol;
  2374                 
  2374                 
  2396             if (IN_param_value == NULL)
  2396             if (IN_param_value == NULL)
  2397               IN_param_value = function_call_param_iterator.next();
  2397               IN_param_value = function_call_param_iterator.next();
  2398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2400             
  2400             
  2401             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2401             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2402             {
  2402             {
  2403         
  2403         
  2404                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2404                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  2405                 return return_type_symbol;
  2405                 return return_type_symbol;
  2406                 
  2406                 
  2428             if (IN_param_value == NULL)
  2428             if (IN_param_value == NULL)
  2429               IN_param_value = function_call_param_iterator.next();
  2429               IN_param_value = function_call_param_iterator.next();
  2430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2432             
  2432             
  2433             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
  2433             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
  2434             {
  2434             {
  2435         
  2435         
  2436                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2436                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  2437                 return return_type_symbol;
  2437                 return return_type_symbol;
  2438                 
  2438                 
  2460             if (IN_param_value == NULL)
  2460             if (IN_param_value == NULL)
  2461               IN_param_value = function_call_param_iterator.next();
  2461               IN_param_value = function_call_param_iterator.next();
  2462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2464             
  2464             
  2465             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2465             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2466             {
  2466             {
  2467         
  2467         
  2468                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2468                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  2469                 return return_type_symbol;
  2469                 return return_type_symbol;
  2470                 
  2470                 
  2492             if (IN_param_value == NULL)
  2492             if (IN_param_value == NULL)
  2493               IN_param_value = function_call_param_iterator.next();
  2493               IN_param_value = function_call_param_iterator.next();
  2494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2496             
  2496             
  2497             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2497             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2498             {
  2498             {
  2499         
  2499         
  2500                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2500                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  2501                 return return_type_symbol;
  2501                 return return_type_symbol;
  2502                 
  2502                 
  2524             if (IN_param_value == NULL)
  2524             if (IN_param_value == NULL)
  2525               IN_param_value = function_call_param_iterator.next();
  2525               IN_param_value = function_call_param_iterator.next();
  2526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2528             
  2528             
  2529             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2529             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2530             {
  2530             {
  2531         
  2531         
  2532                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2532                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  2533                 return return_type_symbol;
  2533                 return return_type_symbol;
  2534                 
  2534                 
  2556             if (IN_param_value == NULL)
  2556             if (IN_param_value == NULL)
  2557               IN_param_value = function_call_param_iterator.next();
  2557               IN_param_value = function_call_param_iterator.next();
  2558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2560             
  2560             
  2561             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2561             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2562             {
  2562             {
  2563         
  2563         
  2564                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  2564                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  2565                 return return_type_symbol;
  2565                 return return_type_symbol;
  2566                 
  2566                 
  2588             if (IN_param_value == NULL)
  2588             if (IN_param_value == NULL)
  2589               IN_param_value = function_call_param_iterator.next();
  2589               IN_param_value = function_call_param_iterator.next();
  2590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2592             
  2592             
  2593             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2593             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2594             {
  2594             {
  2595         
  2595         
  2596                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2596                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  2597                 return return_type_symbol;
  2597                 return return_type_symbol;
  2598                 
  2598                 
  2620             if (IN_param_value == NULL)
  2620             if (IN_param_value == NULL)
  2621               IN_param_value = function_call_param_iterator.next();
  2621               IN_param_value = function_call_param_iterator.next();
  2622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2624             
  2624             
  2625             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2625             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2626             {
  2626             {
  2627         
  2627         
  2628                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2628                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  2629                 return return_type_symbol;
  2629                 return return_type_symbol;
  2630                 
  2630                 
  2652             if (IN_param_value == NULL)
  2652             if (IN_param_value == NULL)
  2653               IN_param_value = function_call_param_iterator.next();
  2653               IN_param_value = function_call_param_iterator.next();
  2654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2656             
  2656             
  2657             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2657             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2658             {
  2658             {
  2659         
  2659         
  2660                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2660                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  2661                 return return_type_symbol;
  2661                 return return_type_symbol;
  2662                 
  2662                 
  2684             if (IN_param_value == NULL)
  2684             if (IN_param_value == NULL)
  2685               IN_param_value = function_call_param_iterator.next();
  2685               IN_param_value = function_call_param_iterator.next();
  2686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2688             
  2688             
  2689             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2689             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2690             {
  2690             {
  2691         
  2691         
  2692                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2692                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  2693                 return return_type_symbol;
  2693                 return return_type_symbol;
  2694                 
  2694                 
  2716             if (IN_param_value == NULL)
  2716             if (IN_param_value == NULL)
  2717               IN_param_value = function_call_param_iterator.next();
  2717               IN_param_value = function_call_param_iterator.next();
  2718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2720             
  2720             
  2721             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2721             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2722             {
  2722             {
  2723         
  2723         
  2724                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2724                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  2725                 return return_type_symbol;
  2725                 return return_type_symbol;
  2726                 
  2726                 
  2748             if (IN_param_value == NULL)
  2748             if (IN_param_value == NULL)
  2749               IN_param_value = function_call_param_iterator.next();
  2749               IN_param_value = function_call_param_iterator.next();
  2750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2752             
  2752             
  2753             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2753             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2754             {
  2754             {
  2755         
  2755         
  2756                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2756                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  2757                 return return_type_symbol;
  2757                 return return_type_symbol;
  2758                 
  2758                 
  2780             if (IN_param_value == NULL)
  2780             if (IN_param_value == NULL)
  2781               IN_param_value = function_call_param_iterator.next();
  2781               IN_param_value = function_call_param_iterator.next();
  2782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2784             
  2784             
  2785             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2785             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2786             {
  2786             {
  2787         
  2787         
  2788                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2788                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  2789                 return return_type_symbol;
  2789                 return return_type_symbol;
  2790                 
  2790                 
  2812             if (IN_param_value == NULL)
  2812             if (IN_param_value == NULL)
  2813               IN_param_value = function_call_param_iterator.next();
  2813               IN_param_value = function_call_param_iterator.next();
  2814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2816             
  2816             
  2817             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2817             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2818             {
  2818             {
  2819         
  2819         
  2820                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2820                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  2821                 return return_type_symbol;
  2821                 return return_type_symbol;
  2822                 
  2822                 
  2844             if (IN_param_value == NULL)
  2844             if (IN_param_value == NULL)
  2845               IN_param_value = function_call_param_iterator.next();
  2845               IN_param_value = function_call_param_iterator.next();
  2846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2848             
  2848             
  2849             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2849             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2850             {
  2850             {
  2851         
  2851         
  2852                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2852                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  2853                 return return_type_symbol;
  2853                 return return_type_symbol;
  2854                 
  2854                 
  2876             if (IN_param_value == NULL)
  2876             if (IN_param_value == NULL)
  2877               IN_param_value = function_call_param_iterator.next();
  2877               IN_param_value = function_call_param_iterator.next();
  2878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2880             
  2880             
  2881             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2881             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2882             {
  2882             {
  2883         
  2883         
  2884                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2884                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  2885                 return return_type_symbol;
  2885                 return return_type_symbol;
  2886                 
  2886                 
  2908             if (IN_param_value == NULL)
  2908             if (IN_param_value == NULL)
  2909               IN_param_value = function_call_param_iterator.next();
  2909               IN_param_value = function_call_param_iterator.next();
  2910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2912             
  2912             
  2913             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2913             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2914             {
  2914             {
  2915         
  2915         
  2916                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2916                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  2917                 return return_type_symbol;
  2917                 return return_type_symbol;
  2918                 
  2918                 
  2940             if (IN_param_value == NULL)
  2940             if (IN_param_value == NULL)
  2941               IN_param_value = function_call_param_iterator.next();
  2941               IN_param_value = function_call_param_iterator.next();
  2942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2944             
  2944             
  2945             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2945             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2946             {
  2946             {
  2947         
  2947         
  2948                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2948                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  2949                 return return_type_symbol;
  2949                 return return_type_symbol;
  2950                 
  2950                 
  2972             if (IN_param_value == NULL)
  2972             if (IN_param_value == NULL)
  2973               IN_param_value = function_call_param_iterator.next();
  2973               IN_param_value = function_call_param_iterator.next();
  2974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  2975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  2976             
  2976             
  2977             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  2977             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  2978             {
  2978             {
  2979         
  2979         
  2980                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2980                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  2981                 return return_type_symbol;
  2981                 return return_type_symbol;
  2982                 
  2982                 
  3004             if (IN_param_value == NULL)
  3004             if (IN_param_value == NULL)
  3005               IN_param_value = function_call_param_iterator.next();
  3005               IN_param_value = function_call_param_iterator.next();
  3006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3008             
  3008             
  3009             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3009             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3010             {
  3010             {
  3011         
  3011         
  3012                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3012                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3013                 return return_type_symbol;
  3013                 return return_type_symbol;
  3014                 
  3014                 
  3036             if (IN_param_value == NULL)
  3036             if (IN_param_value == NULL)
  3037               IN_param_value = function_call_param_iterator.next();
  3037               IN_param_value = function_call_param_iterator.next();
  3038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3040             
  3040             
  3041             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
  3041             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
  3042             {
  3042             {
  3043         
  3043         
  3044                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3044                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3045                 return return_type_symbol;
  3045                 return return_type_symbol;
  3046                 
  3046                 
  3068             if (IN_param_value == NULL)
  3068             if (IN_param_value == NULL)
  3069               IN_param_value = function_call_param_iterator.next();
  3069               IN_param_value = function_call_param_iterator.next();
  3070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3072             
  3072             
  3073             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3073             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3074             {
  3074             {
  3075         
  3075         
  3076                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  3076                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  3077                 return return_type_symbol;
  3077                 return return_type_symbol;
  3078                 
  3078                 
  3100             if (IN_param_value == NULL)
  3100             if (IN_param_value == NULL)
  3101               IN_param_value = function_call_param_iterator.next();
  3101               IN_param_value = function_call_param_iterator.next();
  3102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3103             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3104             
  3104             
  3105             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3105             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3106             {
  3106             {
  3107         
  3107         
  3108                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3108                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3109                 return return_type_symbol;
  3109                 return return_type_symbol;
  3110                 
  3110                 
  3132             if (IN_param_value == NULL)
  3132             if (IN_param_value == NULL)
  3133               IN_param_value = function_call_param_iterator.next();
  3133               IN_param_value = function_call_param_iterator.next();
  3134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  3136             
  3137             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3137             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3138             {
  3138             {
  3139         
  3139         
  3140                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  3140                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  3141                 return return_type_symbol;
  3141                 return return_type_symbol;
  3142                 
  3142                 
  3164             if (IN_param_value == NULL)
  3164             if (IN_param_value == NULL)
  3165               IN_param_value = function_call_param_iterator.next();
  3165               IN_param_value = function_call_param_iterator.next();
  3166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3168             
  3168             
  3169             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3169             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3170             {
  3170             {
  3171         
  3171         
  3172                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3172                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3173                 return return_type_symbol;
  3173                 return return_type_symbol;
  3174                 
  3174                 
  3196             if (IN_param_value == NULL)
  3196             if (IN_param_value == NULL)
  3197               IN_param_value = function_call_param_iterator.next();
  3197               IN_param_value = function_call_param_iterator.next();
  3198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3200             
  3200             
  3201             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3201             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3202             {
  3202             {
  3203         
  3203         
  3204                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3204                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3205                 return return_type_symbol;
  3205                 return return_type_symbol;
  3206                 
  3206                 
  3228             if (IN_param_value == NULL)
  3228             if (IN_param_value == NULL)
  3229               IN_param_value = function_call_param_iterator.next();
  3229               IN_param_value = function_call_param_iterator.next();
  3230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3232             
  3232             
  3233             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3233             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3234             {
  3234             {
  3235         
  3235         
  3236                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  3236                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  3237                 return return_type_symbol;
  3237                 return return_type_symbol;
  3238                 
  3238                 
  3260             if (IN_param_value == NULL)
  3260             if (IN_param_value == NULL)
  3261               IN_param_value = function_call_param_iterator.next();
  3261               IN_param_value = function_call_param_iterator.next();
  3262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3264             
  3264             
  3265             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3265             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3266             {
  3266             {
  3267         
  3267         
  3268                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3268                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3269                 return return_type_symbol;
  3269                 return return_type_symbol;
  3270                 
  3270                 
  3292             if (IN_param_value == NULL)
  3292             if (IN_param_value == NULL)
  3293               IN_param_value = function_call_param_iterator.next();
  3293               IN_param_value = function_call_param_iterator.next();
  3294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3296             
  3296             
  3297             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3297             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3298             {
  3298             {
  3299         
  3299         
  3300                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3300                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3301                 return return_type_symbol;
  3301                 return return_type_symbol;
  3302                 
  3302                 
  3324             if (IN_param_value == NULL)
  3324             if (IN_param_value == NULL)
  3325               IN_param_value = function_call_param_iterator.next();
  3325               IN_param_value = function_call_param_iterator.next();
  3326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3328             
  3328             
  3329             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3329             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3330             {
  3330             {
  3331         
  3331         
  3332                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3332                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3333                 return return_type_symbol;
  3333                 return return_type_symbol;
  3334                 
  3334                 
  3356             if (IN_param_value == NULL)
  3356             if (IN_param_value == NULL)
  3357               IN_param_value = function_call_param_iterator.next();
  3357               IN_param_value = function_call_param_iterator.next();
  3358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3360             
  3360             
  3361             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3361             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3362             {
  3362             {
  3363         
  3363         
  3364                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3364                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3365                 return return_type_symbol;
  3365                 return return_type_symbol;
  3366                 
  3366                 
  3388             if (IN_param_value == NULL)
  3388             if (IN_param_value == NULL)
  3389               IN_param_value = function_call_param_iterator.next();
  3389               IN_param_value = function_call_param_iterator.next();
  3390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3392             
  3392             
  3393             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3393             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3394             {
  3394             {
  3395         
  3395         
  3396                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  3396                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  3397                 return return_type_symbol;
  3397                 return return_type_symbol;
  3398                 
  3398                 
  3420             if (IN_param_value == NULL)
  3420             if (IN_param_value == NULL)
  3421               IN_param_value = function_call_param_iterator.next();
  3421               IN_param_value = function_call_param_iterator.next();
  3422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3424             
  3424             
  3425             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3425             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3426             {
  3426             {
  3427         
  3427         
  3428                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  3428                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  3429                 return return_type_symbol;
  3429                 return return_type_symbol;
  3430                 
  3430                 
  3452             if (IN_param_value == NULL)
  3452             if (IN_param_value == NULL)
  3453               IN_param_value = function_call_param_iterator.next();
  3453               IN_param_value = function_call_param_iterator.next();
  3454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3456             
  3456             
  3457             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3457             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3458             {
  3458             {
  3459         
  3459         
  3460                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  3460                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  3461                 return return_type_symbol;
  3461                 return return_type_symbol;
  3462                 
  3462                 
  3484             if (IN_param_value == NULL)
  3484             if (IN_param_value == NULL)
  3485               IN_param_value = function_call_param_iterator.next();
  3485               IN_param_value = function_call_param_iterator.next();
  3486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3488             
  3488             
  3489             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3489             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3490             {
  3490             {
  3491         
  3491         
  3492                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  3492                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  3493                 return return_type_symbol;
  3493                 return return_type_symbol;
  3494                 
  3494                 
  3516             if (IN_param_value == NULL)
  3516             if (IN_param_value == NULL)
  3517               IN_param_value = function_call_param_iterator.next();
  3517               IN_param_value = function_call_param_iterator.next();
  3518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3520             
  3520             
  3521             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3521             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3522             {
  3522             {
  3523         
  3523         
  3524                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  3524                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  3525                 return return_type_symbol;
  3525                 return return_type_symbol;
  3526                 
  3526                 
  3548             if (IN_param_value == NULL)
  3548             if (IN_param_value == NULL)
  3549               IN_param_value = function_call_param_iterator.next();
  3549               IN_param_value = function_call_param_iterator.next();
  3550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3552             
  3552             
  3553             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3553             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3554             {
  3554             {
  3555         
  3555         
  3556                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  3556                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  3557                 return return_type_symbol;
  3557                 return return_type_symbol;
  3558                 
  3558                 
  3580             if (IN_param_value == NULL)
  3580             if (IN_param_value == NULL)
  3581               IN_param_value = function_call_param_iterator.next();
  3581               IN_param_value = function_call_param_iterator.next();
  3582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3584             
  3584             
  3585             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3585             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3586             {
  3586             {
  3587         
  3587         
  3588                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  3588                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  3589                 return return_type_symbol;
  3589                 return return_type_symbol;
  3590                 
  3590                 
  3612             if (IN_param_value == NULL)
  3612             if (IN_param_value == NULL)
  3613               IN_param_value = function_call_param_iterator.next();
  3613               IN_param_value = function_call_param_iterator.next();
  3614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3616             
  3616             
  3617             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3617             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3618             {
  3618             {
  3619         
  3619         
  3620                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3620                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  3621                 return return_type_symbol;
  3621                 return return_type_symbol;
  3622                 
  3622                 
  3644             if (IN_param_value == NULL)
  3644             if (IN_param_value == NULL)
  3645               IN_param_value = function_call_param_iterator.next();
  3645               IN_param_value = function_call_param_iterator.next();
  3646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3648             
  3648             
  3649             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
  3649             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  3650             {
  3650             {
  3651         
  3651         
  3652                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3652                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  3653                 return return_type_symbol;
  3653                 return return_type_symbol;
  3654                 
  3654                 
  3676             if (IN_param_value == NULL)
  3676             if (IN_param_value == NULL)
  3677               IN_param_value = function_call_param_iterator.next();
  3677               IN_param_value = function_call_param_iterator.next();
  3678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3680             
  3680             
  3681             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3681             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3682             {
  3682             {
  3683         
  3683         
  3684                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  3684                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  3685                 return return_type_symbol;
  3685                 return return_type_symbol;
  3686                 
  3686                 
  3708             if (IN_param_value == NULL)
  3708             if (IN_param_value == NULL)
  3709               IN_param_value = function_call_param_iterator.next();
  3709               IN_param_value = function_call_param_iterator.next();
  3710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3712             
  3712             
  3713             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3713             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3714             {
  3714             {
  3715         
  3715         
  3716                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3716                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  3717                 return return_type_symbol;
  3717                 return return_type_symbol;
  3718                 
  3718                 
  3740             if (IN_param_value == NULL)
  3740             if (IN_param_value == NULL)
  3741               IN_param_value = function_call_param_iterator.next();
  3741               IN_param_value = function_call_param_iterator.next();
  3742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3744             
  3744             
  3745             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3745             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3746             {
  3746             {
  3747         
  3747         
  3748                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  3748                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  3749                 return return_type_symbol;
  3749                 return return_type_symbol;
  3750                 
  3750                 
  3772             if (IN_param_value == NULL)
  3772             if (IN_param_value == NULL)
  3773               IN_param_value = function_call_param_iterator.next();
  3773               IN_param_value = function_call_param_iterator.next();
  3774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3776             
  3776             
  3777             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3777             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3778             {
  3778             {
  3779         
  3779         
  3780                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3780                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  3781                 return return_type_symbol;
  3781                 return return_type_symbol;
  3782                 
  3782                 
  3804             if (IN_param_value == NULL)
  3804             if (IN_param_value == NULL)
  3805               IN_param_value = function_call_param_iterator.next();
  3805               IN_param_value = function_call_param_iterator.next();
  3806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3808             
  3808             
  3809             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3809             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3810             {
  3810             {
  3811         
  3811         
  3812                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3812                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  3813                 return return_type_symbol;
  3813                 return return_type_symbol;
  3814                 
  3814                 
  3836             if (IN_param_value == NULL)
  3836             if (IN_param_value == NULL)
  3837               IN_param_value = function_call_param_iterator.next();
  3837               IN_param_value = function_call_param_iterator.next();
  3838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3840             
  3840             
  3841             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3841             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3842             {
  3842             {
  3843         
  3843         
  3844                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  3844                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  3845                 return return_type_symbol;
  3845                 return return_type_symbol;
  3846                 
  3846                 
  3868             if (IN_param_value == NULL)
  3868             if (IN_param_value == NULL)
  3869               IN_param_value = function_call_param_iterator.next();
  3869               IN_param_value = function_call_param_iterator.next();
  3870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3872             
  3872             
  3873             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3873             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3874             {
  3874             {
  3875         
  3875         
  3876                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3876                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  3877                 return return_type_symbol;
  3877                 return return_type_symbol;
  3878                 
  3878                 
  3900             if (IN_param_value == NULL)
  3900             if (IN_param_value == NULL)
  3901               IN_param_value = function_call_param_iterator.next();
  3901               IN_param_value = function_call_param_iterator.next();
  3902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3904             
  3904             
  3905             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3905             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3906             {
  3906             {
  3907         
  3907         
  3908                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3908                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  3909                 return return_type_symbol;
  3909                 return return_type_symbol;
  3910                 
  3910                 
  3932             if (IN_param_value == NULL)
  3932             if (IN_param_value == NULL)
  3933               IN_param_value = function_call_param_iterator.next();
  3933               IN_param_value = function_call_param_iterator.next();
  3934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3936             
  3936             
  3937             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3937             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3938             {
  3938             {
  3939         
  3939         
  3940                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3940                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  3941                 return return_type_symbol;
  3941                 return return_type_symbol;
  3942                 
  3942                 
  3964             if (IN_param_value == NULL)
  3964             if (IN_param_value == NULL)
  3965               IN_param_value = function_call_param_iterator.next();
  3965               IN_param_value = function_call_param_iterator.next();
  3966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3968             
  3968             
  3969             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  3969             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  3970             {
  3970             {
  3971         
  3971         
  3972                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3972                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  3973                 return return_type_symbol;
  3973                 return return_type_symbol;
  3974                 
  3974                 
  3996             if (IN_param_value == NULL)
  3996             if (IN_param_value == NULL)
  3997               IN_param_value = function_call_param_iterator.next();
  3997               IN_param_value = function_call_param_iterator.next();
  3998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  3999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  3999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4000             
  4000             
  4001             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4001             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4002             {
  4002             {
  4003         
  4003         
  4004                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  4004                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  4005                 return return_type_symbol;
  4005                 return return_type_symbol;
  4006                 
  4006                 
  4028             if (IN_param_value == NULL)
  4028             if (IN_param_value == NULL)
  4029               IN_param_value = function_call_param_iterator.next();
  4029               IN_param_value = function_call_param_iterator.next();
  4030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4032             
  4032             
  4033             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4033             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4034             {
  4034             {
  4035         
  4035         
  4036                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  4036                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  4037                 return return_type_symbol;
  4037                 return return_type_symbol;
  4038                 
  4038                 
  4060             if (IN_param_value == NULL)
  4060             if (IN_param_value == NULL)
  4061               IN_param_value = function_call_param_iterator.next();
  4061               IN_param_value = function_call_param_iterator.next();
  4062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4064             
  4064             
  4065             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4065             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4066             {
  4066             {
  4067         
  4067         
  4068                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  4068                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  4069                 return return_type_symbol;
  4069                 return return_type_symbol;
  4070                 
  4070                 
  4092             if (IN_param_value == NULL)
  4092             if (IN_param_value == NULL)
  4093               IN_param_value = function_call_param_iterator.next();
  4093               IN_param_value = function_call_param_iterator.next();
  4094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4096             
  4096             
  4097             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4097             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4098             {
  4098             {
  4099         
  4099         
  4100                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  4100                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  4101                 return return_type_symbol;
  4101                 return return_type_symbol;
  4102                 
  4102                 
  4124             if (IN_param_value == NULL)
  4124             if (IN_param_value == NULL)
  4125               IN_param_value = function_call_param_iterator.next();
  4125               IN_param_value = function_call_param_iterator.next();
  4126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4128             
  4128             
  4129             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4129             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4130             {
  4130             {
  4131         
  4131         
  4132                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4132                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4133                 return return_type_symbol;
  4133                 return return_type_symbol;
  4134                 
  4134                 
  4156             if (IN_param_value == NULL)
  4156             if (IN_param_value == NULL)
  4157               IN_param_value = function_call_param_iterator.next();
  4157               IN_param_value = function_call_param_iterator.next();
  4158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4159             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4160             
  4160             
  4161             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4161             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4162             {
  4162             {
  4163         
  4163         
  4164                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  4164                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  4165                 return return_type_symbol;
  4165                 return return_type_symbol;
  4166                 
  4166                 
  4188             if (IN_param_value == NULL)
  4188             if (IN_param_value == NULL)
  4189               IN_param_value = function_call_param_iterator.next();
  4189               IN_param_value = function_call_param_iterator.next();
  4190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  4192             
  4193             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4193             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4194             {
  4194             {
  4195         
  4195         
  4196                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  4196                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  4197                 return return_type_symbol;
  4197                 return return_type_symbol;
  4198                 
  4198                 
  4220             if (IN_param_value == NULL)
  4220             if (IN_param_value == NULL)
  4221               IN_param_value = function_call_param_iterator.next();
  4221               IN_param_value = function_call_param_iterator.next();
  4222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4224             
  4224             
  4225             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4225             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4226             {
  4226             {
  4227         
  4227         
  4228                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4228                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4229                 return return_type_symbol;
  4229                 return return_type_symbol;
  4230                 
  4230                 
  4252             if (IN_param_value == NULL)
  4252             if (IN_param_value == NULL)
  4253               IN_param_value = function_call_param_iterator.next();
  4253               IN_param_value = function_call_param_iterator.next();
  4254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4256             
  4256             
  4257             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
  4257             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  4258             {
  4258             {
  4259         
  4259         
  4260                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4260                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4261                 return return_type_symbol;
  4261                 return return_type_symbol;
  4262                 
  4262                 
  4284             if (IN_param_value == NULL)
  4284             if (IN_param_value == NULL)
  4285               IN_param_value = function_call_param_iterator.next();
  4285               IN_param_value = function_call_param_iterator.next();
  4286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4288             
  4288             
  4289             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4289             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4290             {
  4290             {
  4291         
  4291         
  4292                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  4292                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  4293                 return return_type_symbol;
  4293                 return return_type_symbol;
  4294                 
  4294                 
  4316             if (IN_param_value == NULL)
  4316             if (IN_param_value == NULL)
  4317               IN_param_value = function_call_param_iterator.next();
  4317               IN_param_value = function_call_param_iterator.next();
  4318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4320             
  4320             
  4321             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4321             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4322             {
  4322             {
  4323         
  4323         
  4324                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4324                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4325                 return return_type_symbol;
  4325                 return return_type_symbol;
  4326                 
  4326                 
  4348             if (IN_param_value == NULL)
  4348             if (IN_param_value == NULL)
  4349               IN_param_value = function_call_param_iterator.next();
  4349               IN_param_value = function_call_param_iterator.next();
  4350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4352             
  4352             
  4353             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4353             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4354             {
  4354             {
  4355         
  4355         
  4356                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  4356                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  4357                 return return_type_symbol;
  4357                 return return_type_symbol;
  4358                 
  4358                 
  4380             if (IN_param_value == NULL)
  4380             if (IN_param_value == NULL)
  4381               IN_param_value = function_call_param_iterator.next();
  4381               IN_param_value = function_call_param_iterator.next();
  4382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4384             
  4384             
  4385             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4385             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4386             {
  4386             {
  4387         
  4387         
  4388                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  4388                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  4389                 return return_type_symbol;
  4389                 return return_type_symbol;
  4390                 
  4390                 
  4412             if (IN_param_value == NULL)
  4412             if (IN_param_value == NULL)
  4413               IN_param_value = function_call_param_iterator.next();
  4413               IN_param_value = function_call_param_iterator.next();
  4414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4414             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4415             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4416             
  4416             
  4417             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4417             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4418             {
  4418             {
  4419         
  4419         
  4420                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  4420                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  4421                 return return_type_symbol;
  4421                 return return_type_symbol;
  4422                 
  4422                 
  4444             if (IN_param_value == NULL)
  4444             if (IN_param_value == NULL)
  4445               IN_param_value = function_call_param_iterator.next();
  4445               IN_param_value = function_call_param_iterator.next();
  4446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4448             
  4448             
  4449             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4449             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4450             {
  4450             {
  4451         
  4451         
  4452                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  4452                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  4453                 return return_type_symbol;
  4453                 return return_type_symbol;
  4454                 
  4454                 
  4476             if (IN_param_value == NULL)
  4476             if (IN_param_value == NULL)
  4477               IN_param_value = function_call_param_iterator.next();
  4477               IN_param_value = function_call_param_iterator.next();
  4478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4480             
  4480             
  4481             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4481             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4482             {
  4482             {
  4483         
  4483         
  4484                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  4484                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  4485                 return return_type_symbol;
  4485                 return return_type_symbol;
  4486                 
  4486                 
  4508             if (IN_param_value == NULL)
  4508             if (IN_param_value == NULL)
  4509               IN_param_value = function_call_param_iterator.next();
  4509               IN_param_value = function_call_param_iterator.next();
  4510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4512             
  4512             
  4513             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4513             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4514             {
  4514             {
  4515         
  4515         
  4516                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  4516                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  4517                 return return_type_symbol;
  4517                 return return_type_symbol;
  4518                 
  4518                 
  4540             if (IN_param_value == NULL)
  4540             if (IN_param_value == NULL)
  4541               IN_param_value = function_call_param_iterator.next();
  4541               IN_param_value = function_call_param_iterator.next();
  4542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4544             
  4544             
  4545             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4545             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4546             {
  4546             {
  4547         
  4547         
  4548                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  4548                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  4549                 return return_type_symbol;
  4549                 return return_type_symbol;
  4550                 
  4550                 
  4572             if (IN_param_value == NULL)
  4572             if (IN_param_value == NULL)
  4573               IN_param_value = function_call_param_iterator.next();
  4573               IN_param_value = function_call_param_iterator.next();
  4574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4576             
  4576             
  4577             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4577             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4578             {
  4578             {
  4579         
  4579         
  4580                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  4580                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  4581                 return return_type_symbol;
  4581                 return return_type_symbol;
  4582                 
  4582                 
  4604             if (IN_param_value == NULL)
  4604             if (IN_param_value == NULL)
  4605               IN_param_value = function_call_param_iterator.next();
  4605               IN_param_value = function_call_param_iterator.next();
  4606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4608             
  4608             
  4609             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4609             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4610             {
  4610             {
  4611         
  4611         
  4612                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  4612                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  4613                 return return_type_symbol;
  4613                 return return_type_symbol;
  4614                 
  4614                 
  4636             if (IN_param_value == NULL)
  4636             if (IN_param_value == NULL)
  4637               IN_param_value = function_call_param_iterator.next();
  4637               IN_param_value = function_call_param_iterator.next();
  4638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4640             
  4640             
  4641             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4641             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4642             {
  4642             {
  4643         
  4643         
  4644                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  4644                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  4645                 return return_type_symbol;
  4645                 return return_type_symbol;
  4646                 
  4646                 
  4668             if (IN_param_value == NULL)
  4668             if (IN_param_value == NULL)
  4669               IN_param_value = function_call_param_iterator.next();
  4669               IN_param_value = function_call_param_iterator.next();
  4670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4672             
  4672             
  4673             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4673             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4674             {
  4674             {
  4675         
  4675         
  4676                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  4676                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  4677                 return return_type_symbol;
  4677                 return return_type_symbol;
  4678                 
  4678                 
  4700             if (IN_param_value == NULL)
  4700             if (IN_param_value == NULL)
  4701               IN_param_value = function_call_param_iterator.next();
  4701               IN_param_value = function_call_param_iterator.next();
  4702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4704             
  4704             
  4705             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4705             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4706             {
  4706             {
  4707         
  4707         
  4708                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  4708                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  4709                 return return_type_symbol;
  4709                 return return_type_symbol;
  4710                 
  4710                 
  4732             if (IN_param_value == NULL)
  4732             if (IN_param_value == NULL)
  4733               IN_param_value = function_call_param_iterator.next();
  4733               IN_param_value = function_call_param_iterator.next();
  4734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4736             
  4736             
  4737             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4737             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4738             {
  4738             {
  4739         
  4739         
  4740                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4740                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  4741                 return return_type_symbol;
  4741                 return return_type_symbol;
  4742                 
  4742                 
  4764             if (IN_param_value == NULL)
  4764             if (IN_param_value == NULL)
  4765               IN_param_value = function_call_param_iterator.next();
  4765               IN_param_value = function_call_param_iterator.next();
  4766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4768             
  4768             
  4769             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4769             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4770             {
  4770             {
  4771         
  4771         
  4772                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  4772                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  4773                 return return_type_symbol;
  4773                 return return_type_symbol;
  4774                 
  4774                 
  4796             if (IN_param_value == NULL)
  4796             if (IN_param_value == NULL)
  4797               IN_param_value = function_call_param_iterator.next();
  4797               IN_param_value = function_call_param_iterator.next();
  4798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4800             
  4800             
  4801             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4801             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4802             {
  4802             {
  4803         
  4803         
  4804                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  4804                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  4805                 return return_type_symbol;
  4805                 return return_type_symbol;
  4806                 
  4806                 
  4828             if (IN_param_value == NULL)
  4828             if (IN_param_value == NULL)
  4829               IN_param_value = function_call_param_iterator.next();
  4829               IN_param_value = function_call_param_iterator.next();
  4830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4832             
  4832             
  4833             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4833             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4834             {
  4834             {
  4835         
  4835         
  4836                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4836                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  4837                 return return_type_symbol;
  4837                 return return_type_symbol;
  4838                 
  4838                 
  4860             if (IN_param_value == NULL)
  4860             if (IN_param_value == NULL)
  4861               IN_param_value = function_call_param_iterator.next();
  4861               IN_param_value = function_call_param_iterator.next();
  4862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4864             
  4864             
  4865             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
  4865             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  4866             {
  4866             {
  4867         
  4867         
  4868                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4868                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  4869                 return return_type_symbol;
  4869                 return return_type_symbol;
  4870                 
  4870                 
  4892             if (IN_param_value == NULL)
  4892             if (IN_param_value == NULL)
  4893               IN_param_value = function_call_param_iterator.next();
  4893               IN_param_value = function_call_param_iterator.next();
  4894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4896             
  4896             
  4897             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  4897             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  4898             {
  4898             {
  4899         
  4899         
  4900                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  4900                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  4901                 return return_type_symbol;
  4901                 return return_type_symbol;
  4902                 
  4902                 
  4924             if (IN_param_value == NULL)
  4924             if (IN_param_value == NULL)
  4925               IN_param_value = function_call_param_iterator.next();
  4925               IN_param_value = function_call_param_iterator.next();
  4926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4928             
  4928             
  4929             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  4929             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  4930             {
  4930             {
  4931         
  4931         
  4932                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4932                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  4933                 return return_type_symbol;
  4933                 return return_type_symbol;
  4934                 
  4934                 
  4956             if (IN_param_value == NULL)
  4956             if (IN_param_value == NULL)
  4957               IN_param_value = function_call_param_iterator.next();
  4957               IN_param_value = function_call_param_iterator.next();
  4958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4960             
  4960             
  4961             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  4961             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  4962             {
  4962             {
  4963         
  4963         
  4964                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  4964                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  4965                 return return_type_symbol;
  4965                 return return_type_symbol;
  4966                 
  4966                 
  4988             if (IN_param_value == NULL)
  4988             if (IN_param_value == NULL)
  4989               IN_param_value = function_call_param_iterator.next();
  4989               IN_param_value = function_call_param_iterator.next();
  4990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  4991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  4992             
  4992             
  4993             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  4993             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  4994             {
  4994             {
  4995         
  4995         
  4996                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  4996                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  4997                 return return_type_symbol;
  4997                 return return_type_symbol;
  4998                 
  4998                 
  5020             if (IN_param_value == NULL)
  5020             if (IN_param_value == NULL)
  5021               IN_param_value = function_call_param_iterator.next();
  5021               IN_param_value = function_call_param_iterator.next();
  5022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5024             
  5024             
  5025             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5025             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5026             {
  5026             {
  5027         
  5027         
  5028                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  5028                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  5029                 return return_type_symbol;
  5029                 return return_type_symbol;
  5030                 
  5030                 
  5052             if (IN_param_value == NULL)
  5052             if (IN_param_value == NULL)
  5053               IN_param_value = function_call_param_iterator.next();
  5053               IN_param_value = function_call_param_iterator.next();
  5054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5056             
  5056             
  5057             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5057             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5058             {
  5058             {
  5059         
  5059         
  5060                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  5060                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  5061                 return return_type_symbol;
  5061                 return return_type_symbol;
  5062                 
  5062                 
  5084             if (IN_param_value == NULL)
  5084             if (IN_param_value == NULL)
  5085               IN_param_value = function_call_param_iterator.next();
  5085               IN_param_value = function_call_param_iterator.next();
  5086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5088             
  5088             
  5089             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5089             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5090             {
  5090             {
  5091         
  5091         
  5092                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5092                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5093                 return return_type_symbol;
  5093                 return return_type_symbol;
  5094                 
  5094                 
  5116             if (IN_param_value == NULL)
  5116             if (IN_param_value == NULL)
  5117               IN_param_value = function_call_param_iterator.next();
  5117               IN_param_value = function_call_param_iterator.next();
  5118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5120             
  5120             
  5121             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5121             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5122             {
  5122             {
  5123         
  5123         
  5124                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  5124                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  5125                 return return_type_symbol;
  5125                 return return_type_symbol;
  5126                 
  5126                 
  5148             if (IN_param_value == NULL)
  5148             if (IN_param_value == NULL)
  5149               IN_param_value = function_call_param_iterator.next();
  5149               IN_param_value = function_call_param_iterator.next();
  5150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5152             
  5152             
  5153             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5153             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5154             {
  5154             {
  5155         
  5155         
  5156                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  5156                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  5157                 return return_type_symbol;
  5157                 return return_type_symbol;
  5158                 
  5158                 
  5180             if (IN_param_value == NULL)
  5180             if (IN_param_value == NULL)
  5181               IN_param_value = function_call_param_iterator.next();
  5181               IN_param_value = function_call_param_iterator.next();
  5182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5184             
  5184             
  5185             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5185             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5186             {
  5186             {
  5187         
  5187         
  5188                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  5188                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  5189                 return return_type_symbol;
  5189                 return return_type_symbol;
  5190                 
  5190                 
  5212             if (IN_param_value == NULL)
  5212             if (IN_param_value == NULL)
  5213               IN_param_value = function_call_param_iterator.next();
  5213               IN_param_value = function_call_param_iterator.next();
  5214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5215             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5216             
  5216             
  5217             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5217             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5218             {
  5218             {
  5219         
  5219         
  5220                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  5220                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  5221                 return return_type_symbol;
  5221                 return return_type_symbol;
  5222                 
  5222                 
  5244             if (IN_param_value == NULL)
  5244             if (IN_param_value == NULL)
  5245               IN_param_value = function_call_param_iterator.next();
  5245               IN_param_value = function_call_param_iterator.next();
  5246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  5248             
  5249             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5249             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5250             {
  5250             {
  5251         
  5251         
  5252                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  5252                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  5253                 return return_type_symbol;
  5253                 return return_type_symbol;
  5254                 
  5254                 
  5276             if (IN_param_value == NULL)
  5276             if (IN_param_value == NULL)
  5277               IN_param_value = function_call_param_iterator.next();
  5277               IN_param_value = function_call_param_iterator.next();
  5278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5280             
  5280             
  5281             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5281             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5282             {
  5282             {
  5283         
  5283         
  5284                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  5284                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  5285                 return return_type_symbol;
  5285                 return return_type_symbol;
  5286                 
  5286                 
  5308             if (IN_param_value == NULL)
  5308             if (IN_param_value == NULL)
  5309               IN_param_value = function_call_param_iterator.next();
  5309               IN_param_value = function_call_param_iterator.next();
  5310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5312             
  5312             
  5313             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5313             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5314             {
  5314             {
  5315         
  5315         
  5316                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  5316                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  5317                 return return_type_symbol;
  5317                 return return_type_symbol;
  5318                 
  5318                 
  5340             if (IN_param_value == NULL)
  5340             if (IN_param_value == NULL)
  5341               IN_param_value = function_call_param_iterator.next();
  5341               IN_param_value = function_call_param_iterator.next();
  5342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5344             
  5344             
  5345             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5345             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5346             {
  5346             {
  5347         
  5347         
  5348                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  5348                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  5349                 return return_type_symbol;
  5349                 return return_type_symbol;
  5350                 
  5350                 
  5372             if (IN_param_value == NULL)
  5372             if (IN_param_value == NULL)
  5373               IN_param_value = function_call_param_iterator.next();
  5373               IN_param_value = function_call_param_iterator.next();
  5374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5376             
  5376             
  5377             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5377             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5378             {
  5378             {
  5379         
  5379         
  5380                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  5380                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  5381                 return return_type_symbol;
  5381                 return return_type_symbol;
  5382                 
  5382                 
  5404             if (IN_param_value == NULL)
  5404             if (IN_param_value == NULL)
  5405               IN_param_value = function_call_param_iterator.next();
  5405               IN_param_value = function_call_param_iterator.next();
  5406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5408             
  5408             
  5409             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5409             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5410             {
  5410             {
  5411         
  5411         
  5412                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  5412                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  5413                 return return_type_symbol;
  5413                 return return_type_symbol;
  5414                 
  5414                 
  5436             if (IN_param_value == NULL)
  5436             if (IN_param_value == NULL)
  5437               IN_param_value = function_call_param_iterator.next();
  5437               IN_param_value = function_call_param_iterator.next();
  5438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5440             
  5440             
  5441             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5441             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5442             {
  5442             {
  5443         
  5443         
  5444                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  5444                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  5445                 return return_type_symbol;
  5445                 return return_type_symbol;
  5446                 
  5446                 
  5468             if (IN_param_value == NULL)
  5468             if (IN_param_value == NULL)
  5469               IN_param_value = function_call_param_iterator.next();
  5469               IN_param_value = function_call_param_iterator.next();
  5470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5470             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5471             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5472             
  5472             
  5473             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
  5473             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  5474             {
  5474             {
  5475         
  5475         
  5476                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  5476                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  5477                 return return_type_symbol;
  5477                 return return_type_symbol;
  5478                 
  5478                 
  5500             if (IN_param_value == NULL)
  5500             if (IN_param_value == NULL)
  5501               IN_param_value = function_call_param_iterator.next();
  5501               IN_param_value = function_call_param_iterator.next();
  5502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5504             
  5504             
  5505             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5505             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5506             {
  5506             {
  5507         
  5507         
  5508                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  5508                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  5509                 return return_type_symbol;
  5509                 return return_type_symbol;
  5510                 
  5510                 
  5532             if (IN_param_value == NULL)
  5532             if (IN_param_value == NULL)
  5533               IN_param_value = function_call_param_iterator.next();
  5533               IN_param_value = function_call_param_iterator.next();
  5534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5536             
  5536             
  5537             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5537             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5538             {
  5538             {
  5539         
  5539         
  5540                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  5540                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  5541                 return return_type_symbol;
  5541                 return return_type_symbol;
  5542                 
  5542                 
  5564             if (IN_param_value == NULL)
  5564             if (IN_param_value == NULL)
  5565               IN_param_value = function_call_param_iterator.next();
  5565               IN_param_value = function_call_param_iterator.next();
  5566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5568             
  5568             
  5569             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5569             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5570             {
  5570             {
  5571         
  5571         
  5572                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  5572                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  5573                 return return_type_symbol;
  5573                 return return_type_symbol;
  5574                 
  5574                 
  5596             if (IN_param_value == NULL)
  5596             if (IN_param_value == NULL)
  5597               IN_param_value = function_call_param_iterator.next();
  5597               IN_param_value = function_call_param_iterator.next();
  5598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5600             
  5600             
  5601             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5601             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5602             {
  5602             {
  5603         
  5603         
  5604                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  5604                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  5605                 return return_type_symbol;
  5605                 return return_type_symbol;
  5606                 
  5606                 
  5628             if (IN_param_value == NULL)
  5628             if (IN_param_value == NULL)
  5629               IN_param_value = function_call_param_iterator.next();
  5629               IN_param_value = function_call_param_iterator.next();
  5630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5632             
  5632             
  5633             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5633             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5634             {
  5634             {
  5635         
  5635         
  5636                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  5636                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  5637                 return return_type_symbol;
  5637                 return return_type_symbol;
  5638                 
  5638                 
  5660             if (IN_param_value == NULL)
  5660             if (IN_param_value == NULL)
  5661               IN_param_value = function_call_param_iterator.next();
  5661               IN_param_value = function_call_param_iterator.next();
  5662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5664             
  5664             
  5665             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5665             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5666             {
  5666             {
  5667         
  5667         
  5668                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  5668                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  5669                 return return_type_symbol;
  5669                 return return_type_symbol;
  5670                 
  5670                 
  5692             if (IN_param_value == NULL)
  5692             if (IN_param_value == NULL)
  5693               IN_param_value = function_call_param_iterator.next();
  5693               IN_param_value = function_call_param_iterator.next();
  5694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5696             
  5696             
  5697             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5697             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5698             {
  5698             {
  5699         
  5699         
  5700                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5700                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  5701                 return return_type_symbol;
  5701                 return return_type_symbol;
  5702                 
  5702                 
  5724             if (IN_param_value == NULL)
  5724             if (IN_param_value == NULL)
  5725               IN_param_value = function_call_param_iterator.next();
  5725               IN_param_value = function_call_param_iterator.next();
  5726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5728             
  5728             
  5729             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5729             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5730             {
  5730             {
  5731         
  5731         
  5732                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  5732                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  5733                 return return_type_symbol;
  5733                 return return_type_symbol;
  5734                 
  5734                 
  5756             if (IN_param_value == NULL)
  5756             if (IN_param_value == NULL)
  5757               IN_param_value = function_call_param_iterator.next();
  5757               IN_param_value = function_call_param_iterator.next();
  5758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5760             
  5760             
  5761             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5761             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5762             {
  5762             {
  5763         
  5763         
  5764                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  5764                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  5765                 return return_type_symbol;
  5765                 return return_type_symbol;
  5766                 
  5766                 
  5788             if (IN_param_value == NULL)
  5788             if (IN_param_value == NULL)
  5789               IN_param_value = function_call_param_iterator.next();
  5789               IN_param_value = function_call_param_iterator.next();
  5790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5792             
  5792             
  5793             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5793             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5794             {
  5794             {
  5795         
  5795         
  5796                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  5796                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  5797                 return return_type_symbol;
  5797                 return return_type_symbol;
  5798                 
  5798                 
  5820             if (IN_param_value == NULL)
  5820             if (IN_param_value == NULL)
  5821               IN_param_value = function_call_param_iterator.next();
  5821               IN_param_value = function_call_param_iterator.next();
  5822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5824             
  5824             
  5825             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5825             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5826             {
  5826             {
  5827         
  5827         
  5828                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  5828                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  5829                 return return_type_symbol;
  5829                 return return_type_symbol;
  5830                 
  5830                 
  5852             if (IN_param_value == NULL)
  5852             if (IN_param_value == NULL)
  5853               IN_param_value = function_call_param_iterator.next();
  5853               IN_param_value = function_call_param_iterator.next();
  5854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5856             
  5856             
  5857             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5857             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5858             {
  5858             {
  5859         
  5859         
  5860                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  5860                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  5861                 return return_type_symbol;
  5861                 return return_type_symbol;
  5862                 
  5862                 
  5884             if (IN_param_value == NULL)
  5884             if (IN_param_value == NULL)
  5885               IN_param_value = function_call_param_iterator.next();
  5885               IN_param_value = function_call_param_iterator.next();
  5886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5888             
  5888             
  5889             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5889             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5890             {
  5890             {
  5891         
  5891         
  5892                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  5892                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  5893                 return return_type_symbol;
  5893                 return return_type_symbol;
  5894                 
  5894                 
  5916             if (IN_param_value == NULL)
  5916             if (IN_param_value == NULL)
  5917               IN_param_value = function_call_param_iterator.next();
  5917               IN_param_value = function_call_param_iterator.next();
  5918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5920             
  5920             
  5921             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5921             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5922             {
  5922             {
  5923         
  5923         
  5924                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  5924                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  5925                 return return_type_symbol;
  5925                 return return_type_symbol;
  5926                 
  5926                 
  5948             if (IN_param_value == NULL)
  5948             if (IN_param_value == NULL)
  5949               IN_param_value = function_call_param_iterator.next();
  5949               IN_param_value = function_call_param_iterator.next();
  5950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5952             
  5952             
  5953             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5953             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5954             {
  5954             {
  5955         
  5955         
  5956                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  5956                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  5957                 return return_type_symbol;
  5957                 return return_type_symbol;
  5958                 
  5958                 
  5980             if (IN_param_value == NULL)
  5980             if (IN_param_value == NULL)
  5981               IN_param_value = function_call_param_iterator.next();
  5981               IN_param_value = function_call_param_iterator.next();
  5982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  5983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  5984             
  5984             
  5985             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  5985             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  5986             {
  5986             {
  5987         
  5987         
  5988                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  5988                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  5989                 return return_type_symbol;
  5989                 return return_type_symbol;
  5990                 
  5990                 
  6012             if (IN_param_value == NULL)
  6012             if (IN_param_value == NULL)
  6013               IN_param_value = function_call_param_iterator.next();
  6013               IN_param_value = function_call_param_iterator.next();
  6014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6016             
  6016             
  6017             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6017             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6018             {
  6018             {
  6019         
  6019         
  6020                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  6020                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  6021                 return return_type_symbol;
  6021                 return return_type_symbol;
  6022                 
  6022                 
  6044             if (IN_param_value == NULL)
  6044             if (IN_param_value == NULL)
  6045               IN_param_value = function_call_param_iterator.next();
  6045               IN_param_value = function_call_param_iterator.next();
  6046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6048             
  6048             
  6049             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6049             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6050             {
  6050             {
  6051         
  6051         
  6052                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  6052                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  6053                 return return_type_symbol;
  6053                 return return_type_symbol;
  6054                 
  6054                 
  6076             if (IN_param_value == NULL)
  6076             if (IN_param_value == NULL)
  6077               IN_param_value = function_call_param_iterator.next();
  6077               IN_param_value = function_call_param_iterator.next();
  6078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6080             
  6080             
  6081             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
  6081             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
  6082             {
  6082             {
  6083         
  6083         
  6084                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  6084                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  6085                 return return_type_symbol;
  6085                 return return_type_symbol;
  6086                 
  6086                 
  6108             if (IN_param_value == NULL)
  6108             if (IN_param_value == NULL)
  6109               IN_param_value = function_call_param_iterator.next();
  6109               IN_param_value = function_call_param_iterator.next();
  6110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6112             
  6112             
  6113             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6113             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6114             {
  6114             {
  6115         
  6115         
  6116                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  6116                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  6117                 return return_type_symbol;
  6117                 return return_type_symbol;
  6118                 
  6118                 
  6140             if (IN_param_value == NULL)
  6140             if (IN_param_value == NULL)
  6141               IN_param_value = function_call_param_iterator.next();
  6141               IN_param_value = function_call_param_iterator.next();
  6142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6144             
  6144             
  6145             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6145             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6146             {
  6146             {
  6147         
  6147         
  6148                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  6148                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  6149                 return return_type_symbol;
  6149                 return return_type_symbol;
  6150                 
  6150                 
  6172             if (IN_param_value == NULL)
  6172             if (IN_param_value == NULL)
  6173               IN_param_value = function_call_param_iterator.next();
  6173               IN_param_value = function_call_param_iterator.next();
  6174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6176             
  6176             
  6177             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6177             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6178             {
  6178             {
  6179         
  6179         
  6180                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  6180                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  6181                 return return_type_symbol;
  6181                 return return_type_symbol;
  6182                 
  6182                 
  6204             if (IN_param_value == NULL)
  6204             if (IN_param_value == NULL)
  6205               IN_param_value = function_call_param_iterator.next();
  6205               IN_param_value = function_call_param_iterator.next();
  6206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6208             
  6208             
  6209             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6209             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6210             {
  6210             {
  6211         
  6211         
  6212                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  6212                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  6213                 return return_type_symbol;
  6213                 return return_type_symbol;
  6214                 
  6214                 
  6236             if (IN_param_value == NULL)
  6236             if (IN_param_value == NULL)
  6237               IN_param_value = function_call_param_iterator.next();
  6237               IN_param_value = function_call_param_iterator.next();
  6238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6240             
  6240             
  6241             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6241             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6242             {
  6242             {
  6243         
  6243         
  6244                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  6244                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  6245                 return return_type_symbol;
  6245                 return return_type_symbol;
  6246                 
  6246                 
  6268             if (IN_param_value == NULL)
  6268             if (IN_param_value == NULL)
  6269               IN_param_value = function_call_param_iterator.next();
  6269               IN_param_value = function_call_param_iterator.next();
  6270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6271             last_type_symbol = last_type_symbol && search_expression_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             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6272             
  6272             
  6273             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6273             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6274             {
  6274             {
  6275         
  6275         
  6276                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  6276                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  6277                 return return_type_symbol;
  6277                 return return_type_symbol;
  6278                 
  6278                 
  6300             if (IN_param_value == NULL)
  6300             if (IN_param_value == NULL)
  6301               IN_param_value = function_call_param_iterator.next();
  6301               IN_param_value = function_call_param_iterator.next();
  6302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  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 ;
  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             
  6304             
  6305             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6305             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6306             {
  6306             {
  6307         
  6307         
  6308                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  6308                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  6309                 return return_type_symbol;
  6309                 return return_type_symbol;
  6310                 
  6310                 
  6332             if (IN_param_value == NULL)
  6332             if (IN_param_value == NULL)
  6333               IN_param_value = function_call_param_iterator.next();
  6333               IN_param_value = function_call_param_iterator.next();
  6334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6336             
  6336             
  6337             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6337             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6338             {
  6338             {
  6339         
  6339         
  6340                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  6340                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  6341                 return return_type_symbol;
  6341                 return return_type_symbol;
  6342                 
  6342                 
  6364             if (IN_param_value == NULL)
  6364             if (IN_param_value == NULL)
  6365               IN_param_value = function_call_param_iterator.next();
  6365               IN_param_value = function_call_param_iterator.next();
  6366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6368             
  6368             
  6369             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6369             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6370             {
  6370             {
  6371         
  6371         
  6372                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  6372                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  6373                 return return_type_symbol;
  6373                 return return_type_symbol;
  6374                 
  6374                 
  6396             if (IN_param_value == NULL)
  6396             if (IN_param_value == NULL)
  6397               IN_param_value = function_call_param_iterator.next();
  6397               IN_param_value = function_call_param_iterator.next();
  6398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6400             
  6400             
  6401             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6401             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6402             {
  6402             {
  6403         
  6403         
  6404                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  6404                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  6405                 return return_type_symbol;
  6405                 return return_type_symbol;
  6406                 
  6406                 
  6428             if (IN_param_value == NULL)
  6428             if (IN_param_value == NULL)
  6429               IN_param_value = function_call_param_iterator.next();
  6429               IN_param_value = function_call_param_iterator.next();
  6430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6432             
  6432             
  6433             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6433             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6434             {
  6434             {
  6435         
  6435         
  6436                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  6436                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
  6437                 return return_type_symbol;
  6437                 return return_type_symbol;
  6438                 
  6438                 
  6460             if (IN_param_value == NULL)
  6460             if (IN_param_value == NULL)
  6461               IN_param_value = function_call_param_iterator.next();
  6461               IN_param_value = function_call_param_iterator.next();
  6462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6464             
  6464             
  6465             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6465             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6466             {
  6466             {
  6467         
  6467         
  6468                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  6468                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
  6469                 return return_type_symbol;
  6469                 return return_type_symbol;
  6470                 
  6470                 
  6492             if (IN_param_value == NULL)
  6492             if (IN_param_value == NULL)
  6493               IN_param_value = function_call_param_iterator.next();
  6493               IN_param_value = function_call_param_iterator.next();
  6494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6496             
  6496             
  6497             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6497             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6498             {
  6498             {
  6499         
  6499         
  6500                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  6500                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  6501                 return return_type_symbol;
  6501                 return return_type_symbol;
  6502                 
  6502                 
  6524             if (IN_param_value == NULL)
  6524             if (IN_param_value == NULL)
  6525               IN_param_value = function_call_param_iterator.next();
  6525               IN_param_value = function_call_param_iterator.next();
  6526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6526             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6527             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6528             
  6528             
  6529             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6529             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6530             {
  6530             {
  6531         
  6531         
  6532                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  6532                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
  6533                 return return_type_symbol;
  6533                 return return_type_symbol;
  6534                 
  6534                 
  6556             if (IN_param_value == NULL)
  6556             if (IN_param_value == NULL)
  6557               IN_param_value = function_call_param_iterator.next();
  6557               IN_param_value = function_call_param_iterator.next();
  6558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6560             
  6560             
  6561             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6561             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6562             {
  6562             {
  6563         
  6563         
  6564                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  6564                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  6565                 return return_type_symbol;
  6565                 return return_type_symbol;
  6566                 
  6566                 
  6588             if (IN_param_value == NULL)
  6588             if (IN_param_value == NULL)
  6589               IN_param_value = function_call_param_iterator.next();
  6589               IN_param_value = function_call_param_iterator.next();
  6590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6592             
  6592             
  6593             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6593             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6594             {
  6594             {
  6595         
  6595         
  6596                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  6596                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  6597                 return return_type_symbol;
  6597                 return return_type_symbol;
  6598                 
  6598                 
  6620             if (IN_param_value == NULL)
  6620             if (IN_param_value == NULL)
  6621               IN_param_value = function_call_param_iterator.next();
  6621               IN_param_value = function_call_param_iterator.next();
  6622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6624             
  6624             
  6625             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6625             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6626             {
  6626             {
  6627         
  6627         
  6628                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  6628                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  6629                 return return_type_symbol;
  6629                 return return_type_symbol;
  6630                 
  6630                 
  6652             if (IN_param_value == NULL)
  6652             if (IN_param_value == NULL)
  6653               IN_param_value = function_call_param_iterator.next();
  6653               IN_param_value = function_call_param_iterator.next();
  6654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6656             
  6656             
  6657             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6657             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6658             {
  6658             {
  6659         
  6659         
  6660                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  6660                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  6661                 return return_type_symbol;
  6661                 return return_type_symbol;
  6662                 
  6662                 
  6684             if (IN_param_value == NULL)
  6684             if (IN_param_value == NULL)
  6685               IN_param_value = function_call_param_iterator.next();
  6685               IN_param_value = function_call_param_iterator.next();
  6686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6688             
  6688             
  6689             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
  6689             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
  6690             {
  6690             {
  6691         
  6691         
  6692                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  6692                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
  6693                 return return_type_symbol;
  6693                 return return_type_symbol;
  6694                 
  6694                 
  6699         
  6699         
  6700     }/*function_lreal_to_lword*/
  6700     }/*function_lreal_to_lword*/
  6701     break;
  6701     break;
  6702 
  6702 
  6703 /****
  6703 /****
  6704  *TIME_TO_BOOL
  6704  *TIME_TO_SINT
  6705  */
  6705  */
  6706     case function_time_to_bool :
  6706     case function_time_to_sint :
  6707     {
  6707     {
  6708         symbol_c *last_type_symbol = NULL;
  6708         symbol_c *last_type_symbol = NULL;
  6709 
  6709 
  6710         {
  6710         {
  6711             identifier_c param_name("IN");
  6711             identifier_c param_name("IN");
  6712             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6712             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6714             
  6714             
  6715             /* Get the value from a foo(<param_value>) style call */
  6715             /* Get the value from a foo(<param_value>) style call */
  6716             if (IN_param_value == NULL)
  6716             if (IN_param_value == NULL)
  6717               IN_param_value = function_call_param_iterator.next();
  6717               IN_param_value = function_call_param_iterator.next();
  6718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6720             
  6720             
  6721             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  6721             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6722             {
       
  6723         
       
  6724                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  6725                 return return_type_symbol;
       
  6726                 
       
  6727             }
       
  6728             
       
  6729             ERROR;
       
  6730         }
       
  6731         
       
  6732     }/*function_time_to_sint*/
       
  6733     break;
       
  6734 
       
  6735 /****
       
  6736  *TIME_TO_INT
       
  6737  */
       
  6738     case function_time_to_int :
       
  6739     {
       
  6740         symbol_c *last_type_symbol = NULL;
       
  6741 
       
  6742         {
       
  6743             identifier_c param_name("IN");
       
  6744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6746             
       
  6747             /* Get the value from a foo(<param_value>) style call */
       
  6748             if (IN_param_value == NULL)
       
  6749               IN_param_value = function_call_param_iterator.next();
       
  6750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6752             
       
  6753             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6754             {
       
  6755         
       
  6756                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  6757                 return return_type_symbol;
       
  6758                 
       
  6759             }
       
  6760             
       
  6761             ERROR;
       
  6762         }
       
  6763         
       
  6764     }/*function_time_to_int*/
       
  6765     break;
       
  6766 
       
  6767 /****
       
  6768  *TIME_TO_DINT
       
  6769  */
       
  6770     case function_time_to_dint :
       
  6771     {
       
  6772         symbol_c *last_type_symbol = NULL;
       
  6773 
       
  6774         {
       
  6775             identifier_c param_name("IN");
       
  6776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6778             
       
  6779             /* Get the value from a foo(<param_value>) style call */
       
  6780             if (IN_param_value == NULL)
       
  6781               IN_param_value = function_call_param_iterator.next();
       
  6782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6784             
       
  6785             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6786             {
       
  6787         
       
  6788                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  6789                 return return_type_symbol;
       
  6790                 
       
  6791             }
       
  6792             
       
  6793             ERROR;
       
  6794         }
       
  6795         
       
  6796     }/*function_time_to_dint*/
       
  6797     break;
       
  6798 
       
  6799 /****
       
  6800  *TIME_TO_LINT
       
  6801  */
       
  6802     case function_time_to_lint :
       
  6803     {
       
  6804         symbol_c *last_type_symbol = NULL;
       
  6805 
       
  6806         {
       
  6807             identifier_c param_name("IN");
       
  6808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6810             
       
  6811             /* Get the value from a foo(<param_value>) style call */
       
  6812             if (IN_param_value == NULL)
       
  6813               IN_param_value = function_call_param_iterator.next();
       
  6814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6816             
       
  6817             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6818             {
       
  6819         
       
  6820                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  6821                 return return_type_symbol;
       
  6822                 
       
  6823             }
       
  6824             
       
  6825             ERROR;
       
  6826         }
       
  6827         
       
  6828     }/*function_time_to_lint*/
       
  6829     break;
       
  6830 
       
  6831 /****
       
  6832  *TIME_TO_USINT
       
  6833  */
       
  6834     case function_time_to_usint :
       
  6835     {
       
  6836         symbol_c *last_type_symbol = NULL;
       
  6837 
       
  6838         {
       
  6839             identifier_c param_name("IN");
       
  6840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6842             
       
  6843             /* Get the value from a foo(<param_value>) style call */
       
  6844             if (IN_param_value == NULL)
       
  6845               IN_param_value = function_call_param_iterator.next();
       
  6846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6848             
       
  6849             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6850             {
       
  6851         
       
  6852                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  6853                 return return_type_symbol;
       
  6854                 
       
  6855             }
       
  6856             
       
  6857             ERROR;
       
  6858         }
       
  6859         
       
  6860     }/*function_time_to_usint*/
       
  6861     break;
       
  6862 
       
  6863 /****
       
  6864  *TIME_TO_UINT
       
  6865  */
       
  6866     case function_time_to_uint :
       
  6867     {
       
  6868         symbol_c *last_type_symbol = NULL;
       
  6869 
       
  6870         {
       
  6871             identifier_c param_name("IN");
       
  6872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6874             
       
  6875             /* Get the value from a foo(<param_value>) style call */
       
  6876             if (IN_param_value == NULL)
       
  6877               IN_param_value = function_call_param_iterator.next();
       
  6878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6880             
       
  6881             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6882             {
       
  6883         
       
  6884                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  6885                 return return_type_symbol;
       
  6886                 
       
  6887             }
       
  6888             
       
  6889             ERROR;
       
  6890         }
       
  6891         
       
  6892     }/*function_time_to_uint*/
       
  6893     break;
       
  6894 
       
  6895 /****
       
  6896  *TIME_TO_UDINT
       
  6897  */
       
  6898     case function_time_to_udint :
       
  6899     {
       
  6900         symbol_c *last_type_symbol = NULL;
       
  6901 
       
  6902         {
       
  6903             identifier_c param_name("IN");
       
  6904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6906             
       
  6907             /* Get the value from a foo(<param_value>) style call */
       
  6908             if (IN_param_value == NULL)
       
  6909               IN_param_value = function_call_param_iterator.next();
       
  6910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6912             
       
  6913             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6914             {
       
  6915         
       
  6916                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  6917                 return return_type_symbol;
       
  6918                 
       
  6919             }
       
  6920             
       
  6921             ERROR;
       
  6922         }
       
  6923         
       
  6924     }/*function_time_to_udint*/
       
  6925     break;
       
  6926 
       
  6927 /****
       
  6928  *TIME_TO_ULINT
       
  6929  */
       
  6930     case function_time_to_ulint :
       
  6931     {
       
  6932         symbol_c *last_type_symbol = NULL;
       
  6933 
       
  6934         {
       
  6935             identifier_c param_name("IN");
       
  6936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6938             
       
  6939             /* Get the value from a foo(<param_value>) style call */
       
  6940             if (IN_param_value == NULL)
       
  6941               IN_param_value = function_call_param_iterator.next();
       
  6942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6944             
       
  6945             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6946             {
       
  6947         
       
  6948                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  6949                 return return_type_symbol;
       
  6950                 
       
  6951             }
       
  6952             
       
  6953             ERROR;
       
  6954         }
       
  6955         
       
  6956     }/*function_time_to_ulint*/
       
  6957     break;
       
  6958 
       
  6959 /****
       
  6960  *TIME_TO_REAL
       
  6961  */
       
  6962     case function_time_to_real :
       
  6963     {
       
  6964         symbol_c *last_type_symbol = NULL;
       
  6965 
       
  6966         {
       
  6967             identifier_c param_name("IN");
       
  6968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  6969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  6970             
       
  6971             /* Get the value from a foo(<param_value>) style call */
       
  6972             if (IN_param_value == NULL)
       
  6973               IN_param_value = function_call_param_iterator.next();
       
  6974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  6975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  6976             
       
  6977             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  6978             {
       
  6979         
       
  6980                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  6981                 return return_type_symbol;
       
  6982                 
       
  6983             }
       
  6984             
       
  6985             ERROR;
       
  6986         }
       
  6987         
       
  6988     }/*function_time_to_real*/
       
  6989     break;
       
  6990 
       
  6991 /****
       
  6992  *TIME_TO_LREAL
       
  6993  */
       
  6994     case function_time_to_lreal :
       
  6995     {
       
  6996         symbol_c *last_type_symbol = NULL;
       
  6997 
       
  6998         {
       
  6999             identifier_c param_name("IN");
       
  7000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7002             
       
  7003             /* Get the value from a foo(<param_value>) style call */
       
  7004             if (IN_param_value == NULL)
       
  7005               IN_param_value = function_call_param_iterator.next();
       
  7006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7008             
       
  7009             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7010             {
       
  7011         
       
  7012                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7013                 return return_type_symbol;
       
  7014                 
       
  7015             }
       
  7016             
       
  7017             ERROR;
       
  7018         }
       
  7019         
       
  7020     }/*function_time_to_lreal*/
       
  7021     break;
       
  7022 
       
  7023 /****
       
  7024  *TIME_TO_STRING
       
  7025  */
       
  7026     case function_time_to_string :
       
  7027     {
       
  7028         symbol_c *last_type_symbol = NULL;
       
  7029 
       
  7030         {
       
  7031             identifier_c param_name("IN");
       
  7032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7034             
       
  7035             /* Get the value from a foo(<param_value>) style call */
       
  7036             if (IN_param_value == NULL)
       
  7037               IN_param_value = function_call_param_iterator.next();
       
  7038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7040             
       
  7041             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7042             {
       
  7043         
       
  7044                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7045                 return return_type_symbol;
       
  7046                 
       
  7047             }
       
  7048             
       
  7049             ERROR;
       
  7050         }
       
  7051         
       
  7052     }/*function_time_to_string*/
       
  7053     break;
       
  7054 
       
  7055 /****
       
  7056  *TIME_TO_BYTE
       
  7057  */
       
  7058     case function_time_to_byte :
       
  7059     {
       
  7060         symbol_c *last_type_symbol = NULL;
       
  7061 
       
  7062         {
       
  7063             identifier_c param_name("IN");
       
  7064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7066             
       
  7067             /* Get the value from a foo(<param_value>) style call */
       
  7068             if (IN_param_value == NULL)
       
  7069               IN_param_value = function_call_param_iterator.next();
       
  7070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7072             
       
  7073             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7074             {
       
  7075         
       
  7076                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7077                 return return_type_symbol;
       
  7078                 
       
  7079             }
       
  7080             
       
  7081             ERROR;
       
  7082         }
       
  7083         
       
  7084     }/*function_time_to_byte*/
       
  7085     break;
       
  7086 
       
  7087 /****
       
  7088  *TIME_TO_WORD
       
  7089  */
       
  7090     case function_time_to_word :
       
  7091     {
       
  7092         symbol_c *last_type_symbol = NULL;
       
  7093 
       
  7094         {
       
  7095             identifier_c param_name("IN");
       
  7096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7098             
       
  7099             /* Get the value from a foo(<param_value>) style call */
       
  7100             if (IN_param_value == NULL)
       
  7101               IN_param_value = function_call_param_iterator.next();
       
  7102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7104             
       
  7105             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7106             {
       
  7107         
       
  7108                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7109                 return return_type_symbol;
       
  7110                 
       
  7111             }
       
  7112             
       
  7113             ERROR;
       
  7114         }
       
  7115         
       
  7116     }/*function_time_to_word*/
       
  7117     break;
       
  7118 
       
  7119 /****
       
  7120  *TIME_TO_DWORD
       
  7121  */
       
  7122     case function_time_to_dword :
       
  7123     {
       
  7124         symbol_c *last_type_symbol = NULL;
       
  7125 
       
  7126         {
       
  7127             identifier_c param_name("IN");
       
  7128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7130             
       
  7131             /* Get the value from a foo(<param_value>) style call */
       
  7132             if (IN_param_value == NULL)
       
  7133               IN_param_value = function_call_param_iterator.next();
       
  7134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7136             
       
  7137             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7138             {
       
  7139         
       
  7140                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7141                 return return_type_symbol;
       
  7142                 
       
  7143             }
       
  7144             
       
  7145             ERROR;
       
  7146         }
       
  7147         
       
  7148     }/*function_time_to_dword*/
       
  7149     break;
       
  7150 
       
  7151 /****
       
  7152  *TIME_TO_LWORD
       
  7153  */
       
  7154     case function_time_to_lword :
       
  7155     {
       
  7156         symbol_c *last_type_symbol = NULL;
       
  7157 
       
  7158         {
       
  7159             identifier_c param_name("IN");
       
  7160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7162             
       
  7163             /* Get the value from a foo(<param_value>) style call */
       
  7164             if (IN_param_value == NULL)
       
  7165               IN_param_value = function_call_param_iterator.next();
       
  7166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7168             
       
  7169             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
  7170             {
       
  7171         
       
  7172                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7173                 return return_type_symbol;
       
  7174                 
       
  7175             }
       
  7176             
       
  7177             ERROR;
       
  7178         }
       
  7179         
       
  7180     }/*function_time_to_lword*/
       
  7181     break;
       
  7182 
       
  7183 /****
       
  7184  *DATE_TO_SINT
       
  7185  */
       
  7186     case function_date_to_sint :
       
  7187     {
       
  7188         symbol_c *last_type_symbol = NULL;
       
  7189 
       
  7190         {
       
  7191             identifier_c param_name("IN");
       
  7192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7194             
       
  7195             /* Get the value from a foo(<param_value>) style call */
       
  7196             if (IN_param_value == NULL)
       
  7197               IN_param_value = function_call_param_iterator.next();
       
  7198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7200             
       
  7201             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7202             {
       
  7203         
       
  7204                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7205                 return return_type_symbol;
       
  7206                 
       
  7207             }
       
  7208             
       
  7209             ERROR;
       
  7210         }
       
  7211         
       
  7212     }/*function_date_to_sint*/
       
  7213     break;
       
  7214 
       
  7215 /****
       
  7216  *DATE_TO_INT
       
  7217  */
       
  7218     case function_date_to_int :
       
  7219     {
       
  7220         symbol_c *last_type_symbol = NULL;
       
  7221 
       
  7222         {
       
  7223             identifier_c param_name("IN");
       
  7224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7226             
       
  7227             /* Get the value from a foo(<param_value>) style call */
       
  7228             if (IN_param_value == NULL)
       
  7229               IN_param_value = function_call_param_iterator.next();
       
  7230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7232             
       
  7233             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7234             {
       
  7235         
       
  7236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7237                 return return_type_symbol;
       
  7238                 
       
  7239             }
       
  7240             
       
  7241             ERROR;
       
  7242         }
       
  7243         
       
  7244     }/*function_date_to_int*/
       
  7245     break;
       
  7246 
       
  7247 /****
       
  7248  *DATE_TO_DINT
       
  7249  */
       
  7250     case function_date_to_dint :
       
  7251     {
       
  7252         symbol_c *last_type_symbol = NULL;
       
  7253 
       
  7254         {
       
  7255             identifier_c param_name("IN");
       
  7256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7258             
       
  7259             /* Get the value from a foo(<param_value>) style call */
       
  7260             if (IN_param_value == NULL)
       
  7261               IN_param_value = function_call_param_iterator.next();
       
  7262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7264             
       
  7265             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7266             {
       
  7267         
       
  7268                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7269                 return return_type_symbol;
       
  7270                 
       
  7271             }
       
  7272             
       
  7273             ERROR;
       
  7274         }
       
  7275         
       
  7276     }/*function_date_to_dint*/
       
  7277     break;
       
  7278 
       
  7279 /****
       
  7280  *DATE_TO_LINT
       
  7281  */
       
  7282     case function_date_to_lint :
       
  7283     {
       
  7284         symbol_c *last_type_symbol = NULL;
       
  7285 
       
  7286         {
       
  7287             identifier_c param_name("IN");
       
  7288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7290             
       
  7291             /* Get the value from a foo(<param_value>) style call */
       
  7292             if (IN_param_value == NULL)
       
  7293               IN_param_value = function_call_param_iterator.next();
       
  7294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7296             
       
  7297             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7298             {
       
  7299         
       
  7300                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7301                 return return_type_symbol;
       
  7302                 
       
  7303             }
       
  7304             
       
  7305             ERROR;
       
  7306         }
       
  7307         
       
  7308     }/*function_date_to_lint*/
       
  7309     break;
       
  7310 
       
  7311 /****
       
  7312  *DATE_TO_USINT
       
  7313  */
       
  7314     case function_date_to_usint :
       
  7315     {
       
  7316         symbol_c *last_type_symbol = NULL;
       
  7317 
       
  7318         {
       
  7319             identifier_c param_name("IN");
       
  7320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7322             
       
  7323             /* Get the value from a foo(<param_value>) style call */
       
  7324             if (IN_param_value == NULL)
       
  7325               IN_param_value = function_call_param_iterator.next();
       
  7326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7328             
       
  7329             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7330             {
       
  7331         
       
  7332                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7333                 return return_type_symbol;
       
  7334                 
       
  7335             }
       
  7336             
       
  7337             ERROR;
       
  7338         }
       
  7339         
       
  7340     }/*function_date_to_usint*/
       
  7341     break;
       
  7342 
       
  7343 /****
       
  7344  *DATE_TO_UINT
       
  7345  */
       
  7346     case function_date_to_uint :
       
  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::date_type_name, last_type_symbol))
       
  7362             {
       
  7363         
       
  7364                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7365                 return return_type_symbol;
       
  7366                 
       
  7367             }
       
  7368             
       
  7369             ERROR;
       
  7370         }
       
  7371         
       
  7372     }/*function_date_to_uint*/
       
  7373     break;
       
  7374 
       
  7375 /****
       
  7376  *DATE_TO_UDINT
       
  7377  */
       
  7378     case function_date_to_udint :
       
  7379     {
       
  7380         symbol_c *last_type_symbol = NULL;
       
  7381 
       
  7382         {
       
  7383             identifier_c param_name("IN");
       
  7384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7386             
       
  7387             /* Get the value from a foo(<param_value>) style call */
       
  7388             if (IN_param_value == NULL)
       
  7389               IN_param_value = function_call_param_iterator.next();
       
  7390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7392             
       
  7393             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7394             {
       
  7395         
       
  7396                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7397                 return return_type_symbol;
       
  7398                 
       
  7399             }
       
  7400             
       
  7401             ERROR;
       
  7402         }
       
  7403         
       
  7404     }/*function_date_to_udint*/
       
  7405     break;
       
  7406 
       
  7407 /****
       
  7408  *DATE_TO_ULINT
       
  7409  */
       
  7410     case function_date_to_ulint :
       
  7411     {
       
  7412         symbol_c *last_type_symbol = NULL;
       
  7413 
       
  7414         {
       
  7415             identifier_c param_name("IN");
       
  7416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7418             
       
  7419             /* Get the value from a foo(<param_value>) style call */
       
  7420             if (IN_param_value == NULL)
       
  7421               IN_param_value = function_call_param_iterator.next();
       
  7422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7424             
       
  7425             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7426             {
       
  7427         
       
  7428                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7429                 return return_type_symbol;
       
  7430                 
       
  7431             }
       
  7432             
       
  7433             ERROR;
       
  7434         }
       
  7435         
       
  7436     }/*function_date_to_ulint*/
       
  7437     break;
       
  7438 
       
  7439 /****
       
  7440  *DATE_TO_REAL
       
  7441  */
       
  7442     case function_date_to_real :
       
  7443     {
       
  7444         symbol_c *last_type_symbol = NULL;
       
  7445 
       
  7446         {
       
  7447             identifier_c param_name("IN");
       
  7448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7450             
       
  7451             /* Get the value from a foo(<param_value>) style call */
       
  7452             if (IN_param_value == NULL)
       
  7453               IN_param_value = function_call_param_iterator.next();
       
  7454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7456             
       
  7457             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7458             {
       
  7459         
       
  7460                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7461                 return return_type_symbol;
       
  7462                 
       
  7463             }
       
  7464             
       
  7465             ERROR;
       
  7466         }
       
  7467         
       
  7468     }/*function_date_to_real*/
       
  7469     break;
       
  7470 
       
  7471 /****
       
  7472  *DATE_TO_LREAL
       
  7473  */
       
  7474     case function_date_to_lreal :
       
  7475     {
       
  7476         symbol_c *last_type_symbol = NULL;
       
  7477 
       
  7478         {
       
  7479             identifier_c param_name("IN");
       
  7480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7482             
       
  7483             /* Get the value from a foo(<param_value>) style call */
       
  7484             if (IN_param_value == NULL)
       
  7485               IN_param_value = function_call_param_iterator.next();
       
  7486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7488             
       
  7489             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7490             {
       
  7491         
       
  7492                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7493                 return return_type_symbol;
       
  7494                 
       
  7495             }
       
  7496             
       
  7497             ERROR;
       
  7498         }
       
  7499         
       
  7500     }/*function_date_to_lreal*/
       
  7501     break;
       
  7502 
       
  7503 /****
       
  7504  *DATE_TO_STRING
       
  7505  */
       
  7506     case function_date_to_string :
       
  7507     {
       
  7508         symbol_c *last_type_symbol = NULL;
       
  7509 
       
  7510         {
       
  7511             identifier_c param_name("IN");
       
  7512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7514             
       
  7515             /* Get the value from a foo(<param_value>) style call */
       
  7516             if (IN_param_value == NULL)
       
  7517               IN_param_value = function_call_param_iterator.next();
       
  7518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7520             
       
  7521             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7522             {
       
  7523         
       
  7524                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  7525                 return return_type_symbol;
       
  7526                 
       
  7527             }
       
  7528             
       
  7529             ERROR;
       
  7530         }
       
  7531         
       
  7532     }/*function_date_to_string*/
       
  7533     break;
       
  7534 
       
  7535 /****
       
  7536  *DATE_TO_BYTE
       
  7537  */
       
  7538     case function_date_to_byte :
       
  7539     {
       
  7540         symbol_c *last_type_symbol = NULL;
       
  7541 
       
  7542         {
       
  7543             identifier_c param_name("IN");
       
  7544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7546             
       
  7547             /* Get the value from a foo(<param_value>) style call */
       
  7548             if (IN_param_value == NULL)
       
  7549               IN_param_value = function_call_param_iterator.next();
       
  7550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7552             
       
  7553             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7554             {
       
  7555         
       
  7556                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  7557                 return return_type_symbol;
       
  7558                 
       
  7559             }
       
  7560             
       
  7561             ERROR;
       
  7562         }
       
  7563         
       
  7564     }/*function_date_to_byte*/
       
  7565     break;
       
  7566 
       
  7567 /****
       
  7568  *DATE_TO_WORD
       
  7569  */
       
  7570     case function_date_to_word :
       
  7571     {
       
  7572         symbol_c *last_type_symbol = NULL;
       
  7573 
       
  7574         {
       
  7575             identifier_c param_name("IN");
       
  7576             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7578             
       
  7579             /* Get the value from a foo(<param_value>) style call */
       
  7580             if (IN_param_value == NULL)
       
  7581               IN_param_value = function_call_param_iterator.next();
       
  7582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7584             
       
  7585             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7586             {
       
  7587         
       
  7588                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7589                 return return_type_symbol;
       
  7590                 
       
  7591             }
       
  7592             
       
  7593             ERROR;
       
  7594         }
       
  7595         
       
  7596     }/*function_date_to_word*/
       
  7597     break;
       
  7598 
       
  7599 /****
       
  7600  *DATE_TO_DWORD
       
  7601  */
       
  7602     case function_date_to_dword :
       
  7603     {
       
  7604         symbol_c *last_type_symbol = NULL;
       
  7605 
       
  7606         {
       
  7607             identifier_c param_name("IN");
       
  7608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7610             
       
  7611             /* Get the value from a foo(<param_value>) style call */
       
  7612             if (IN_param_value == NULL)
       
  7613               IN_param_value = function_call_param_iterator.next();
       
  7614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7616             
       
  7617             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7618             {
       
  7619         
       
  7620                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7621                 return return_type_symbol;
       
  7622                 
       
  7623             }
       
  7624             
       
  7625             ERROR;
       
  7626         }
       
  7627         
       
  7628     }/*function_date_to_dword*/
       
  7629     break;
       
  7630 
       
  7631 /****
       
  7632  *DATE_TO_LWORD
       
  7633  */
       
  7634     case function_date_to_lword :
       
  7635     {
       
  7636         symbol_c *last_type_symbol = NULL;
       
  7637 
       
  7638         {
       
  7639             identifier_c param_name("IN");
       
  7640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7642             
       
  7643             /* Get the value from a foo(<param_value>) style call */
       
  7644             if (IN_param_value == NULL)
       
  7645               IN_param_value = function_call_param_iterator.next();
       
  7646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7648             
       
  7649             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
  7650             {
       
  7651         
       
  7652                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7653                 return return_type_symbol;
       
  7654                 
       
  7655             }
       
  7656             
       
  7657             ERROR;
       
  7658         }
       
  7659         
       
  7660     }/*function_date_to_lword*/
       
  7661     break;
       
  7662 
       
  7663 /****
       
  7664  *TOD_TO_SINT
       
  7665  */
       
  7666     case function_tod_to_sint :
       
  7667     {
       
  7668         symbol_c *last_type_symbol = NULL;
       
  7669 
       
  7670         {
       
  7671             identifier_c param_name("IN");
       
  7672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7674             
       
  7675             /* Get the value from a foo(<param_value>) style call */
       
  7676             if (IN_param_value == NULL)
       
  7677               IN_param_value = function_call_param_iterator.next();
       
  7678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7680             
       
  7681             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7682             {
       
  7683         
       
  7684                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7685                 return return_type_symbol;
       
  7686                 
       
  7687             }
       
  7688             
       
  7689             ERROR;
       
  7690         }
       
  7691         
       
  7692     }/*function_tod_to_sint*/
       
  7693     break;
       
  7694 
       
  7695 /****
       
  7696  *TOD_TO_INT
       
  7697  */
       
  7698     case function_tod_to_int :
       
  7699     {
       
  7700         symbol_c *last_type_symbol = NULL;
       
  7701 
       
  7702         {
       
  7703             identifier_c param_name("IN");
       
  7704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7706             
       
  7707             /* Get the value from a foo(<param_value>) style call */
       
  7708             if (IN_param_value == NULL)
       
  7709               IN_param_value = function_call_param_iterator.next();
       
  7710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7712             
       
  7713             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7714             {
       
  7715         
       
  7716                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7717                 return return_type_symbol;
       
  7718                 
       
  7719             }
       
  7720             
       
  7721             ERROR;
       
  7722         }
       
  7723         
       
  7724     }/*function_tod_to_int*/
       
  7725     break;
       
  7726 
       
  7727 /****
       
  7728  *TOD_TO_DINT
       
  7729  */
       
  7730     case function_tod_to_dint :
       
  7731     {
       
  7732         symbol_c *last_type_symbol = NULL;
       
  7733 
       
  7734         {
       
  7735             identifier_c param_name("IN");
       
  7736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7738             
       
  7739             /* Get the value from a foo(<param_value>) style call */
       
  7740             if (IN_param_value == NULL)
       
  7741               IN_param_value = function_call_param_iterator.next();
       
  7742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7744             
       
  7745             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7746             {
       
  7747         
       
  7748                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7749                 return return_type_symbol;
       
  7750                 
       
  7751             }
       
  7752             
       
  7753             ERROR;
       
  7754         }
       
  7755         
       
  7756     }/*function_tod_to_dint*/
       
  7757     break;
       
  7758 
       
  7759 /****
       
  7760  *TOD_TO_LINT
       
  7761  */
       
  7762     case function_tod_to_lint :
       
  7763     {
       
  7764         symbol_c *last_type_symbol = NULL;
       
  7765 
       
  7766         {
       
  7767             identifier_c param_name("IN");
       
  7768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7770             
       
  7771             /* Get the value from a foo(<param_value>) style call */
       
  7772             if (IN_param_value == NULL)
       
  7773               IN_param_value = function_call_param_iterator.next();
       
  7774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7776             
       
  7777             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7778             {
       
  7779         
       
  7780                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7781                 return return_type_symbol;
       
  7782                 
       
  7783             }
       
  7784             
       
  7785             ERROR;
       
  7786         }
       
  7787         
       
  7788     }/*function_tod_to_lint*/
       
  7789     break;
       
  7790 
       
  7791 /****
       
  7792  *TOD_TO_USINT
       
  7793  */
       
  7794     case function_tod_to_usint :
       
  7795     {
       
  7796         symbol_c *last_type_symbol = NULL;
       
  7797 
       
  7798         {
       
  7799             identifier_c param_name("IN");
       
  7800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7802             
       
  7803             /* Get the value from a foo(<param_value>) style call */
       
  7804             if (IN_param_value == NULL)
       
  7805               IN_param_value = function_call_param_iterator.next();
       
  7806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7808             
       
  7809             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7810             {
       
  7811         
       
  7812                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7813                 return return_type_symbol;
       
  7814                 
       
  7815             }
       
  7816             
       
  7817             ERROR;
       
  7818         }
       
  7819         
       
  7820     }/*function_tod_to_usint*/
       
  7821     break;
       
  7822 
       
  7823 /****
       
  7824  *TOD_TO_UINT
       
  7825  */
       
  7826     case function_tod_to_uint :
       
  7827     {
       
  7828         symbol_c *last_type_symbol = NULL;
       
  7829 
       
  7830         {
       
  7831             identifier_c param_name("IN");
       
  7832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7834             
       
  7835             /* Get the value from a foo(<param_value>) style call */
       
  7836             if (IN_param_value == NULL)
       
  7837               IN_param_value = function_call_param_iterator.next();
       
  7838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7840             
       
  7841             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7842             {
       
  7843         
       
  7844                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7845                 return return_type_symbol;
       
  7846                 
       
  7847             }
       
  7848             
       
  7849             ERROR;
       
  7850         }
       
  7851         
       
  7852     }/*function_tod_to_uint*/
       
  7853     break;
       
  7854 
       
  7855 /****
       
  7856  *TOD_TO_UDINT
       
  7857  */
       
  7858     case function_tod_to_udint :
       
  7859     {
       
  7860         symbol_c *last_type_symbol = NULL;
       
  7861 
       
  7862         {
       
  7863             identifier_c param_name("IN");
       
  7864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7866             
       
  7867             /* Get the value from a foo(<param_value>) style call */
       
  7868             if (IN_param_value == NULL)
       
  7869               IN_param_value = function_call_param_iterator.next();
       
  7870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7872             
       
  7873             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7874             {
       
  7875         
       
  7876                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7877                 return return_type_symbol;
       
  7878                 
       
  7879             }
       
  7880             
       
  7881             ERROR;
       
  7882         }
       
  7883         
       
  7884     }/*function_tod_to_udint*/
       
  7885     break;
       
  7886 
       
  7887 /****
       
  7888  *TOD_TO_ULINT
       
  7889  */
       
  7890     case function_tod_to_ulint :
       
  7891     {
       
  7892         symbol_c *last_type_symbol = NULL;
       
  7893 
       
  7894         {
       
  7895             identifier_c param_name("IN");
       
  7896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7898             
       
  7899             /* Get the value from a foo(<param_value>) style call */
       
  7900             if (IN_param_value == NULL)
       
  7901               IN_param_value = function_call_param_iterator.next();
       
  7902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7904             
       
  7905             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7906             {
       
  7907         
       
  7908                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  7909                 return return_type_symbol;
       
  7910                 
       
  7911             }
       
  7912             
       
  7913             ERROR;
       
  7914         }
       
  7915         
       
  7916     }/*function_tod_to_ulint*/
       
  7917     break;
       
  7918 
       
  7919 /****
       
  7920  *TOD_TO_REAL
       
  7921  */
       
  7922     case function_tod_to_real :
       
  7923     {
       
  7924         symbol_c *last_type_symbol = NULL;
       
  7925 
       
  7926         {
       
  7927             identifier_c param_name("IN");
       
  7928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7930             
       
  7931             /* Get the value from a foo(<param_value>) style call */
       
  7932             if (IN_param_value == NULL)
       
  7933               IN_param_value = function_call_param_iterator.next();
       
  7934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7936             
       
  7937             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7938             {
       
  7939         
       
  7940                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  7941                 return return_type_symbol;
       
  7942                 
       
  7943             }
       
  7944             
       
  7945             ERROR;
       
  7946         }
       
  7947         
       
  7948     }/*function_tod_to_real*/
       
  7949     break;
       
  7950 
       
  7951 /****
       
  7952  *TOD_TO_LREAL
       
  7953  */
       
  7954     case function_tod_to_lreal :
       
  7955     {
       
  7956         symbol_c *last_type_symbol = NULL;
       
  7957 
       
  7958         {
       
  7959             identifier_c param_name("IN");
       
  7960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7962             
       
  7963             /* Get the value from a foo(<param_value>) style call */
       
  7964             if (IN_param_value == NULL)
       
  7965               IN_param_value = function_call_param_iterator.next();
       
  7966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7968             
       
  7969             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  7970             {
       
  7971         
       
  7972                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  7973                 return return_type_symbol;
       
  7974                 
       
  7975             }
       
  7976             
       
  7977             ERROR;
       
  7978         }
       
  7979         
       
  7980     }/*function_tod_to_lreal*/
       
  7981     break;
       
  7982 
       
  7983 /****
       
  7984  *TOD_TO_STRING
       
  7985  */
       
  7986     case function_tod_to_string :
       
  7987     {
       
  7988         symbol_c *last_type_symbol = NULL;
       
  7989 
       
  7990         {
       
  7991             identifier_c param_name("IN");
       
  7992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7994             
       
  7995             /* Get the value from a foo(<param_value>) style call */
       
  7996             if (IN_param_value == NULL)
       
  7997               IN_param_value = function_call_param_iterator.next();
       
  7998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8000             
       
  8001             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8002             {
       
  8003         
       
  8004                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8005                 return return_type_symbol;
       
  8006                 
       
  8007             }
       
  8008             
       
  8009             ERROR;
       
  8010         }
       
  8011         
       
  8012     }/*function_tod_to_string*/
       
  8013     break;
       
  8014 
       
  8015 /****
       
  8016  *TOD_TO_BYTE
       
  8017  */
       
  8018     case function_tod_to_byte :
       
  8019     {
       
  8020         symbol_c *last_type_symbol = NULL;
       
  8021 
       
  8022         {
       
  8023             identifier_c param_name("IN");
       
  8024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8026             
       
  8027             /* Get the value from a foo(<param_value>) style call */
       
  8028             if (IN_param_value == NULL)
       
  8029               IN_param_value = function_call_param_iterator.next();
       
  8030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8032             
       
  8033             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8034             {
       
  8035         
       
  8036                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8037                 return return_type_symbol;
       
  8038                 
       
  8039             }
       
  8040             
       
  8041             ERROR;
       
  8042         }
       
  8043         
       
  8044     }/*function_tod_to_byte*/
       
  8045     break;
       
  8046 
       
  8047 /****
       
  8048  *TOD_TO_WORD
       
  8049  */
       
  8050     case function_tod_to_word :
       
  8051     {
       
  8052         symbol_c *last_type_symbol = NULL;
       
  8053 
       
  8054         {
       
  8055             identifier_c param_name("IN");
       
  8056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8058             
       
  8059             /* Get the value from a foo(<param_value>) style call */
       
  8060             if (IN_param_value == NULL)
       
  8061               IN_param_value = function_call_param_iterator.next();
       
  8062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8064             
       
  8065             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8066             {
       
  8067         
       
  8068                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8069                 return return_type_symbol;
       
  8070                 
       
  8071             }
       
  8072             
       
  8073             ERROR;
       
  8074         }
       
  8075         
       
  8076     }/*function_tod_to_word*/
       
  8077     break;
       
  8078 
       
  8079 /****
       
  8080  *TOD_TO_DWORD
       
  8081  */
       
  8082     case function_tod_to_dword :
       
  8083     {
       
  8084         symbol_c *last_type_symbol = NULL;
       
  8085 
       
  8086         {
       
  8087             identifier_c param_name("IN");
       
  8088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8090             
       
  8091             /* Get the value from a foo(<param_value>) style call */
       
  8092             if (IN_param_value == NULL)
       
  8093               IN_param_value = function_call_param_iterator.next();
       
  8094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8096             
       
  8097             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8098             {
       
  8099         
       
  8100                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8101                 return return_type_symbol;
       
  8102                 
       
  8103             }
       
  8104             
       
  8105             ERROR;
       
  8106         }
       
  8107         
       
  8108     }/*function_tod_to_dword*/
       
  8109     break;
       
  8110 
       
  8111 /****
       
  8112  *TOD_TO_LWORD
       
  8113  */
       
  8114     case function_tod_to_lword :
       
  8115     {
       
  8116         symbol_c *last_type_symbol = NULL;
       
  8117 
       
  8118         {
       
  8119             identifier_c param_name("IN");
       
  8120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8122             
       
  8123             /* Get the value from a foo(<param_value>) style call */
       
  8124             if (IN_param_value == NULL)
       
  8125               IN_param_value = function_call_param_iterator.next();
       
  8126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8128             
       
  8129             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
  8130             {
       
  8131         
       
  8132                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8133                 return return_type_symbol;
       
  8134                 
       
  8135             }
       
  8136             
       
  8137             ERROR;
       
  8138         }
       
  8139         
       
  8140     }/*function_tod_to_lword*/
       
  8141     break;
       
  8142 
       
  8143 /****
       
  8144  *DT_TO_SINT
       
  8145  */
       
  8146     case function_dt_to_sint :
       
  8147     {
       
  8148         symbol_c *last_type_symbol = NULL;
       
  8149 
       
  8150         {
       
  8151             identifier_c param_name("IN");
       
  8152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8154             
       
  8155             /* Get the value from a foo(<param_value>) style call */
       
  8156             if (IN_param_value == NULL)
       
  8157               IN_param_value = function_call_param_iterator.next();
       
  8158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8160             
       
  8161             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8162             {
       
  8163         
       
  8164                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8165                 return return_type_symbol;
       
  8166                 
       
  8167             }
       
  8168             
       
  8169             ERROR;
       
  8170         }
       
  8171         
       
  8172     }/*function_dt_to_sint*/
       
  8173     break;
       
  8174 
       
  8175 /****
       
  8176  *DT_TO_INT
       
  8177  */
       
  8178     case function_dt_to_int :
       
  8179     {
       
  8180         symbol_c *last_type_symbol = NULL;
       
  8181 
       
  8182         {
       
  8183             identifier_c param_name("IN");
       
  8184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8186             
       
  8187             /* Get the value from a foo(<param_value>) style call */
       
  8188             if (IN_param_value == NULL)
       
  8189               IN_param_value = function_call_param_iterator.next();
       
  8190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8192             
       
  8193             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8194             {
       
  8195         
       
  8196                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8197                 return return_type_symbol;
       
  8198                 
       
  8199             }
       
  8200             
       
  8201             ERROR;
       
  8202         }
       
  8203         
       
  8204     }/*function_dt_to_int*/
       
  8205     break;
       
  8206 
       
  8207 /****
       
  8208  *DT_TO_DINT
       
  8209  */
       
  8210     case function_dt_to_dint :
       
  8211     {
       
  8212         symbol_c *last_type_symbol = NULL;
       
  8213 
       
  8214         {
       
  8215             identifier_c param_name("IN");
       
  8216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8218             
       
  8219             /* Get the value from a foo(<param_value>) style call */
       
  8220             if (IN_param_value == NULL)
       
  8221               IN_param_value = function_call_param_iterator.next();
       
  8222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8224             
       
  8225             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8226             {
       
  8227         
       
  8228                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8229                 return return_type_symbol;
       
  8230                 
       
  8231             }
       
  8232             
       
  8233             ERROR;
       
  8234         }
       
  8235         
       
  8236     }/*function_dt_to_dint*/
       
  8237     break;
       
  8238 
       
  8239 /****
       
  8240  *DT_TO_LINT
       
  8241  */
       
  8242     case function_dt_to_lint :
       
  8243     {
       
  8244         symbol_c *last_type_symbol = NULL;
       
  8245 
       
  8246         {
       
  8247             identifier_c param_name("IN");
       
  8248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8250             
       
  8251             /* Get the value from a foo(<param_value>) style call */
       
  8252             if (IN_param_value == NULL)
       
  8253               IN_param_value = function_call_param_iterator.next();
       
  8254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8256             
       
  8257             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8258             {
       
  8259         
       
  8260                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8261                 return return_type_symbol;
       
  8262                 
       
  8263             }
       
  8264             
       
  8265             ERROR;
       
  8266         }
       
  8267         
       
  8268     }/*function_dt_to_lint*/
       
  8269     break;
       
  8270 
       
  8271 /****
       
  8272  *DT_TO_USINT
       
  8273  */
       
  8274     case function_dt_to_usint :
       
  8275     {
       
  8276         symbol_c *last_type_symbol = NULL;
       
  8277 
       
  8278         {
       
  8279             identifier_c param_name("IN");
       
  8280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8282             
       
  8283             /* Get the value from a foo(<param_value>) style call */
       
  8284             if (IN_param_value == NULL)
       
  8285               IN_param_value = function_call_param_iterator.next();
       
  8286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8288             
       
  8289             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8290             {
       
  8291         
       
  8292                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8293                 return return_type_symbol;
       
  8294                 
       
  8295             }
       
  8296             
       
  8297             ERROR;
       
  8298         }
       
  8299         
       
  8300     }/*function_dt_to_usint*/
       
  8301     break;
       
  8302 
       
  8303 /****
       
  8304  *DT_TO_UINT
       
  8305  */
       
  8306     case function_dt_to_uint :
       
  8307     {
       
  8308         symbol_c *last_type_symbol = NULL;
       
  8309 
       
  8310         {
       
  8311             identifier_c param_name("IN");
       
  8312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8314             
       
  8315             /* Get the value from a foo(<param_value>) style call */
       
  8316             if (IN_param_value == NULL)
       
  8317               IN_param_value = function_call_param_iterator.next();
       
  8318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8320             
       
  8321             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8322             {
       
  8323         
       
  8324                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8325                 return return_type_symbol;
       
  8326                 
       
  8327             }
       
  8328             
       
  8329             ERROR;
       
  8330         }
       
  8331         
       
  8332     }/*function_dt_to_uint*/
       
  8333     break;
       
  8334 
       
  8335 /****
       
  8336  *DT_TO_UDINT
       
  8337  */
       
  8338     case function_dt_to_udint :
       
  8339     {
       
  8340         symbol_c *last_type_symbol = NULL;
       
  8341 
       
  8342         {
       
  8343             identifier_c param_name("IN");
       
  8344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8346             
       
  8347             /* Get the value from a foo(<param_value>) style call */
       
  8348             if (IN_param_value == NULL)
       
  8349               IN_param_value = function_call_param_iterator.next();
       
  8350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8352             
       
  8353             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8354             {
       
  8355         
       
  8356                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8357                 return return_type_symbol;
       
  8358                 
       
  8359             }
       
  8360             
       
  8361             ERROR;
       
  8362         }
       
  8363         
       
  8364     }/*function_dt_to_udint*/
       
  8365     break;
       
  8366 
       
  8367 /****
       
  8368  *DT_TO_ULINT
       
  8369  */
       
  8370     case function_dt_to_ulint :
       
  8371     {
       
  8372         symbol_c *last_type_symbol = NULL;
       
  8373 
       
  8374         {
       
  8375             identifier_c param_name("IN");
       
  8376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8378             
       
  8379             /* Get the value from a foo(<param_value>) style call */
       
  8380             if (IN_param_value == NULL)
       
  8381               IN_param_value = function_call_param_iterator.next();
       
  8382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8384             
       
  8385             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8386             {
       
  8387         
       
  8388                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8389                 return return_type_symbol;
       
  8390                 
       
  8391             }
       
  8392             
       
  8393             ERROR;
       
  8394         }
       
  8395         
       
  8396     }/*function_dt_to_ulint*/
       
  8397     break;
       
  8398 
       
  8399 /****
       
  8400  *DT_TO_REAL
       
  8401  */
       
  8402     case function_dt_to_real :
       
  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::dt_type_name, last_type_symbol))
       
  8418             {
       
  8419         
       
  8420                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8421                 return return_type_symbol;
       
  8422                 
       
  8423             }
       
  8424             
       
  8425             ERROR;
       
  8426         }
       
  8427         
       
  8428     }/*function_dt_to_real*/
       
  8429     break;
       
  8430 
       
  8431 /****
       
  8432  *DT_TO_LREAL
       
  8433  */
       
  8434     case function_dt_to_lreal :
       
  8435     {
       
  8436         symbol_c *last_type_symbol = NULL;
       
  8437 
       
  8438         {
       
  8439             identifier_c param_name("IN");
       
  8440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8442             
       
  8443             /* Get the value from a foo(<param_value>) style call */
       
  8444             if (IN_param_value == NULL)
       
  8445               IN_param_value = function_call_param_iterator.next();
       
  8446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8448             
       
  8449             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8450             {
       
  8451         
       
  8452                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8453                 return return_type_symbol;
       
  8454                 
       
  8455             }
       
  8456             
       
  8457             ERROR;
       
  8458         }
       
  8459         
       
  8460     }/*function_dt_to_lreal*/
       
  8461     break;
       
  8462 
       
  8463 /****
       
  8464  *DT_TO_STRING
       
  8465  */
       
  8466     case function_dt_to_string :
       
  8467     {
       
  8468         symbol_c *last_type_symbol = NULL;
       
  8469 
       
  8470         {
       
  8471             identifier_c param_name("IN");
       
  8472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8474             
       
  8475             /* Get the value from a foo(<param_value>) style call */
       
  8476             if (IN_param_value == NULL)
       
  8477               IN_param_value = function_call_param_iterator.next();
       
  8478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8480             
       
  8481             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8482             {
       
  8483         
       
  8484                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8485                 return return_type_symbol;
       
  8486                 
       
  8487             }
       
  8488             
       
  8489             ERROR;
       
  8490         }
       
  8491         
       
  8492     }/*function_dt_to_string*/
       
  8493     break;
       
  8494 
       
  8495 /****
       
  8496  *DT_TO_BYTE
       
  8497  */
       
  8498     case function_dt_to_byte :
       
  8499     {
       
  8500         symbol_c *last_type_symbol = NULL;
       
  8501 
       
  8502         {
       
  8503             identifier_c param_name("IN");
       
  8504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8506             
       
  8507             /* Get the value from a foo(<param_value>) style call */
       
  8508             if (IN_param_value == NULL)
       
  8509               IN_param_value = function_call_param_iterator.next();
       
  8510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8512             
       
  8513             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8514             {
       
  8515         
       
  8516                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8517                 return return_type_symbol;
       
  8518                 
       
  8519             }
       
  8520             
       
  8521             ERROR;
       
  8522         }
       
  8523         
       
  8524     }/*function_dt_to_byte*/
       
  8525     break;
       
  8526 
       
  8527 /****
       
  8528  *DT_TO_WORD
       
  8529  */
       
  8530     case function_dt_to_word :
       
  8531     {
       
  8532         symbol_c *last_type_symbol = NULL;
       
  8533 
       
  8534         {
       
  8535             identifier_c param_name("IN");
       
  8536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8538             
       
  8539             /* Get the value from a foo(<param_value>) style call */
       
  8540             if (IN_param_value == NULL)
       
  8541               IN_param_value = function_call_param_iterator.next();
       
  8542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8544             
       
  8545             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8546             {
       
  8547         
       
  8548                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8549                 return return_type_symbol;
       
  8550                 
       
  8551             }
       
  8552             
       
  8553             ERROR;
       
  8554         }
       
  8555         
       
  8556     }/*function_dt_to_word*/
       
  8557     break;
       
  8558 
       
  8559 /****
       
  8560  *DT_TO_DWORD
       
  8561  */
       
  8562     case function_dt_to_dword :
       
  8563     {
       
  8564         symbol_c *last_type_symbol = NULL;
       
  8565 
       
  8566         {
       
  8567             identifier_c param_name("IN");
       
  8568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8570             
       
  8571             /* Get the value from a foo(<param_value>) style call */
       
  8572             if (IN_param_value == NULL)
       
  8573               IN_param_value = function_call_param_iterator.next();
       
  8574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8576             
       
  8577             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8578             {
       
  8579         
       
  8580                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8581                 return return_type_symbol;
       
  8582                 
       
  8583             }
       
  8584             
       
  8585             ERROR;
       
  8586         }
       
  8587         
       
  8588     }/*function_dt_to_dword*/
       
  8589     break;
       
  8590 
       
  8591 /****
       
  8592  *DT_TO_LWORD
       
  8593  */
       
  8594     case function_dt_to_lword :
       
  8595     {
       
  8596         symbol_c *last_type_symbol = NULL;
       
  8597 
       
  8598         {
       
  8599             identifier_c param_name("IN");
       
  8600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8602             
       
  8603             /* Get the value from a foo(<param_value>) style call */
       
  8604             if (IN_param_value == NULL)
       
  8605               IN_param_value = function_call_param_iterator.next();
       
  8606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8608             
       
  8609             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
  8610             {
       
  8611         
       
  8612                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8613                 return return_type_symbol;
       
  8614                 
       
  8615             }
       
  8616             
       
  8617             ERROR;
       
  8618         }
       
  8619         
       
  8620     }/*function_dt_to_lword*/
       
  8621     break;
       
  8622 
       
  8623 /****
       
  8624  *STRING_TO_BOOL
       
  8625  */
       
  8626     case function_string_to_bool :
       
  8627     {
       
  8628         symbol_c *last_type_symbol = NULL;
       
  8629 
       
  8630         {
       
  8631             identifier_c param_name("IN");
       
  8632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8634             
       
  8635             /* Get the value from a foo(<param_value>) style call */
       
  8636             if (IN_param_value == NULL)
       
  8637               IN_param_value = function_call_param_iterator.next();
       
  8638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8640             
       
  8641             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  6722             {
  8642             {
  6723         
  8643         
  6724                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  8644                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
  6725                 return return_type_symbol;
  8645                 return return_type_symbol;
  6726                 
  8646                 
  6727             }
  8647             }
  6728             
  8648             
  6729             ERROR;
  8649             ERROR;
  6730         }
  8650         }
  6731         
  8651         
  6732     }/*function_time_to_bool*/
  8652     }/*function_string_to_bool*/
  6733     break;
  8653     break;
  6734 
  8654 
  6735 /****
  8655 /****
  6736  *TIME_TO_SINT
  8656  *STRING_TO_SINT
  6737  */
  8657  */
  6738     case function_time_to_sint :
  8658     case function_string_to_sint :
  6739     {
  8659     {
  6740         symbol_c *last_type_symbol = NULL;
  8660         symbol_c *last_type_symbol = NULL;
  6741 
  8661 
  6742         {
  8662         {
  6743             identifier_c param_name("IN");
  8663             identifier_c param_name("IN");
  6744             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8664             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6746             
  8666             
  6747             /* Get the value from a foo(<param_value>) style call */
  8667             /* Get the value from a foo(<param_value>) style call */
  6748             if (IN_param_value == NULL)
  8668             if (IN_param_value == NULL)
  6749               IN_param_value = function_call_param_iterator.next();
  8669               IN_param_value = function_call_param_iterator.next();
  6750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6752             
  8672             
  6753             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8673             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  6754             {
  8674             {
  6755         
  8675         
  6756                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  8676                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
  6757                 return return_type_symbol;
  8677                 return return_type_symbol;
  6758                 
  8678                 
  6759             }
  8679             }
  6760             
  8680             
  6761             ERROR;
  8681             ERROR;
  6762         }
  8682         }
  6763         
  8683         
  6764     }/*function_time_to_sint*/
  8684     }/*function_string_to_sint*/
  6765     break;
  8685     break;
  6766 
  8686 
  6767 /****
  8687 /****
  6768  *TIME_TO_INT
  8688  *STRING_TO_INT
  6769  */
  8689  */
  6770     case function_time_to_int :
  8690     case function_string_to_int :
  6771     {
  8691     {
  6772         symbol_c *last_type_symbol = NULL;
  8692         symbol_c *last_type_symbol = NULL;
  6773 
  8693 
  6774         {
  8694         {
  6775             identifier_c param_name("IN");
  8695             identifier_c param_name("IN");
  6776             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8696             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6778             
  8698             
  6779             /* Get the value from a foo(<param_value>) style call */
  8699             /* Get the value from a foo(<param_value>) style call */
  6780             if (IN_param_value == NULL)
  8700             if (IN_param_value == NULL)
  6781               IN_param_value = function_call_param_iterator.next();
  8701               IN_param_value = function_call_param_iterator.next();
  6782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6784             
  8704             
  6785             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8705             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  6786             {
  8706             {
  6787         
  8707         
  6788                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  8708                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
  6789                 return return_type_symbol;
  8709                 return return_type_symbol;
  6790                 
  8710                 
  6791             }
  8711             }
  6792             
  8712             
  6793             ERROR;
  8713             ERROR;
  6794         }
  8714         }
  6795         
  8715         
  6796     }/*function_time_to_int*/
  8716     }/*function_string_to_int*/
  6797     break;
  8717     break;
  6798 
  8718 
  6799 /****
  8719 /****
  6800  *TIME_TO_DINT
  8720  *STRING_TO_DINT
  6801  */
  8721  */
  6802     case function_time_to_dint :
  8722     case function_string_to_dint :
  6803     {
  8723     {
  6804         symbol_c *last_type_symbol = NULL;
  8724         symbol_c *last_type_symbol = NULL;
  6805 
  8725 
  6806         {
  8726         {
  6807             identifier_c param_name("IN");
  8727             identifier_c param_name("IN");
  6808             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8728             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6810             
  8730             
  6811             /* Get the value from a foo(<param_value>) style call */
  8731             /* Get the value from a foo(<param_value>) style call */
  6812             if (IN_param_value == NULL)
  8732             if (IN_param_value == NULL)
  6813               IN_param_value = function_call_param_iterator.next();
  8733               IN_param_value = function_call_param_iterator.next();
  6814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6816             
  8736             
  6817             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8737             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  6818             {
  8738             {
  6819         
  8739         
  6820                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  8740                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
  6821                 return return_type_symbol;
  8741                 return return_type_symbol;
  6822                 
  8742                 
  6823             }
  8743             }
  6824             
  8744             
  6825             ERROR;
  8745             ERROR;
  6826         }
  8746         }
  6827         
  8747         
  6828     }/*function_time_to_dint*/
  8748     }/*function_string_to_dint*/
  6829     break;
  8749     break;
  6830 
  8750 
  6831 /****
  8751 /****
  6832  *TIME_TO_LINT
  8752  *STRING_TO_LINT
  6833  */
  8753  */
  6834     case function_time_to_lint :
  8754     case function_string_to_lint :
  6835     {
  8755     {
  6836         symbol_c *last_type_symbol = NULL;
  8756         symbol_c *last_type_symbol = NULL;
  6837 
  8757 
  6838         {
  8758         {
  6839             identifier_c param_name("IN");
  8759             identifier_c param_name("IN");
  6840             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8760             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6842             
  8762             
  6843             /* Get the value from a foo(<param_value>) style call */
  8763             /* Get the value from a foo(<param_value>) style call */
  6844             if (IN_param_value == NULL)
  8764             if (IN_param_value == NULL)
  6845               IN_param_value = function_call_param_iterator.next();
  8765               IN_param_value = function_call_param_iterator.next();
  6846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6848             
  8768             
  6849             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8769             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  6850             {
  8770             {
  6851         
  8771         
  6852                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  8772                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
  6853                 return return_type_symbol;
  8773                 return return_type_symbol;
  6854                 
  8774                 
  6855             }
  8775             }
  6856             
  8776             
  6857             ERROR;
  8777             ERROR;
  6858         }
  8778         }
  6859         
  8779         
  6860     }/*function_time_to_lint*/
  8780     }/*function_string_to_lint*/
  6861     break;
  8781     break;
  6862 
  8782 
  6863 /****
  8783 /****
  6864  *TIME_TO_USINT
  8784  *STRING_TO_USINT
  6865  */
  8785  */
  6866     case function_time_to_usint :
  8786     case function_string_to_usint :
  6867     {
  8787     {
  6868         symbol_c *last_type_symbol = NULL;
  8788         symbol_c *last_type_symbol = NULL;
  6869 
  8789 
  6870         {
  8790         {
  6871             identifier_c param_name("IN");
  8791             identifier_c param_name("IN");
  6872             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8792             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6874             
  8794             
  6875             /* Get the value from a foo(<param_value>) style call */
  8795             /* Get the value from a foo(<param_value>) style call */
  6876             if (IN_param_value == NULL)
  8796             if (IN_param_value == NULL)
  6877               IN_param_value = function_call_param_iterator.next();
  8797               IN_param_value = function_call_param_iterator.next();
  6878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6880             
  8800             
  6881             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8801             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  6882             {
  8802             {
  6883         
  8803         
  6884                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  8804                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  6885                 return return_type_symbol;
  8805                 return return_type_symbol;
  6886                 
  8806                 
  6887             }
  8807             }
  6888             
  8808             
  6889             ERROR;
  8809             ERROR;
  6890         }
  8810         }
  6891         
  8811         
  6892     }/*function_time_to_usint*/
  8812     }/*function_string_to_usint*/
  6893     break;
  8813     break;
  6894 
  8814 
  6895 /****
  8815 /****
  6896  *TIME_TO_UINT
  8816  *STRING_TO_UINT
  6897  */
  8817  */
  6898     case function_time_to_uint :
  8818     case function_string_to_uint :
  6899     {
  8819     {
  6900         symbol_c *last_type_symbol = NULL;
  8820         symbol_c *last_type_symbol = NULL;
  6901 
  8821 
  6902         {
  8822         {
  6903             identifier_c param_name("IN");
  8823             identifier_c param_name("IN");
  6904             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8824             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6906             
  8826             
  6907             /* Get the value from a foo(<param_value>) style call */
  8827             /* Get the value from a foo(<param_value>) style call */
  6908             if (IN_param_value == NULL)
  8828             if (IN_param_value == NULL)
  6909               IN_param_value = function_call_param_iterator.next();
  8829               IN_param_value = function_call_param_iterator.next();
  6910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6912             
  8832             
  6913             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8833             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  6914             {
  8834             {
  6915         
  8835         
  6916                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  8836                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  6917                 return return_type_symbol;
  8837                 return return_type_symbol;
  6918                 
  8838                 
  6919             }
  8839             }
  6920             
  8840             
  6921             ERROR;
  8841             ERROR;
  6922         }
  8842         }
  6923         
  8843         
  6924     }/*function_time_to_uint*/
  8844     }/*function_string_to_uint*/
  6925     break;
  8845     break;
  6926 
  8846 
  6927 /****
  8847 /****
  6928  *TIME_TO_UDINT
  8848  *STRING_TO_UDINT
  6929  */
  8849  */
  6930     case function_time_to_udint :
  8850     case function_string_to_udint :
  6931     {
  8851     {
  6932         symbol_c *last_type_symbol = NULL;
  8852         symbol_c *last_type_symbol = NULL;
  6933 
  8853 
  6934         {
  8854         {
  6935             identifier_c param_name("IN");
  8855             identifier_c param_name("IN");
  6936             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8856             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6938             
  8858             
  6939             /* Get the value from a foo(<param_value>) style call */
  8859             /* Get the value from a foo(<param_value>) style call */
  6940             if (IN_param_value == NULL)
  8860             if (IN_param_value == NULL)
  6941               IN_param_value = function_call_param_iterator.next();
  8861               IN_param_value = function_call_param_iterator.next();
  6942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6944             
  8864             
  6945             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8865             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  6946             {
  8866             {
  6947         
  8867         
  6948                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  8868                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  6949                 return return_type_symbol;
  8869                 return return_type_symbol;
  6950                 
  8870                 
  6951             }
  8871             }
  6952             
  8872             
  6953             ERROR;
  8873             ERROR;
  6954         }
  8874         }
  6955         
  8875         
  6956     }/*function_time_to_udint*/
  8876     }/*function_string_to_udint*/
  6957     break;
  8877     break;
  6958 
  8878 
  6959 /****
  8879 /****
  6960  *TIME_TO_ULINT
  8880  *STRING_TO_ULINT
  6961  */
  8881  */
  6962     case function_time_to_ulint :
  8882     case function_string_to_ulint :
  6963     {
  8883     {
  6964         symbol_c *last_type_symbol = NULL;
  8884         symbol_c *last_type_symbol = NULL;
  6965 
  8885 
  6966         {
  8886         {
  6967             identifier_c param_name("IN");
  8887             identifier_c param_name("IN");
  6968             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8888             /* Get the value from a foo(<param_name> = <param_value>) style call */
  6969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  6970             
  8890             
  6971             /* Get the value from a foo(<param_value>) style call */
  8891             /* Get the value from a foo(<param_value>) style call */
  6972             if (IN_param_value == NULL)
  8892             if (IN_param_value == NULL)
  6973               IN_param_value = function_call_param_iterator.next();
  8893               IN_param_value = function_call_param_iterator.next();
  6974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  6975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  6976             
  8896             
  6977             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8897             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  6978             {
  8898             {
  6979         
  8899         
  6980                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  8900                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  6981                 return return_type_symbol;
  8901                 return return_type_symbol;
  6982                 
  8902                 
  6983             }
  8903             }
  6984             
  8904             
  6985             ERROR;
  8905             ERROR;
  6986         }
  8906         }
  6987         
  8907         
  6988     }/*function_time_to_ulint*/
  8908     }/*function_string_to_ulint*/
  6989     break;
  8909     break;
  6990 
  8910 
  6991 /****
  8911 /****
  6992  *TIME_TO_REAL
  8912  *STRING_TO_REAL
  6993  */
  8913  */
  6994     case function_time_to_real :
  8914     case function_string_to_real :
  6995     {
  8915     {
  6996         symbol_c *last_type_symbol = NULL;
  8916         symbol_c *last_type_symbol = NULL;
  6997 
  8917 
  6998         {
  8918         {
  6999             identifier_c param_name("IN");
  8919             identifier_c param_name("IN");
  7000             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8920             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7002             
  8922             
  7003             /* Get the value from a foo(<param_value>) style call */
  8923             /* Get the value from a foo(<param_value>) style call */
  7004             if (IN_param_value == NULL)
  8924             if (IN_param_value == NULL)
  7005               IN_param_value = function_call_param_iterator.next();
  8925               IN_param_value = function_call_param_iterator.next();
  7006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7008             
  8928             
  7009             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8929             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7010             {
  8930             {
  7011         
  8931         
  7012                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  8932                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
  7013                 return return_type_symbol;
  8933                 return return_type_symbol;
  7014                 
  8934                 
  7015             }
  8935             }
  7016             
  8936             
  7017             ERROR;
  8937             ERROR;
  7018         }
  8938         }
  7019         
  8939         
  7020     }/*function_time_to_real*/
  8940     }/*function_string_to_real*/
  7021     break;
  8941     break;
  7022 
  8942 
  7023 /****
  8943 /****
  7024  *TIME_TO_LREAL
  8944  *STRING_TO_LREAL
  7025  */
  8945  */
  7026     case function_time_to_lreal :
  8946     case function_string_to_lreal :
  7027     {
  8947     {
  7028         symbol_c *last_type_symbol = NULL;
  8948         symbol_c *last_type_symbol = NULL;
  7029 
  8949 
  7030         {
  8950         {
  7031             identifier_c param_name("IN");
  8951             identifier_c param_name("IN");
  7032             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8952             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7034             
  8954             
  7035             /* Get the value from a foo(<param_value>) style call */
  8955             /* Get the value from a foo(<param_value>) style call */
  7036             if (IN_param_value == NULL)
  8956             if (IN_param_value == NULL)
  7037               IN_param_value = function_call_param_iterator.next();
  8957               IN_param_value = function_call_param_iterator.next();
  7038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7040             
  8960             
  7041             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8961             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
  7042             {
  8962             {
  7043         
  8963         
  7044                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  8964                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
  7045                 return return_type_symbol;
  8965                 return return_type_symbol;
  7046                 
  8966                 
  7047             }
  8967             }
  7048             
  8968             
  7049             ERROR;
  8969             ERROR;
  7050         }
  8970         }
  7051         
  8971         
  7052     }/*function_time_to_lreal*/
  8972     }/*function_string_to_lreal*/
  7053     break;
  8973     break;
  7054 
  8974 
  7055 /****
  8975 /****
  7056  *TIME_TO_STRING
  8976  *STRING_TO_TIME
  7057  */
  8977  */
  7058     case function_time_to_string :
  8978     case function_string_to_time :
  7059     {
  8979     {
  7060         symbol_c *last_type_symbol = NULL;
  8980         symbol_c *last_type_symbol = NULL;
  7061 
  8981 
  7062         {
  8982         {
  7063             identifier_c param_name("IN");
  8983             identifier_c param_name("IN");
  7064             /* Get the value from a foo(<param_name> = <param_value>) style call */
  8984             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  8985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7066             
  8986             
  7067             /* Get the value from a foo(<param_value>) style call */
  8987             /* Get the value from a foo(<param_value>) style call */
  7068             if (IN_param_value == NULL)
  8988             if (IN_param_value == NULL)
  7069               IN_param_value = function_call_param_iterator.next();
  8989               IN_param_value = function_call_param_iterator.next();
  7070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  8990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  8991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7072             
  8992             
  7073             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  8993             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  8994             {
       
  8995         
       
  8996                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  8997                 return return_type_symbol;
       
  8998                 
       
  8999             }
       
  9000             
       
  9001             ERROR;
       
  9002         }
       
  9003         
       
  9004     }/*function_string_to_time*/
       
  9005     break;
       
  9006 
       
  9007 /****
       
  9008  *STRING_TO_DATE
       
  9009  */
       
  9010     case function_string_to_date :
       
  9011     {
       
  9012         symbol_c *last_type_symbol = NULL;
       
  9013 
       
  9014         {
       
  9015             identifier_c param_name("IN");
       
  9016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9018             
       
  9019             /* Get the value from a foo(<param_value>) style call */
       
  9020             if (IN_param_value == NULL)
       
  9021               IN_param_value = function_call_param_iterator.next();
       
  9022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9024             
       
  9025             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9026             {
       
  9027         
       
  9028                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9029                 return return_type_symbol;
       
  9030                 
       
  9031             }
       
  9032             
       
  9033             ERROR;
       
  9034         }
       
  9035         
       
  9036     }/*function_string_to_date*/
       
  9037     break;
       
  9038 
       
  9039 /****
       
  9040  *STRING_TO_TOD
       
  9041  */
       
  9042     case function_string_to_tod :
       
  9043     {
       
  9044         symbol_c *last_type_symbol = NULL;
       
  9045 
       
  9046         {
       
  9047             identifier_c param_name("IN");
       
  9048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9050             
       
  9051             /* Get the value from a foo(<param_value>) style call */
       
  9052             if (IN_param_value == NULL)
       
  9053               IN_param_value = function_call_param_iterator.next();
       
  9054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9056             
       
  9057             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9058             {
       
  9059         
       
  9060                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9061                 return return_type_symbol;
       
  9062                 
       
  9063             }
       
  9064             
       
  9065             ERROR;
       
  9066         }
       
  9067         
       
  9068     }/*function_string_to_tod*/
       
  9069     break;
       
  9070 
       
  9071 /****
       
  9072  *STRING_TO_DT
       
  9073  */
       
  9074     case function_string_to_dt :
       
  9075     {
       
  9076         symbol_c *last_type_symbol = NULL;
       
  9077 
       
  9078         {
       
  9079             identifier_c param_name("IN");
       
  9080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9082             
       
  9083             /* Get the value from a foo(<param_value>) style call */
       
  9084             if (IN_param_value == NULL)
       
  9085               IN_param_value = function_call_param_iterator.next();
       
  9086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9088             
       
  9089             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9090             {
       
  9091         
       
  9092                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9093                 return return_type_symbol;
       
  9094                 
       
  9095             }
       
  9096             
       
  9097             ERROR;
       
  9098         }
       
  9099         
       
  9100     }/*function_string_to_dt*/
       
  9101     break;
       
  9102 
       
  9103 /****
       
  9104  *STRING_TO_BYTE
       
  9105  */
       
  9106     case function_string_to_byte :
       
  9107     {
       
  9108         symbol_c *last_type_symbol = NULL;
       
  9109 
       
  9110         {
       
  9111             identifier_c param_name("IN");
       
  9112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9114             
       
  9115             /* Get the value from a foo(<param_value>) style call */
       
  9116             if (IN_param_value == NULL)
       
  9117               IN_param_value = function_call_param_iterator.next();
       
  9118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9120             
       
  9121             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9122             {
       
  9123         
       
  9124                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9125                 return return_type_symbol;
       
  9126                 
       
  9127             }
       
  9128             
       
  9129             ERROR;
       
  9130         }
       
  9131         
       
  9132     }/*function_string_to_byte*/
       
  9133     break;
       
  9134 
       
  9135 /****
       
  9136  *STRING_TO_WORD
       
  9137  */
       
  9138     case function_string_to_word :
       
  9139     {
       
  9140         symbol_c *last_type_symbol = NULL;
       
  9141 
       
  9142         {
       
  9143             identifier_c param_name("IN");
       
  9144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9146             
       
  9147             /* Get the value from a foo(<param_value>) style call */
       
  9148             if (IN_param_value == NULL)
       
  9149               IN_param_value = function_call_param_iterator.next();
       
  9150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9152             
       
  9153             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9154             {
       
  9155         
       
  9156                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9157                 return return_type_symbol;
       
  9158                 
       
  9159             }
       
  9160             
       
  9161             ERROR;
       
  9162         }
       
  9163         
       
  9164     }/*function_string_to_word*/
       
  9165     break;
       
  9166 
       
  9167 /****
       
  9168  *STRING_TO_DWORD
       
  9169  */
       
  9170     case function_string_to_dword :
       
  9171     {
       
  9172         symbol_c *last_type_symbol = NULL;
       
  9173 
       
  9174         {
       
  9175             identifier_c param_name("IN");
       
  9176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9178             
       
  9179             /* Get the value from a foo(<param_value>) style call */
       
  9180             if (IN_param_value == NULL)
       
  9181               IN_param_value = function_call_param_iterator.next();
       
  9182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9184             
       
  9185             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9186             {
       
  9187         
       
  9188                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9189                 return return_type_symbol;
       
  9190                 
       
  9191             }
       
  9192             
       
  9193             ERROR;
       
  9194         }
       
  9195         
       
  9196     }/*function_string_to_dword*/
       
  9197     break;
       
  9198 
       
  9199 /****
       
  9200  *STRING_TO_LWORD
       
  9201  */
       
  9202     case function_string_to_lword :
       
  9203     {
       
  9204         symbol_c *last_type_symbol = NULL;
       
  9205 
       
  9206         {
       
  9207             identifier_c param_name("IN");
       
  9208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9210             
       
  9211             /* Get the value from a foo(<param_value>) style call */
       
  9212             if (IN_param_value == NULL)
       
  9213               IN_param_value = function_call_param_iterator.next();
       
  9214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9216             
       
  9217             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
  9218             {
       
  9219         
       
  9220                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9221                 return return_type_symbol;
       
  9222                 
       
  9223             }
       
  9224             
       
  9225             ERROR;
       
  9226         }
       
  9227         
       
  9228     }/*function_string_to_lword*/
       
  9229     break;
       
  9230 
       
  9231 /****
       
  9232  *BYTE_TO_BOOL
       
  9233  */
       
  9234     case function_byte_to_bool :
       
  9235     {
       
  9236         symbol_c *last_type_symbol = NULL;
       
  9237 
       
  9238         {
       
  9239             identifier_c param_name("IN");
       
  9240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9242             
       
  9243             /* Get the value from a foo(<param_value>) style call */
       
  9244             if (IN_param_value == NULL)
       
  9245               IN_param_value = function_call_param_iterator.next();
       
  9246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9248             
       
  9249             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9250             {
       
  9251         
       
  9252                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9253                 return return_type_symbol;
       
  9254                 
       
  9255             }
       
  9256             
       
  9257             ERROR;
       
  9258         }
       
  9259         
       
  9260     }/*function_byte_to_bool*/
       
  9261     break;
       
  9262 
       
  9263 /****
       
  9264  *BYTE_TO_SINT
       
  9265  */
       
  9266     case function_byte_to_sint :
       
  9267     {
       
  9268         symbol_c *last_type_symbol = NULL;
       
  9269 
       
  9270         {
       
  9271             identifier_c param_name("IN");
       
  9272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9274             
       
  9275             /* Get the value from a foo(<param_value>) style call */
       
  9276             if (IN_param_value == NULL)
       
  9277               IN_param_value = function_call_param_iterator.next();
       
  9278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9280             
       
  9281             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9282             {
       
  9283         
       
  9284                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9285                 return return_type_symbol;
       
  9286                 
       
  9287             }
       
  9288             
       
  9289             ERROR;
       
  9290         }
       
  9291         
       
  9292     }/*function_byte_to_sint*/
       
  9293     break;
       
  9294 
       
  9295 /****
       
  9296  *BYTE_TO_INT
       
  9297  */
       
  9298     case function_byte_to_int :
       
  9299     {
       
  9300         symbol_c *last_type_symbol = NULL;
       
  9301 
       
  9302         {
       
  9303             identifier_c param_name("IN");
       
  9304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9306             
       
  9307             /* Get the value from a foo(<param_value>) style call */
       
  9308             if (IN_param_value == NULL)
       
  9309               IN_param_value = function_call_param_iterator.next();
       
  9310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9312             
       
  9313             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9314             {
       
  9315         
       
  9316                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9317                 return return_type_symbol;
       
  9318                 
       
  9319             }
       
  9320             
       
  9321             ERROR;
       
  9322         }
       
  9323         
       
  9324     }/*function_byte_to_int*/
       
  9325     break;
       
  9326 
       
  9327 /****
       
  9328  *BYTE_TO_DINT
       
  9329  */
       
  9330     case function_byte_to_dint :
       
  9331     {
       
  9332         symbol_c *last_type_symbol = NULL;
       
  9333 
       
  9334         {
       
  9335             identifier_c param_name("IN");
       
  9336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9338             
       
  9339             /* Get the value from a foo(<param_value>) style call */
       
  9340             if (IN_param_value == NULL)
       
  9341               IN_param_value = function_call_param_iterator.next();
       
  9342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9344             
       
  9345             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9346             {
       
  9347         
       
  9348                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9349                 return return_type_symbol;
       
  9350                 
       
  9351             }
       
  9352             
       
  9353             ERROR;
       
  9354         }
       
  9355         
       
  9356     }/*function_byte_to_dint*/
       
  9357     break;
       
  9358 
       
  9359 /****
       
  9360  *BYTE_TO_LINT
       
  9361  */
       
  9362     case function_byte_to_lint :
       
  9363     {
       
  9364         symbol_c *last_type_symbol = NULL;
       
  9365 
       
  9366         {
       
  9367             identifier_c param_name("IN");
       
  9368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9370             
       
  9371             /* Get the value from a foo(<param_value>) style call */
       
  9372             if (IN_param_value == NULL)
       
  9373               IN_param_value = function_call_param_iterator.next();
       
  9374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9376             
       
  9377             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9378             {
       
  9379         
       
  9380                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9381                 return return_type_symbol;
       
  9382                 
       
  9383             }
       
  9384             
       
  9385             ERROR;
       
  9386         }
       
  9387         
       
  9388     }/*function_byte_to_lint*/
       
  9389     break;
       
  9390 
       
  9391 /****
       
  9392  *BYTE_TO_USINT
       
  9393  */
       
  9394     case function_byte_to_usint :
       
  9395     {
       
  9396         symbol_c *last_type_symbol = NULL;
       
  9397 
       
  9398         {
       
  9399             identifier_c param_name("IN");
       
  9400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9402             
       
  9403             /* Get the value from a foo(<param_value>) style call */
       
  9404             if (IN_param_value == NULL)
       
  9405               IN_param_value = function_call_param_iterator.next();
       
  9406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9408             
       
  9409             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9410             {
       
  9411         
       
  9412                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9413                 return return_type_symbol;
       
  9414                 
       
  9415             }
       
  9416             
       
  9417             ERROR;
       
  9418         }
       
  9419         
       
  9420     }/*function_byte_to_usint*/
       
  9421     break;
       
  9422 
       
  9423 /****
       
  9424  *BYTE_TO_UINT
       
  9425  */
       
  9426     case function_byte_to_uint :
       
  9427     {
       
  9428         symbol_c *last_type_symbol = NULL;
       
  9429 
       
  9430         {
       
  9431             identifier_c param_name("IN");
       
  9432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9434             
       
  9435             /* Get the value from a foo(<param_value>) style call */
       
  9436             if (IN_param_value == NULL)
       
  9437               IN_param_value = function_call_param_iterator.next();
       
  9438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9440             
       
  9441             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9442             {
       
  9443         
       
  9444                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9445                 return return_type_symbol;
       
  9446                 
       
  9447             }
       
  9448             
       
  9449             ERROR;
       
  9450         }
       
  9451         
       
  9452     }/*function_byte_to_uint*/
       
  9453     break;
       
  9454 
       
  9455 /****
       
  9456  *BYTE_TO_UDINT
       
  9457  */
       
  9458     case function_byte_to_udint :
       
  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::byte_type_name, last_type_symbol))
       
  9474             {
       
  9475         
       
  9476                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9477                 return return_type_symbol;
       
  9478                 
       
  9479             }
       
  9480             
       
  9481             ERROR;
       
  9482         }
       
  9483         
       
  9484     }/*function_byte_to_udint*/
       
  9485     break;
       
  9486 
       
  9487 /****
       
  9488  *BYTE_TO_ULINT
       
  9489  */
       
  9490     case function_byte_to_ulint :
       
  9491     {
       
  9492         symbol_c *last_type_symbol = NULL;
       
  9493 
       
  9494         {
       
  9495             identifier_c param_name("IN");
       
  9496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9498             
       
  9499             /* Get the value from a foo(<param_value>) style call */
       
  9500             if (IN_param_value == NULL)
       
  9501               IN_param_value = function_call_param_iterator.next();
       
  9502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9504             
       
  9505             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9506             {
       
  9507         
       
  9508                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9509                 return return_type_symbol;
       
  9510                 
       
  9511             }
       
  9512             
       
  9513             ERROR;
       
  9514         }
       
  9515         
       
  9516     }/*function_byte_to_ulint*/
       
  9517     break;
       
  9518 
       
  9519 /****
       
  9520  *BYTE_TO_REAL
       
  9521  */
       
  9522     case function_byte_to_real :
       
  9523     {
       
  9524         symbol_c *last_type_symbol = NULL;
       
  9525 
       
  9526         {
       
  9527             identifier_c param_name("IN");
       
  9528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9530             
       
  9531             /* Get the value from a foo(<param_value>) style call */
       
  9532             if (IN_param_value == NULL)
       
  9533               IN_param_value = function_call_param_iterator.next();
       
  9534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9536             
       
  9537             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9538             {
       
  9539         
       
  9540                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9541                 return return_type_symbol;
       
  9542                 
       
  9543             }
       
  9544             
       
  9545             ERROR;
       
  9546         }
       
  9547         
       
  9548     }/*function_byte_to_real*/
       
  9549     break;
       
  9550 
       
  9551 /****
       
  9552  *BYTE_TO_LREAL
       
  9553  */
       
  9554     case function_byte_to_lreal :
       
  9555     {
       
  9556         symbol_c *last_type_symbol = NULL;
       
  9557 
       
  9558         {
       
  9559             identifier_c param_name("IN");
       
  9560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9562             
       
  9563             /* Get the value from a foo(<param_value>) style call */
       
  9564             if (IN_param_value == NULL)
       
  9565               IN_param_value = function_call_param_iterator.next();
       
  9566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9568             
       
  9569             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9570             {
       
  9571         
       
  9572                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9573                 return return_type_symbol;
       
  9574                 
       
  9575             }
       
  9576             
       
  9577             ERROR;
       
  9578         }
       
  9579         
       
  9580     }/*function_byte_to_lreal*/
       
  9581     break;
       
  9582 
       
  9583 /****
       
  9584  *BYTE_TO_TIME
       
  9585  */
       
  9586     case function_byte_to_time :
       
  9587     {
       
  9588         symbol_c *last_type_symbol = NULL;
       
  9589 
       
  9590         {
       
  9591             identifier_c param_name("IN");
       
  9592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9594             
       
  9595             /* Get the value from a foo(<param_value>) style call */
       
  9596             if (IN_param_value == NULL)
       
  9597               IN_param_value = function_call_param_iterator.next();
       
  9598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9600             
       
  9601             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9602             {
       
  9603         
       
  9604                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9605                 return return_type_symbol;
       
  9606                 
       
  9607             }
       
  9608             
       
  9609             ERROR;
       
  9610         }
       
  9611         
       
  9612     }/*function_byte_to_time*/
       
  9613     break;
       
  9614 
       
  9615 /****
       
  9616  *BYTE_TO_DATE
       
  9617  */
       
  9618     case function_byte_to_date :
       
  9619     {
       
  9620         symbol_c *last_type_symbol = NULL;
       
  9621 
       
  9622         {
       
  9623             identifier_c param_name("IN");
       
  9624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9626             
       
  9627             /* Get the value from a foo(<param_value>) style call */
       
  9628             if (IN_param_value == NULL)
       
  9629               IN_param_value = function_call_param_iterator.next();
       
  9630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9632             
       
  9633             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9634             {
       
  9635         
       
  9636                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9637                 return return_type_symbol;
       
  9638                 
       
  9639             }
       
  9640             
       
  9641             ERROR;
       
  9642         }
       
  9643         
       
  9644     }/*function_byte_to_date*/
       
  9645     break;
       
  9646 
       
  9647 /****
       
  9648  *BYTE_TO_TOD
       
  9649  */
       
  9650     case function_byte_to_tod :
       
  9651     {
       
  9652         symbol_c *last_type_symbol = NULL;
       
  9653 
       
  9654         {
       
  9655             identifier_c param_name("IN");
       
  9656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9658             
       
  9659             /* Get the value from a foo(<param_value>) style call */
       
  9660             if (IN_param_value == NULL)
       
  9661               IN_param_value = function_call_param_iterator.next();
       
  9662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9664             
       
  9665             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9666             {
       
  9667         
       
  9668                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9669                 return return_type_symbol;
       
  9670                 
       
  9671             }
       
  9672             
       
  9673             ERROR;
       
  9674         }
       
  9675         
       
  9676     }/*function_byte_to_tod*/
       
  9677     break;
       
  9678 
       
  9679 /****
       
  9680  *BYTE_TO_DT
       
  9681  */
       
  9682     case function_byte_to_dt :
       
  9683     {
       
  9684         symbol_c *last_type_symbol = NULL;
       
  9685 
       
  9686         {
       
  9687             identifier_c param_name("IN");
       
  9688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9690             
       
  9691             /* Get the value from a foo(<param_value>) style call */
       
  9692             if (IN_param_value == NULL)
       
  9693               IN_param_value = function_call_param_iterator.next();
       
  9694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9696             
       
  9697             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9698             {
       
  9699         
       
  9700                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9701                 return return_type_symbol;
       
  9702                 
       
  9703             }
       
  9704             
       
  9705             ERROR;
       
  9706         }
       
  9707         
       
  9708     }/*function_byte_to_dt*/
       
  9709     break;
       
  9710 
       
  9711 /****
       
  9712  *BYTE_TO_STRING
       
  9713  */
       
  9714     case function_byte_to_string :
       
  9715     {
       
  9716         symbol_c *last_type_symbol = NULL;
       
  9717 
       
  9718         {
       
  9719             identifier_c param_name("IN");
       
  9720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9722             
       
  9723             /* Get the value from a foo(<param_value>) style call */
       
  9724             if (IN_param_value == NULL)
       
  9725               IN_param_value = function_call_param_iterator.next();
       
  9726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9728             
       
  9729             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
  7074             {
  9730             {
  7075         
  9731         
  7076                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  9732                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
  7077                 return return_type_symbol;
  9733                 return return_type_symbol;
  7078                 
  9734                 
  7079             }
  9735             }
  7080             
  9736             
  7081             ERROR;
  9737             ERROR;
  7082         }
  9738         }
  7083         
  9739         
  7084     }/*function_time_to_string*/
  9740     }/*function_byte_to_string*/
  7085     break;
  9741     break;
  7086 
  9742 
  7087 /****
  9743 /****
  7088  *TIME_TO_BYTE
  9744  *BYTE_TO_WORD
  7089  */
  9745  */
  7090     case function_time_to_byte :
  9746     case function_byte_to_word :
  7091     {
  9747     {
  7092         symbol_c *last_type_symbol = NULL;
  9748         symbol_c *last_type_symbol = NULL;
  7093 
  9749 
  7094         {
  9750         {
  7095             identifier_c param_name("IN");
  9751             identifier_c param_name("IN");
  7096             /* Get the value from a foo(<param_name> = <param_value>) style call */
  9752             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  9753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7098             
  9754             
  7099             /* Get the value from a foo(<param_value>) style call */
  9755             /* Get the value from a foo(<param_value>) style call */
  7100             if (IN_param_value == NULL)
  9756             if (IN_param_value == NULL)
  7101               IN_param_value = function_call_param_iterator.next();
  9757               IN_param_value = function_call_param_iterator.next();
  7102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  9758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  9759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7104             
  9760             
  7105             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
  9761             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9762             {
       
  9763         
       
  9764                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9765                 return return_type_symbol;
       
  9766                 
       
  9767             }
       
  9768             
       
  9769             ERROR;
       
  9770         }
       
  9771         
       
  9772     }/*function_byte_to_word*/
       
  9773     break;
       
  9774 
       
  9775 /****
       
  9776  *BYTE_TO_DWORD
       
  9777  */
       
  9778     case function_byte_to_dword :
       
  9779     {
       
  9780         symbol_c *last_type_symbol = NULL;
       
  9781 
       
  9782         {
       
  9783             identifier_c param_name("IN");
       
  9784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9786             
       
  9787             /* Get the value from a foo(<param_value>) style call */
       
  9788             if (IN_param_value == NULL)
       
  9789               IN_param_value = function_call_param_iterator.next();
       
  9790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9792             
       
  9793             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9794             {
       
  9795         
       
  9796                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9797                 return return_type_symbol;
       
  9798                 
       
  9799             }
       
  9800             
       
  9801             ERROR;
       
  9802         }
       
  9803         
       
  9804     }/*function_byte_to_dword*/
       
  9805     break;
       
  9806 
       
  9807 /****
       
  9808  *BYTE_TO_LWORD
       
  9809  */
       
  9810     case function_byte_to_lword :
       
  9811     {
       
  9812         symbol_c *last_type_symbol = NULL;
       
  9813 
       
  9814         {
       
  9815             identifier_c param_name("IN");
       
  9816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9818             
       
  9819             /* Get the value from a foo(<param_value>) style call */
       
  9820             if (IN_param_value == NULL)
       
  9821               IN_param_value = function_call_param_iterator.next();
       
  9822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9824             
       
  9825             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
  9826             {
       
  9827         
       
  9828                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9829                 return return_type_symbol;
       
  9830                 
       
  9831             }
       
  9832             
       
  9833             ERROR;
       
  9834         }
       
  9835         
       
  9836     }/*function_byte_to_lword*/
       
  9837     break;
       
  9838 
       
  9839 /****
       
  9840  *WORD_TO_BOOL
       
  9841  */
       
  9842     case function_word_to_bool :
       
  9843     {
       
  9844         symbol_c *last_type_symbol = NULL;
       
  9845 
       
  9846         {
       
  9847             identifier_c param_name("IN");
       
  9848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9850             
       
  9851             /* Get the value from a foo(<param_value>) style call */
       
  9852             if (IN_param_value == NULL)
       
  9853               IN_param_value = function_call_param_iterator.next();
       
  9854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9856             
       
  9857             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  9858             {
       
  9859         
       
  9860                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9861                 return return_type_symbol;
       
  9862                 
       
  9863             }
       
  9864             
       
  9865             ERROR;
       
  9866         }
       
  9867         
       
  9868     }/*function_word_to_bool*/
       
  9869     break;
       
  9870 
       
  9871 /****
       
  9872  *WORD_TO_SINT
       
  9873  */
       
  9874     case function_word_to_sint :
       
  9875     {
       
  9876         symbol_c *last_type_symbol = NULL;
       
  9877 
       
  9878         {
       
  9879             identifier_c param_name("IN");
       
  9880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9882             
       
  9883             /* Get the value from a foo(<param_value>) style call */
       
  9884             if (IN_param_value == NULL)
       
  9885               IN_param_value = function_call_param_iterator.next();
       
  9886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9888             
       
  9889             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  9890             {
       
  9891         
       
  9892                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9893                 return return_type_symbol;
       
  9894                 
       
  9895             }
       
  9896             
       
  9897             ERROR;
       
  9898         }
       
  9899         
       
  9900     }/*function_word_to_sint*/
       
  9901     break;
       
  9902 
       
  9903 /****
       
  9904  *WORD_TO_INT
       
  9905  */
       
  9906     case function_word_to_int :
       
  9907     {
       
  9908         symbol_c *last_type_symbol = NULL;
       
  9909 
       
  9910         {
       
  9911             identifier_c param_name("IN");
       
  9912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9914             
       
  9915             /* Get the value from a foo(<param_value>) style call */
       
  9916             if (IN_param_value == NULL)
       
  9917               IN_param_value = function_call_param_iterator.next();
       
  9918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9920             
       
  9921             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  9922             {
       
  9923         
       
  9924                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9925                 return return_type_symbol;
       
  9926                 
       
  9927             }
       
  9928             
       
  9929             ERROR;
       
  9930         }
       
  9931         
       
  9932     }/*function_word_to_int*/
       
  9933     break;
       
  9934 
       
  9935 /****
       
  9936  *WORD_TO_DINT
       
  9937  */
       
  9938     case function_word_to_dint :
       
  9939     {
       
  9940         symbol_c *last_type_symbol = NULL;
       
  9941 
       
  9942         {
       
  9943             identifier_c param_name("IN");
       
  9944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9946             
       
  9947             /* Get the value from a foo(<param_value>) style call */
       
  9948             if (IN_param_value == NULL)
       
  9949               IN_param_value = function_call_param_iterator.next();
       
  9950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9952             
       
  9953             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  9954             {
       
  9955         
       
  9956                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9957                 return return_type_symbol;
       
  9958                 
       
  9959             }
       
  9960             
       
  9961             ERROR;
       
  9962         }
       
  9963         
       
  9964     }/*function_word_to_dint*/
       
  9965     break;
       
  9966 
       
  9967 /****
       
  9968  *WORD_TO_LINT
       
  9969  */
       
  9970     case function_word_to_lint :
       
  9971     {
       
  9972         symbol_c *last_type_symbol = NULL;
       
  9973 
       
  9974         {
       
  9975             identifier_c param_name("IN");
       
  9976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9978             
       
  9979             /* Get the value from a foo(<param_value>) style call */
       
  9980             if (IN_param_value == NULL)
       
  9981               IN_param_value = function_call_param_iterator.next();
       
  9982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9984             
       
  9985             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
  9986             {
       
  9987         
       
  9988                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9989                 return return_type_symbol;
       
  9990                 
       
  9991             }
       
  9992             
       
  9993             ERROR;
       
  9994         }
       
  9995         
       
  9996     }/*function_word_to_lint*/
       
  9997     break;
       
  9998 
       
  9999 /****
       
 10000  *WORD_TO_USINT
       
 10001  */
       
 10002     case function_word_to_usint :
       
 10003     {
       
 10004         symbol_c *last_type_symbol = NULL;
       
 10005 
       
 10006         {
       
 10007             identifier_c param_name("IN");
       
 10008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10010             
       
 10011             /* Get the value from a foo(<param_value>) style call */
       
 10012             if (IN_param_value == NULL)
       
 10013               IN_param_value = function_call_param_iterator.next();
       
 10014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10016             
       
 10017             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10018             {
       
 10019         
       
 10020                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10021                 return return_type_symbol;
       
 10022                 
       
 10023             }
       
 10024             
       
 10025             ERROR;
       
 10026         }
       
 10027         
       
 10028     }/*function_word_to_usint*/
       
 10029     break;
       
 10030 
       
 10031 /****
       
 10032  *WORD_TO_UINT
       
 10033  */
       
 10034     case function_word_to_uint :
       
 10035     {
       
 10036         symbol_c *last_type_symbol = NULL;
       
 10037 
       
 10038         {
       
 10039             identifier_c param_name("IN");
       
 10040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10042             
       
 10043             /* Get the value from a foo(<param_value>) style call */
       
 10044             if (IN_param_value == NULL)
       
 10045               IN_param_value = function_call_param_iterator.next();
       
 10046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10048             
       
 10049             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10050             {
       
 10051         
       
 10052                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10053                 return return_type_symbol;
       
 10054                 
       
 10055             }
       
 10056             
       
 10057             ERROR;
       
 10058         }
       
 10059         
       
 10060     }/*function_word_to_uint*/
       
 10061     break;
       
 10062 
       
 10063 /****
       
 10064  *WORD_TO_UDINT
       
 10065  */
       
 10066     case function_word_to_udint :
       
 10067     {
       
 10068         symbol_c *last_type_symbol = NULL;
       
 10069 
       
 10070         {
       
 10071             identifier_c param_name("IN");
       
 10072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10074             
       
 10075             /* Get the value from a foo(<param_value>) style call */
       
 10076             if (IN_param_value == NULL)
       
 10077               IN_param_value = function_call_param_iterator.next();
       
 10078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10080             
       
 10081             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10082             {
       
 10083         
       
 10084                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10085                 return return_type_symbol;
       
 10086                 
       
 10087             }
       
 10088             
       
 10089             ERROR;
       
 10090         }
       
 10091         
       
 10092     }/*function_word_to_udint*/
       
 10093     break;
       
 10094 
       
 10095 /****
       
 10096  *WORD_TO_ULINT
       
 10097  */
       
 10098     case function_word_to_ulint :
       
 10099     {
       
 10100         symbol_c *last_type_symbol = NULL;
       
 10101 
       
 10102         {
       
 10103             identifier_c param_name("IN");
       
 10104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10106             
       
 10107             /* Get the value from a foo(<param_value>) style call */
       
 10108             if (IN_param_value == NULL)
       
 10109               IN_param_value = function_call_param_iterator.next();
       
 10110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10112             
       
 10113             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10114             {
       
 10115         
       
 10116                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10117                 return return_type_symbol;
       
 10118                 
       
 10119             }
       
 10120             
       
 10121             ERROR;
       
 10122         }
       
 10123         
       
 10124     }/*function_word_to_ulint*/
       
 10125     break;
       
 10126 
       
 10127 /****
       
 10128  *WORD_TO_REAL
       
 10129  */
       
 10130     case function_word_to_real :
       
 10131     {
       
 10132         symbol_c *last_type_symbol = NULL;
       
 10133 
       
 10134         {
       
 10135             identifier_c param_name("IN");
       
 10136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10138             
       
 10139             /* Get the value from a foo(<param_value>) style call */
       
 10140             if (IN_param_value == NULL)
       
 10141               IN_param_value = function_call_param_iterator.next();
       
 10142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10144             
       
 10145             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10146             {
       
 10147         
       
 10148                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10149                 return return_type_symbol;
       
 10150                 
       
 10151             }
       
 10152             
       
 10153             ERROR;
       
 10154         }
       
 10155         
       
 10156     }/*function_word_to_real*/
       
 10157     break;
       
 10158 
       
 10159 /****
       
 10160  *WORD_TO_LREAL
       
 10161  */
       
 10162     case function_word_to_lreal :
       
 10163     {
       
 10164         symbol_c *last_type_symbol = NULL;
       
 10165 
       
 10166         {
       
 10167             identifier_c param_name("IN");
       
 10168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10170             
       
 10171             /* Get the value from a foo(<param_value>) style call */
       
 10172             if (IN_param_value == NULL)
       
 10173               IN_param_value = function_call_param_iterator.next();
       
 10174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10176             
       
 10177             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10178             {
       
 10179         
       
 10180                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10181                 return return_type_symbol;
       
 10182                 
       
 10183             }
       
 10184             
       
 10185             ERROR;
       
 10186         }
       
 10187         
       
 10188     }/*function_word_to_lreal*/
       
 10189     break;
       
 10190 
       
 10191 /****
       
 10192  *WORD_TO_TIME
       
 10193  */
       
 10194     case function_word_to_time :
       
 10195     {
       
 10196         symbol_c *last_type_symbol = NULL;
       
 10197 
       
 10198         {
       
 10199             identifier_c param_name("IN");
       
 10200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10202             
       
 10203             /* Get the value from a foo(<param_value>) style call */
       
 10204             if (IN_param_value == NULL)
       
 10205               IN_param_value = function_call_param_iterator.next();
       
 10206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10208             
       
 10209             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10210             {
       
 10211         
       
 10212                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10213                 return return_type_symbol;
       
 10214                 
       
 10215             }
       
 10216             
       
 10217             ERROR;
       
 10218         }
       
 10219         
       
 10220     }/*function_word_to_time*/
       
 10221     break;
       
 10222 
       
 10223 /****
       
 10224  *WORD_TO_DATE
       
 10225  */
       
 10226     case function_word_to_date :
       
 10227     {
       
 10228         symbol_c *last_type_symbol = NULL;
       
 10229 
       
 10230         {
       
 10231             identifier_c param_name("IN");
       
 10232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10234             
       
 10235             /* Get the value from a foo(<param_value>) style call */
       
 10236             if (IN_param_value == NULL)
       
 10237               IN_param_value = function_call_param_iterator.next();
       
 10238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10240             
       
 10241             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10242             {
       
 10243         
       
 10244                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10245                 return return_type_symbol;
       
 10246                 
       
 10247             }
       
 10248             
       
 10249             ERROR;
       
 10250         }
       
 10251         
       
 10252     }/*function_word_to_date*/
       
 10253     break;
       
 10254 
       
 10255 /****
       
 10256  *WORD_TO_TOD
       
 10257  */
       
 10258     case function_word_to_tod :
       
 10259     {
       
 10260         symbol_c *last_type_symbol = NULL;
       
 10261 
       
 10262         {
       
 10263             identifier_c param_name("IN");
       
 10264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10266             
       
 10267             /* Get the value from a foo(<param_value>) style call */
       
 10268             if (IN_param_value == NULL)
       
 10269               IN_param_value = function_call_param_iterator.next();
       
 10270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10272             
       
 10273             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10274             {
       
 10275         
       
 10276                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10277                 return return_type_symbol;
       
 10278                 
       
 10279             }
       
 10280             
       
 10281             ERROR;
       
 10282         }
       
 10283         
       
 10284     }/*function_word_to_tod*/
       
 10285     break;
       
 10286 
       
 10287 /****
       
 10288  *WORD_TO_DT
       
 10289  */
       
 10290     case function_word_to_dt :
       
 10291     {
       
 10292         symbol_c *last_type_symbol = NULL;
       
 10293 
       
 10294         {
       
 10295             identifier_c param_name("IN");
       
 10296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10298             
       
 10299             /* Get the value from a foo(<param_value>) style call */
       
 10300             if (IN_param_value == NULL)
       
 10301               IN_param_value = function_call_param_iterator.next();
       
 10302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10304             
       
 10305             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10306             {
       
 10307         
       
 10308                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10309                 return return_type_symbol;
       
 10310                 
       
 10311             }
       
 10312             
       
 10313             ERROR;
       
 10314         }
       
 10315         
       
 10316     }/*function_word_to_dt*/
       
 10317     break;
       
 10318 
       
 10319 /****
       
 10320  *WORD_TO_STRING
       
 10321  */
       
 10322     case function_word_to_string :
       
 10323     {
       
 10324         symbol_c *last_type_symbol = NULL;
       
 10325 
       
 10326         {
       
 10327             identifier_c param_name("IN");
       
 10328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10330             
       
 10331             /* Get the value from a foo(<param_value>) style call */
       
 10332             if (IN_param_value == NULL)
       
 10333               IN_param_value = function_call_param_iterator.next();
       
 10334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10336             
       
 10337             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10338             {
       
 10339         
       
 10340                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10341                 return return_type_symbol;
       
 10342                 
       
 10343             }
       
 10344             
       
 10345             ERROR;
       
 10346         }
       
 10347         
       
 10348     }/*function_word_to_string*/
       
 10349     break;
       
 10350 
       
 10351 /****
       
 10352  *WORD_TO_BYTE
       
 10353  */
       
 10354     case function_word_to_byte :
       
 10355     {
       
 10356         symbol_c *last_type_symbol = NULL;
       
 10357 
       
 10358         {
       
 10359             identifier_c param_name("IN");
       
 10360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10362             
       
 10363             /* Get the value from a foo(<param_value>) style call */
       
 10364             if (IN_param_value == NULL)
       
 10365               IN_param_value = function_call_param_iterator.next();
       
 10366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10368             
       
 10369             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
  7106             {
 10370             {
  7107         
 10371         
  7108                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 10372                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
  7109                 return return_type_symbol;
 10373                 return return_type_symbol;
  7110                 
 10374                 
  7111             }
 10375             }
  7112             
 10376             
  7113             ERROR;
 10377             ERROR;
  7114         }
 10378         }
  7115         
 10379         
  7116     }/*function_time_to_byte*/
 10380     }/*function_word_to_byte*/
  7117     break;
 10381     break;
  7118 
 10382 
  7119 /****
 10383 /****
  7120  *TIME_TO_WORD
 10384  *WORD_TO_DWORD
  7121  */
 10385  */
  7122     case function_time_to_word :
 10386     case function_word_to_dword :
  7123     {
 10387     {
  7124         symbol_c *last_type_symbol = NULL;
 10388         symbol_c *last_type_symbol = NULL;
  7125 
 10389 
  7126         {
 10390         {
  7127             identifier_c param_name("IN");
 10391             identifier_c param_name("IN");
  7128             /* Get the value from a foo(<param_name> = <param_value>) style call */
 10392             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 10393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7130             
 10394             
  7131             /* Get the value from a foo(<param_value>) style call */
 10395             /* Get the value from a foo(<param_value>) style call */
  7132             if (IN_param_value == NULL)
 10396             if (IN_param_value == NULL)
  7133               IN_param_value = function_call_param_iterator.next();
 10397               IN_param_value = function_call_param_iterator.next();
  7134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 10398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 10399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7136             
 10400             
  7137             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 10401             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10402             {
       
 10403         
       
 10404                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10405                 return return_type_symbol;
       
 10406                 
       
 10407             }
       
 10408             
       
 10409             ERROR;
       
 10410         }
       
 10411         
       
 10412     }/*function_word_to_dword*/
       
 10413     break;
       
 10414 
       
 10415 /****
       
 10416  *WORD_TO_LWORD
       
 10417  */
       
 10418     case function_word_to_lword :
       
 10419     {
       
 10420         symbol_c *last_type_symbol = NULL;
       
 10421 
       
 10422         {
       
 10423             identifier_c param_name("IN");
       
 10424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10426             
       
 10427             /* Get the value from a foo(<param_value>) style call */
       
 10428             if (IN_param_value == NULL)
       
 10429               IN_param_value = function_call_param_iterator.next();
       
 10430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10432             
       
 10433             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 10434             {
       
 10435         
       
 10436                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10437                 return return_type_symbol;
       
 10438                 
       
 10439             }
       
 10440             
       
 10441             ERROR;
       
 10442         }
       
 10443         
       
 10444     }/*function_word_to_lword*/
       
 10445     break;
       
 10446 
       
 10447 /****
       
 10448  *DWORD_TO_BOOL
       
 10449  */
       
 10450     case function_dword_to_bool :
       
 10451     {
       
 10452         symbol_c *last_type_symbol = NULL;
       
 10453 
       
 10454         {
       
 10455             identifier_c param_name("IN");
       
 10456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10458             
       
 10459             /* Get the value from a foo(<param_value>) style call */
       
 10460             if (IN_param_value == NULL)
       
 10461               IN_param_value = function_call_param_iterator.next();
       
 10462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10464             
       
 10465             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10466             {
       
 10467         
       
 10468                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10469                 return return_type_symbol;
       
 10470                 
       
 10471             }
       
 10472             
       
 10473             ERROR;
       
 10474         }
       
 10475         
       
 10476     }/*function_dword_to_bool*/
       
 10477     break;
       
 10478 
       
 10479 /****
       
 10480  *DWORD_TO_SINT
       
 10481  */
       
 10482     case function_dword_to_sint :
       
 10483     {
       
 10484         symbol_c *last_type_symbol = NULL;
       
 10485 
       
 10486         {
       
 10487             identifier_c param_name("IN");
       
 10488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10490             
       
 10491             /* Get the value from a foo(<param_value>) style call */
       
 10492             if (IN_param_value == NULL)
       
 10493               IN_param_value = function_call_param_iterator.next();
       
 10494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10496             
       
 10497             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10498             {
       
 10499         
       
 10500                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10501                 return return_type_symbol;
       
 10502                 
       
 10503             }
       
 10504             
       
 10505             ERROR;
       
 10506         }
       
 10507         
       
 10508     }/*function_dword_to_sint*/
       
 10509     break;
       
 10510 
       
 10511 /****
       
 10512  *DWORD_TO_INT
       
 10513  */
       
 10514     case function_dword_to_int :
       
 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::dword_type_name, last_type_symbol))
       
 10530             {
       
 10531         
       
 10532                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10533                 return return_type_symbol;
       
 10534                 
       
 10535             }
       
 10536             
       
 10537             ERROR;
       
 10538         }
       
 10539         
       
 10540     }/*function_dword_to_int*/
       
 10541     break;
       
 10542 
       
 10543 /****
       
 10544  *DWORD_TO_DINT
       
 10545  */
       
 10546     case function_dword_to_dint :
       
 10547     {
       
 10548         symbol_c *last_type_symbol = NULL;
       
 10549 
       
 10550         {
       
 10551             identifier_c param_name("IN");
       
 10552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10554             
       
 10555             /* Get the value from a foo(<param_value>) style call */
       
 10556             if (IN_param_value == NULL)
       
 10557               IN_param_value = function_call_param_iterator.next();
       
 10558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10560             
       
 10561             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10562             {
       
 10563         
       
 10564                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10565                 return return_type_symbol;
       
 10566                 
       
 10567             }
       
 10568             
       
 10569             ERROR;
       
 10570         }
       
 10571         
       
 10572     }/*function_dword_to_dint*/
       
 10573     break;
       
 10574 
       
 10575 /****
       
 10576  *DWORD_TO_LINT
       
 10577  */
       
 10578     case function_dword_to_lint :
       
 10579     {
       
 10580         symbol_c *last_type_symbol = NULL;
       
 10581 
       
 10582         {
       
 10583             identifier_c param_name("IN");
       
 10584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10586             
       
 10587             /* Get the value from a foo(<param_value>) style call */
       
 10588             if (IN_param_value == NULL)
       
 10589               IN_param_value = function_call_param_iterator.next();
       
 10590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10592             
       
 10593             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10594             {
       
 10595         
       
 10596                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10597                 return return_type_symbol;
       
 10598                 
       
 10599             }
       
 10600             
       
 10601             ERROR;
       
 10602         }
       
 10603         
       
 10604     }/*function_dword_to_lint*/
       
 10605     break;
       
 10606 
       
 10607 /****
       
 10608  *DWORD_TO_USINT
       
 10609  */
       
 10610     case function_dword_to_usint :
       
 10611     {
       
 10612         symbol_c *last_type_symbol = NULL;
       
 10613 
       
 10614         {
       
 10615             identifier_c param_name("IN");
       
 10616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10618             
       
 10619             /* Get the value from a foo(<param_value>) style call */
       
 10620             if (IN_param_value == NULL)
       
 10621               IN_param_value = function_call_param_iterator.next();
       
 10622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10624             
       
 10625             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10626             {
       
 10627         
       
 10628                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10629                 return return_type_symbol;
       
 10630                 
       
 10631             }
       
 10632             
       
 10633             ERROR;
       
 10634         }
       
 10635         
       
 10636     }/*function_dword_to_usint*/
       
 10637     break;
       
 10638 
       
 10639 /****
       
 10640  *DWORD_TO_UINT
       
 10641  */
       
 10642     case function_dword_to_uint :
       
 10643     {
       
 10644         symbol_c *last_type_symbol = NULL;
       
 10645 
       
 10646         {
       
 10647             identifier_c param_name("IN");
       
 10648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10650             
       
 10651             /* Get the value from a foo(<param_value>) style call */
       
 10652             if (IN_param_value == NULL)
       
 10653               IN_param_value = function_call_param_iterator.next();
       
 10654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10656             
       
 10657             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10658             {
       
 10659         
       
 10660                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10661                 return return_type_symbol;
       
 10662                 
       
 10663             }
       
 10664             
       
 10665             ERROR;
       
 10666         }
       
 10667         
       
 10668     }/*function_dword_to_uint*/
       
 10669     break;
       
 10670 
       
 10671 /****
       
 10672  *DWORD_TO_UDINT
       
 10673  */
       
 10674     case function_dword_to_udint :
       
 10675     {
       
 10676         symbol_c *last_type_symbol = NULL;
       
 10677 
       
 10678         {
       
 10679             identifier_c param_name("IN");
       
 10680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10682             
       
 10683             /* Get the value from a foo(<param_value>) style call */
       
 10684             if (IN_param_value == NULL)
       
 10685               IN_param_value = function_call_param_iterator.next();
       
 10686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10688             
       
 10689             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10690             {
       
 10691         
       
 10692                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10693                 return return_type_symbol;
       
 10694                 
       
 10695             }
       
 10696             
       
 10697             ERROR;
       
 10698         }
       
 10699         
       
 10700     }/*function_dword_to_udint*/
       
 10701     break;
       
 10702 
       
 10703 /****
       
 10704  *DWORD_TO_ULINT
       
 10705  */
       
 10706     case function_dword_to_ulint :
       
 10707     {
       
 10708         symbol_c *last_type_symbol = NULL;
       
 10709 
       
 10710         {
       
 10711             identifier_c param_name("IN");
       
 10712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10714             
       
 10715             /* Get the value from a foo(<param_value>) style call */
       
 10716             if (IN_param_value == NULL)
       
 10717               IN_param_value = function_call_param_iterator.next();
       
 10718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10720             
       
 10721             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10722             {
       
 10723         
       
 10724                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10725                 return return_type_symbol;
       
 10726                 
       
 10727             }
       
 10728             
       
 10729             ERROR;
       
 10730         }
       
 10731         
       
 10732     }/*function_dword_to_ulint*/
       
 10733     break;
       
 10734 
       
 10735 /****
       
 10736  *DWORD_TO_REAL
       
 10737  */
       
 10738     case function_dword_to_real :
       
 10739     {
       
 10740         symbol_c *last_type_symbol = NULL;
       
 10741 
       
 10742         {
       
 10743             identifier_c param_name("IN");
       
 10744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10746             
       
 10747             /* Get the value from a foo(<param_value>) style call */
       
 10748             if (IN_param_value == NULL)
       
 10749               IN_param_value = function_call_param_iterator.next();
       
 10750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10752             
       
 10753             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10754             {
       
 10755         
       
 10756                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10757                 return return_type_symbol;
       
 10758                 
       
 10759             }
       
 10760             
       
 10761             ERROR;
       
 10762         }
       
 10763         
       
 10764     }/*function_dword_to_real*/
       
 10765     break;
       
 10766 
       
 10767 /****
       
 10768  *DWORD_TO_LREAL
       
 10769  */
       
 10770     case function_dword_to_lreal :
       
 10771     {
       
 10772         symbol_c *last_type_symbol = NULL;
       
 10773 
       
 10774         {
       
 10775             identifier_c param_name("IN");
       
 10776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10778             
       
 10779             /* Get the value from a foo(<param_value>) style call */
       
 10780             if (IN_param_value == NULL)
       
 10781               IN_param_value = function_call_param_iterator.next();
       
 10782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10784             
       
 10785             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10786             {
       
 10787         
       
 10788                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10789                 return return_type_symbol;
       
 10790                 
       
 10791             }
       
 10792             
       
 10793             ERROR;
       
 10794         }
       
 10795         
       
 10796     }/*function_dword_to_lreal*/
       
 10797     break;
       
 10798 
       
 10799 /****
       
 10800  *DWORD_TO_TIME
       
 10801  */
       
 10802     case function_dword_to_time :
       
 10803     {
       
 10804         symbol_c *last_type_symbol = NULL;
       
 10805 
       
 10806         {
       
 10807             identifier_c param_name("IN");
       
 10808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10810             
       
 10811             /* Get the value from a foo(<param_value>) style call */
       
 10812             if (IN_param_value == NULL)
       
 10813               IN_param_value = function_call_param_iterator.next();
       
 10814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10816             
       
 10817             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10818             {
       
 10819         
       
 10820                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10821                 return return_type_symbol;
       
 10822                 
       
 10823             }
       
 10824             
       
 10825             ERROR;
       
 10826         }
       
 10827         
       
 10828     }/*function_dword_to_time*/
       
 10829     break;
       
 10830 
       
 10831 /****
       
 10832  *DWORD_TO_DATE
       
 10833  */
       
 10834     case function_dword_to_date :
       
 10835     {
       
 10836         symbol_c *last_type_symbol = NULL;
       
 10837 
       
 10838         {
       
 10839             identifier_c param_name("IN");
       
 10840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10842             
       
 10843             /* Get the value from a foo(<param_value>) style call */
       
 10844             if (IN_param_value == NULL)
       
 10845               IN_param_value = function_call_param_iterator.next();
       
 10846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10848             
       
 10849             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10850             {
       
 10851         
       
 10852                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10853                 return return_type_symbol;
       
 10854                 
       
 10855             }
       
 10856             
       
 10857             ERROR;
       
 10858         }
       
 10859         
       
 10860     }/*function_dword_to_date*/
       
 10861     break;
       
 10862 
       
 10863 /****
       
 10864  *DWORD_TO_TOD
       
 10865  */
       
 10866     case function_dword_to_tod :
       
 10867     {
       
 10868         symbol_c *last_type_symbol = NULL;
       
 10869 
       
 10870         {
       
 10871             identifier_c param_name("IN");
       
 10872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10874             
       
 10875             /* Get the value from a foo(<param_value>) style call */
       
 10876             if (IN_param_value == NULL)
       
 10877               IN_param_value = function_call_param_iterator.next();
       
 10878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10880             
       
 10881             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10882             {
       
 10883         
       
 10884                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10885                 return return_type_symbol;
       
 10886                 
       
 10887             }
       
 10888             
       
 10889             ERROR;
       
 10890         }
       
 10891         
       
 10892     }/*function_dword_to_tod*/
       
 10893     break;
       
 10894 
       
 10895 /****
       
 10896  *DWORD_TO_DT
       
 10897  */
       
 10898     case function_dword_to_dt :
       
 10899     {
       
 10900         symbol_c *last_type_symbol = NULL;
       
 10901 
       
 10902         {
       
 10903             identifier_c param_name("IN");
       
 10904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10906             
       
 10907             /* Get the value from a foo(<param_value>) style call */
       
 10908             if (IN_param_value == NULL)
       
 10909               IN_param_value = function_call_param_iterator.next();
       
 10910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10912             
       
 10913             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10914             {
       
 10915         
       
 10916                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10917                 return return_type_symbol;
       
 10918                 
       
 10919             }
       
 10920             
       
 10921             ERROR;
       
 10922         }
       
 10923         
       
 10924     }/*function_dword_to_dt*/
       
 10925     break;
       
 10926 
       
 10927 /****
       
 10928  *DWORD_TO_STRING
       
 10929  */
       
 10930     case function_dword_to_string :
       
 10931     {
       
 10932         symbol_c *last_type_symbol = NULL;
       
 10933 
       
 10934         {
       
 10935             identifier_c param_name("IN");
       
 10936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10938             
       
 10939             /* Get the value from a foo(<param_value>) style call */
       
 10940             if (IN_param_value == NULL)
       
 10941               IN_param_value = function_call_param_iterator.next();
       
 10942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10944             
       
 10945             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10946             {
       
 10947         
       
 10948                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10949                 return return_type_symbol;
       
 10950                 
       
 10951             }
       
 10952             
       
 10953             ERROR;
       
 10954         }
       
 10955         
       
 10956     }/*function_dword_to_string*/
       
 10957     break;
       
 10958 
       
 10959 /****
       
 10960  *DWORD_TO_BYTE
       
 10961  */
       
 10962     case function_dword_to_byte :
       
 10963     {
       
 10964         symbol_c *last_type_symbol = NULL;
       
 10965 
       
 10966         {
       
 10967             identifier_c param_name("IN");
       
 10968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10970             
       
 10971             /* Get the value from a foo(<param_value>) style call */
       
 10972             if (IN_param_value == NULL)
       
 10973               IN_param_value = function_call_param_iterator.next();
       
 10974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10976             
       
 10977             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 10978             {
       
 10979         
       
 10980                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10981                 return return_type_symbol;
       
 10982                 
       
 10983             }
       
 10984             
       
 10985             ERROR;
       
 10986         }
       
 10987         
       
 10988     }/*function_dword_to_byte*/
       
 10989     break;
       
 10990 
       
 10991 /****
       
 10992  *DWORD_TO_WORD
       
 10993  */
       
 10994     case function_dword_to_word :
       
 10995     {
       
 10996         symbol_c *last_type_symbol = NULL;
       
 10997 
       
 10998         {
       
 10999             identifier_c param_name("IN");
       
 11000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11002             
       
 11003             /* Get the value from a foo(<param_value>) style call */
       
 11004             if (IN_param_value == NULL)
       
 11005               IN_param_value = function_call_param_iterator.next();
       
 11006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11008             
       
 11009             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
  7138             {
 11010             {
  7139         
 11011         
  7140                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 11012                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
  7141                 return return_type_symbol;
 11013                 return return_type_symbol;
  7142                 
 11014                 
  7143             }
 11015             }
  7144             
 11016             
  7145             ERROR;
 11017             ERROR;
  7146         }
 11018         }
  7147         
 11019         
  7148     }/*function_time_to_word*/
 11020     }/*function_dword_to_word*/
  7149     break;
 11021     break;
  7150 
 11022 
  7151 /****
 11023 /****
  7152  *TIME_TO_DWORD
 11024  *DWORD_TO_LWORD
  7153  */
 11025  */
  7154     case function_time_to_dword :
 11026     case function_dword_to_lword :
  7155     {
 11027     {
  7156         symbol_c *last_type_symbol = NULL;
 11028         symbol_c *last_type_symbol = NULL;
  7157 
 11029 
  7158         {
 11030         {
  7159             identifier_c param_name("IN");
 11031             identifier_c param_name("IN");
  7160             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11032             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7162             
 11034             
  7163             /* Get the value from a foo(<param_value>) style call */
 11035             /* Get the value from a foo(<param_value>) style call */
  7164             if (IN_param_value == NULL)
 11036             if (IN_param_value == NULL)
  7165               IN_param_value = function_call_param_iterator.next();
 11037               IN_param_value = function_call_param_iterator.next();
  7166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7168             
 11040             
  7169             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 11041             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 11042             {
       
 11043         
       
 11044                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11045                 return return_type_symbol;
       
 11046                 
       
 11047             }
       
 11048             
       
 11049             ERROR;
       
 11050         }
       
 11051         
       
 11052     }/*function_dword_to_lword*/
       
 11053     break;
       
 11054 
       
 11055 /****
       
 11056  *LWORD_TO_BOOL
       
 11057  */
       
 11058     case function_lword_to_bool :
       
 11059     {
       
 11060         symbol_c *last_type_symbol = NULL;
       
 11061 
       
 11062         {
       
 11063             identifier_c param_name("IN");
       
 11064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11066             
       
 11067             /* Get the value from a foo(<param_value>) style call */
       
 11068             if (IN_param_value == NULL)
       
 11069               IN_param_value = function_call_param_iterator.next();
       
 11070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11072             
       
 11073             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11074             {
       
 11075         
       
 11076                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11077                 return return_type_symbol;
       
 11078                 
       
 11079             }
       
 11080             
       
 11081             ERROR;
       
 11082         }
       
 11083         
       
 11084     }/*function_lword_to_bool*/
       
 11085     break;
       
 11086 
       
 11087 /****
       
 11088  *LWORD_TO_SINT
       
 11089  */
       
 11090     case function_lword_to_sint :
       
 11091     {
       
 11092         symbol_c *last_type_symbol = NULL;
       
 11093 
       
 11094         {
       
 11095             identifier_c param_name("IN");
       
 11096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11098             
       
 11099             /* Get the value from a foo(<param_value>) style call */
       
 11100             if (IN_param_value == NULL)
       
 11101               IN_param_value = function_call_param_iterator.next();
       
 11102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11104             
       
 11105             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11106             {
       
 11107         
       
 11108                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11109                 return return_type_symbol;
       
 11110                 
       
 11111             }
       
 11112             
       
 11113             ERROR;
       
 11114         }
       
 11115         
       
 11116     }/*function_lword_to_sint*/
       
 11117     break;
       
 11118 
       
 11119 /****
       
 11120  *LWORD_TO_INT
       
 11121  */
       
 11122     case function_lword_to_int :
       
 11123     {
       
 11124         symbol_c *last_type_symbol = NULL;
       
 11125 
       
 11126         {
       
 11127             identifier_c param_name("IN");
       
 11128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11130             
       
 11131             /* Get the value from a foo(<param_value>) style call */
       
 11132             if (IN_param_value == NULL)
       
 11133               IN_param_value = function_call_param_iterator.next();
       
 11134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11136             
       
 11137             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11138             {
       
 11139         
       
 11140                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11141                 return return_type_symbol;
       
 11142                 
       
 11143             }
       
 11144             
       
 11145             ERROR;
       
 11146         }
       
 11147         
       
 11148     }/*function_lword_to_int*/
       
 11149     break;
       
 11150 
       
 11151 /****
       
 11152  *LWORD_TO_DINT
       
 11153  */
       
 11154     case function_lword_to_dint :
       
 11155     {
       
 11156         symbol_c *last_type_symbol = NULL;
       
 11157 
       
 11158         {
       
 11159             identifier_c param_name("IN");
       
 11160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11162             
       
 11163             /* Get the value from a foo(<param_value>) style call */
       
 11164             if (IN_param_value == NULL)
       
 11165               IN_param_value = function_call_param_iterator.next();
       
 11166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11168             
       
 11169             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11170             {
       
 11171         
       
 11172                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11173                 return return_type_symbol;
       
 11174                 
       
 11175             }
       
 11176             
       
 11177             ERROR;
       
 11178         }
       
 11179         
       
 11180     }/*function_lword_to_dint*/
       
 11181     break;
       
 11182 
       
 11183 /****
       
 11184  *LWORD_TO_LINT
       
 11185  */
       
 11186     case function_lword_to_lint :
       
 11187     {
       
 11188         symbol_c *last_type_symbol = NULL;
       
 11189 
       
 11190         {
       
 11191             identifier_c param_name("IN");
       
 11192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11194             
       
 11195             /* Get the value from a foo(<param_value>) style call */
       
 11196             if (IN_param_value == NULL)
       
 11197               IN_param_value = function_call_param_iterator.next();
       
 11198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11200             
       
 11201             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11202             {
       
 11203         
       
 11204                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11205                 return return_type_symbol;
       
 11206                 
       
 11207             }
       
 11208             
       
 11209             ERROR;
       
 11210         }
       
 11211         
       
 11212     }/*function_lword_to_lint*/
       
 11213     break;
       
 11214 
       
 11215 /****
       
 11216  *LWORD_TO_USINT
       
 11217  */
       
 11218     case function_lword_to_usint :
       
 11219     {
       
 11220         symbol_c *last_type_symbol = NULL;
       
 11221 
       
 11222         {
       
 11223             identifier_c param_name("IN");
       
 11224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11226             
       
 11227             /* Get the value from a foo(<param_value>) style call */
       
 11228             if (IN_param_value == NULL)
       
 11229               IN_param_value = function_call_param_iterator.next();
       
 11230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11232             
       
 11233             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11234             {
       
 11235         
       
 11236                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11237                 return return_type_symbol;
       
 11238                 
       
 11239             }
       
 11240             
       
 11241             ERROR;
       
 11242         }
       
 11243         
       
 11244     }/*function_lword_to_usint*/
       
 11245     break;
       
 11246 
       
 11247 /****
       
 11248  *LWORD_TO_UINT
       
 11249  */
       
 11250     case function_lword_to_uint :
       
 11251     {
       
 11252         symbol_c *last_type_symbol = NULL;
       
 11253 
       
 11254         {
       
 11255             identifier_c param_name("IN");
       
 11256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11258             
       
 11259             /* Get the value from a foo(<param_value>) style call */
       
 11260             if (IN_param_value == NULL)
       
 11261               IN_param_value = function_call_param_iterator.next();
       
 11262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11264             
       
 11265             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11266             {
       
 11267         
       
 11268                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11269                 return return_type_symbol;
       
 11270                 
       
 11271             }
       
 11272             
       
 11273             ERROR;
       
 11274         }
       
 11275         
       
 11276     }/*function_lword_to_uint*/
       
 11277     break;
       
 11278 
       
 11279 /****
       
 11280  *LWORD_TO_UDINT
       
 11281  */
       
 11282     case function_lword_to_udint :
       
 11283     {
       
 11284         symbol_c *last_type_symbol = NULL;
       
 11285 
       
 11286         {
       
 11287             identifier_c param_name("IN");
       
 11288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11290             
       
 11291             /* Get the value from a foo(<param_value>) style call */
       
 11292             if (IN_param_value == NULL)
       
 11293               IN_param_value = function_call_param_iterator.next();
       
 11294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11296             
       
 11297             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11298             {
       
 11299         
       
 11300                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11301                 return return_type_symbol;
       
 11302                 
       
 11303             }
       
 11304             
       
 11305             ERROR;
       
 11306         }
       
 11307         
       
 11308     }/*function_lword_to_udint*/
       
 11309     break;
       
 11310 
       
 11311 /****
       
 11312  *LWORD_TO_ULINT
       
 11313  */
       
 11314     case function_lword_to_ulint :
       
 11315     {
       
 11316         symbol_c *last_type_symbol = NULL;
       
 11317 
       
 11318         {
       
 11319             identifier_c param_name("IN");
       
 11320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11322             
       
 11323             /* Get the value from a foo(<param_value>) style call */
       
 11324             if (IN_param_value == NULL)
       
 11325               IN_param_value = function_call_param_iterator.next();
       
 11326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11328             
       
 11329             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11330             {
       
 11331         
       
 11332                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11333                 return return_type_symbol;
       
 11334                 
       
 11335             }
       
 11336             
       
 11337             ERROR;
       
 11338         }
       
 11339         
       
 11340     }/*function_lword_to_ulint*/
       
 11341     break;
       
 11342 
       
 11343 /****
       
 11344  *LWORD_TO_REAL
       
 11345  */
       
 11346     case function_lword_to_real :
       
 11347     {
       
 11348         symbol_c *last_type_symbol = NULL;
       
 11349 
       
 11350         {
       
 11351             identifier_c param_name("IN");
       
 11352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11354             
       
 11355             /* Get the value from a foo(<param_value>) style call */
       
 11356             if (IN_param_value == NULL)
       
 11357               IN_param_value = function_call_param_iterator.next();
       
 11358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11360             
       
 11361             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11362             {
       
 11363         
       
 11364                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11365                 return return_type_symbol;
       
 11366                 
       
 11367             }
       
 11368             
       
 11369             ERROR;
       
 11370         }
       
 11371         
       
 11372     }/*function_lword_to_real*/
       
 11373     break;
       
 11374 
       
 11375 /****
       
 11376  *LWORD_TO_LREAL
       
 11377  */
       
 11378     case function_lword_to_lreal :
       
 11379     {
       
 11380         symbol_c *last_type_symbol = NULL;
       
 11381 
       
 11382         {
       
 11383             identifier_c param_name("IN");
       
 11384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11386             
       
 11387             /* Get the value from a foo(<param_value>) style call */
       
 11388             if (IN_param_value == NULL)
       
 11389               IN_param_value = function_call_param_iterator.next();
       
 11390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11392             
       
 11393             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11394             {
       
 11395         
       
 11396                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11397                 return return_type_symbol;
       
 11398                 
       
 11399             }
       
 11400             
       
 11401             ERROR;
       
 11402         }
       
 11403         
       
 11404     }/*function_lword_to_lreal*/
       
 11405     break;
       
 11406 
       
 11407 /****
       
 11408  *LWORD_TO_TIME
       
 11409  */
       
 11410     case function_lword_to_time :
       
 11411     {
       
 11412         symbol_c *last_type_symbol = NULL;
       
 11413 
       
 11414         {
       
 11415             identifier_c param_name("IN");
       
 11416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11418             
       
 11419             /* Get the value from a foo(<param_value>) style call */
       
 11420             if (IN_param_value == NULL)
       
 11421               IN_param_value = function_call_param_iterator.next();
       
 11422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11424             
       
 11425             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11426             {
       
 11427         
       
 11428                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11429                 return return_type_symbol;
       
 11430                 
       
 11431             }
       
 11432             
       
 11433             ERROR;
       
 11434         }
       
 11435         
       
 11436     }/*function_lword_to_time*/
       
 11437     break;
       
 11438 
       
 11439 /****
       
 11440  *LWORD_TO_DATE
       
 11441  */
       
 11442     case function_lword_to_date :
       
 11443     {
       
 11444         symbol_c *last_type_symbol = NULL;
       
 11445 
       
 11446         {
       
 11447             identifier_c param_name("IN");
       
 11448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11450             
       
 11451             /* Get the value from a foo(<param_value>) style call */
       
 11452             if (IN_param_value == NULL)
       
 11453               IN_param_value = function_call_param_iterator.next();
       
 11454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11456             
       
 11457             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11458             {
       
 11459         
       
 11460                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11461                 return return_type_symbol;
       
 11462                 
       
 11463             }
       
 11464             
       
 11465             ERROR;
       
 11466         }
       
 11467         
       
 11468     }/*function_lword_to_date*/
       
 11469     break;
       
 11470 
       
 11471 /****
       
 11472  *LWORD_TO_TOD
       
 11473  */
       
 11474     case function_lword_to_tod :
       
 11475     {
       
 11476         symbol_c *last_type_symbol = NULL;
       
 11477 
       
 11478         {
       
 11479             identifier_c param_name("IN");
       
 11480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11482             
       
 11483             /* Get the value from a foo(<param_value>) style call */
       
 11484             if (IN_param_value == NULL)
       
 11485               IN_param_value = function_call_param_iterator.next();
       
 11486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11488             
       
 11489             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11490             {
       
 11491         
       
 11492                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11493                 return return_type_symbol;
       
 11494                 
       
 11495             }
       
 11496             
       
 11497             ERROR;
       
 11498         }
       
 11499         
       
 11500     }/*function_lword_to_tod*/
       
 11501     break;
       
 11502 
       
 11503 /****
       
 11504  *LWORD_TO_DT
       
 11505  */
       
 11506     case function_lword_to_dt :
       
 11507     {
       
 11508         symbol_c *last_type_symbol = NULL;
       
 11509 
       
 11510         {
       
 11511             identifier_c param_name("IN");
       
 11512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11514             
       
 11515             /* Get the value from a foo(<param_value>) style call */
       
 11516             if (IN_param_value == NULL)
       
 11517               IN_param_value = function_call_param_iterator.next();
       
 11518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11520             
       
 11521             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11522             {
       
 11523         
       
 11524                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11525                 return return_type_symbol;
       
 11526                 
       
 11527             }
       
 11528             
       
 11529             ERROR;
       
 11530         }
       
 11531         
       
 11532     }/*function_lword_to_dt*/
       
 11533     break;
       
 11534 
       
 11535 /****
       
 11536  *LWORD_TO_STRING
       
 11537  */
       
 11538     case function_lword_to_string :
       
 11539     {
       
 11540         symbol_c *last_type_symbol = NULL;
       
 11541 
       
 11542         {
       
 11543             identifier_c param_name("IN");
       
 11544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11546             
       
 11547             /* Get the value from a foo(<param_value>) style call */
       
 11548             if (IN_param_value == NULL)
       
 11549               IN_param_value = function_call_param_iterator.next();
       
 11550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11552             
       
 11553             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11554             {
       
 11555         
       
 11556                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11557                 return return_type_symbol;
       
 11558                 
       
 11559             }
       
 11560             
       
 11561             ERROR;
       
 11562         }
       
 11563         
       
 11564     }/*function_lword_to_string*/
       
 11565     break;
       
 11566 
       
 11567 /****
       
 11568  *LWORD_TO_BYTE
       
 11569  */
       
 11570     case function_lword_to_byte :
       
 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::lword_type_name, last_type_symbol))
       
 11586             {
       
 11587         
       
 11588                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11589                 return return_type_symbol;
       
 11590                 
       
 11591             }
       
 11592             
       
 11593             ERROR;
       
 11594         }
       
 11595         
       
 11596     }/*function_lword_to_byte*/
       
 11597     break;
       
 11598 
       
 11599 /****
       
 11600  *LWORD_TO_WORD
       
 11601  */
       
 11602     case function_lword_to_word :
       
 11603     {
       
 11604         symbol_c *last_type_symbol = NULL;
       
 11605 
       
 11606         {
       
 11607             identifier_c param_name("IN");
       
 11608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11610             
       
 11611             /* Get the value from a foo(<param_value>) style call */
       
 11612             if (IN_param_value == NULL)
       
 11613               IN_param_value = function_call_param_iterator.next();
       
 11614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11616             
       
 11617             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 11618             {
       
 11619         
       
 11620                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11621                 return return_type_symbol;
       
 11622                 
       
 11623             }
       
 11624             
       
 11625             ERROR;
       
 11626         }
       
 11627         
       
 11628     }/*function_lword_to_word*/
       
 11629     break;
       
 11630 
       
 11631 /****
       
 11632  *LWORD_TO_DWORD
       
 11633  */
       
 11634     case function_lword_to_dword :
       
 11635     {
       
 11636         symbol_c *last_type_symbol = NULL;
       
 11637 
       
 11638         {
       
 11639             identifier_c param_name("IN");
       
 11640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11642             
       
 11643             /* Get the value from a foo(<param_value>) style call */
       
 11644             if (IN_param_value == NULL)
       
 11645               IN_param_value = function_call_param_iterator.next();
       
 11646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11648             
       
 11649             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  7170             {
 11650             {
  7171         
 11651         
  7172                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 11652                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
  7173                 return return_type_symbol;
 11653                 return return_type_symbol;
  7174                 
 11654                 
  7175             }
 11655             }
  7176             
 11656             
  7177             ERROR;
 11657             ERROR;
  7178         }
 11658         }
  7179         
 11659         
  7180     }/*function_time_to_dword*/
 11660     }/*function_lword_to_dword*/
  7181     break;
 11661     break;
  7182 
 11662 
  7183 /****
 11663 /****
  7184  *TIME_TO_LWORD
 11664  *TRUNC
  7185  */
 11665  */
  7186     case function_time_to_lword :
 11666     case function_trunc :
  7187     {
 11667     {
  7188         symbol_c *last_type_symbol = NULL;
 11668         symbol_c *last_type_symbol = NULL;
  7189 
 11669 
  7190         {
 11670         {
  7191             identifier_c param_name("IN");
 11671             identifier_c param_name("IN");
  7192             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11672             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7194             
 11674             
  7195             /* Get the value from a foo(<param_value>) style call */
 11675             /* Get the value from a foo(<param_value>) style call */
  7196             if (IN_param_value == NULL)
 11676             if (IN_param_value == NULL)
  7197               IN_param_value = function_call_param_iterator.next();
 11677               IN_param_value = function_call_param_iterator.next();
  7198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7200             
 11680             
  7201             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 11681             if(search_expression_type->is_real_type(IN_type_symbol))
  7202             {
 11682             {
  7203         
 11683         
  7204                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 11684                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
  7205                 return return_type_symbol;
 11685                 return return_type_symbol;
  7206                 
 11686                 
  7207             }
 11687             }
  7208             
 11688             
  7209             ERROR;
 11689             ERROR;
  7210         }
 11690         }
  7211         
 11691         
  7212     }/*function_time_to_lword*/
 11692     }/*function_trunc*/
  7213     break;
 11693     break;
  7214 
 11694 
  7215 /****
 11695 /****
  7216  *DATE_TO_BOOL
 11696  *BCD_TO_USINT
  7217  */
 11697  */
  7218     case function_date_to_bool :
 11698     case function_bcd_to_usint :
  7219     {
 11699     {
  7220         symbol_c *last_type_symbol = NULL;
 11700         symbol_c *last_type_symbol = NULL;
  7221 
 11701 
  7222         {
 11702         {
  7223             identifier_c param_name("IN");
 11703             identifier_c param_name("IN");
  7224             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11704             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7226             
 11706             
  7227             /* Get the value from a foo(<param_value>) style call */
 11707             /* Get the value from a foo(<param_value>) style call */
  7228             if (IN_param_value == NULL)
 11708             if (IN_param_value == NULL)
  7229               IN_param_value = function_call_param_iterator.next();
 11709               IN_param_value = function_call_param_iterator.next();
  7230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7232             
 11712             
  7233             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 11713             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
  7234             {
       
  7235         
       
  7236                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7237                 return return_type_symbol;
       
  7238                 
       
  7239             }
       
  7240             
       
  7241             ERROR;
       
  7242         }
       
  7243         
       
  7244     }/*function_date_to_bool*/
       
  7245     break;
       
  7246 
       
  7247 /****
       
  7248  *DATE_TO_SINT
       
  7249  */
       
  7250     case function_date_to_sint :
       
  7251     {
       
  7252         symbol_c *last_type_symbol = NULL;
       
  7253 
       
  7254         {
       
  7255             identifier_c param_name("IN");
       
  7256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7258             
       
  7259             /* Get the value from a foo(<param_value>) style call */
       
  7260             if (IN_param_value == NULL)
       
  7261               IN_param_value = function_call_param_iterator.next();
       
  7262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7264             
       
  7265             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  7266             {
       
  7267         
       
  7268                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7269                 return return_type_symbol;
       
  7270                 
       
  7271             }
       
  7272             
       
  7273             ERROR;
       
  7274         }
       
  7275         
       
  7276     }/*function_date_to_sint*/
       
  7277     break;
       
  7278 
       
  7279 /****
       
  7280  *DATE_TO_INT
       
  7281  */
       
  7282     case function_date_to_int :
       
  7283     {
       
  7284         symbol_c *last_type_symbol = NULL;
       
  7285 
       
  7286         {
       
  7287             identifier_c param_name("IN");
       
  7288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7290             
       
  7291             /* Get the value from a foo(<param_value>) style call */
       
  7292             if (IN_param_value == NULL)
       
  7293               IN_param_value = function_call_param_iterator.next();
       
  7294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7296             
       
  7297             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  7298             {
       
  7299         
       
  7300                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7301                 return return_type_symbol;
       
  7302                 
       
  7303             }
       
  7304             
       
  7305             ERROR;
       
  7306         }
       
  7307         
       
  7308     }/*function_date_to_int*/
       
  7309     break;
       
  7310 
       
  7311 /****
       
  7312  *DATE_TO_DINT
       
  7313  */
       
  7314     case function_date_to_dint :
       
  7315     {
       
  7316         symbol_c *last_type_symbol = NULL;
       
  7317 
       
  7318         {
       
  7319             identifier_c param_name("IN");
       
  7320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7322             
       
  7323             /* Get the value from a foo(<param_value>) style call */
       
  7324             if (IN_param_value == NULL)
       
  7325               IN_param_value = function_call_param_iterator.next();
       
  7326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7328             
       
  7329             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  7330             {
       
  7331         
       
  7332                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7333                 return return_type_symbol;
       
  7334                 
       
  7335             }
       
  7336             
       
  7337             ERROR;
       
  7338         }
       
  7339         
       
  7340     }/*function_date_to_dint*/
       
  7341     break;
       
  7342 
       
  7343 /****
       
  7344  *DATE_TO_LINT
       
  7345  */
       
  7346     case function_date_to_lint :
       
  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 (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  7362             {
       
  7363         
       
  7364                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7365                 return return_type_symbol;
       
  7366                 
       
  7367             }
       
  7368             
       
  7369             ERROR;
       
  7370         }
       
  7371         
       
  7372     }/*function_date_to_lint*/
       
  7373     break;
       
  7374 
       
  7375 /****
       
  7376  *DATE_TO_USINT
       
  7377  */
       
  7378     case function_date_to_usint :
       
  7379     {
       
  7380         symbol_c *last_type_symbol = NULL;
       
  7381 
       
  7382         {
       
  7383             identifier_c param_name("IN");
       
  7384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7386             
       
  7387             /* Get the value from a foo(<param_value>) style call */
       
  7388             if (IN_param_value == NULL)
       
  7389               IN_param_value = function_call_param_iterator.next();
       
  7390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7392             
       
  7393             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  7394             {
 11714             {
  7395         
 11715         
  7396                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 11716                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
  7397                 return return_type_symbol;
 11717                 return return_type_symbol;
  7398                 
 11718                 
  7399             }
 11719             }
  7400             
 11720             
  7401             ERROR;
 11721             ERROR;
  7402         }
 11722         }
  7403         
 11723         
  7404     }/*function_date_to_usint*/
 11724     }/*function_bcd_to_usint*/
  7405     break;
 11725     break;
  7406 
 11726 
  7407 /****
 11727 /****
  7408  *DATE_TO_UINT
 11728  *BCD_TO_UINT
  7409  */
 11729  */
  7410     case function_date_to_uint :
 11730     case function_bcd_to_uint :
  7411     {
 11731     {
  7412         symbol_c *last_type_symbol = NULL;
 11732         symbol_c *last_type_symbol = NULL;
  7413 
 11733 
  7414         {
 11734         {
  7415             identifier_c param_name("IN");
 11735             identifier_c param_name("IN");
  7416             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11736             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7418             
 11738             
  7419             /* Get the value from a foo(<param_value>) style call */
 11739             /* Get the value from a foo(<param_value>) style call */
  7420             if (IN_param_value == NULL)
 11740             if (IN_param_value == NULL)
  7421               IN_param_value = function_call_param_iterator.next();
 11741               IN_param_value = function_call_param_iterator.next();
  7422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7424             
 11744             
  7425             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 11745             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
  7426             {
 11746             {
  7427         
 11747         
  7428                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 11748                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
  7429                 return return_type_symbol;
 11749                 return return_type_symbol;
  7430                 
 11750                 
  7431             }
 11751             }
  7432             
 11752             
  7433             ERROR;
 11753             ERROR;
  7434         }
 11754         }
  7435         
 11755         
  7436     }/*function_date_to_uint*/
 11756     }/*function_bcd_to_uint*/
  7437     break;
 11757     break;
  7438 
 11758 
  7439 /****
 11759 /****
  7440  *DATE_TO_UDINT
 11760  *BCD_TO_UDINT
  7441  */
 11761  */
  7442     case function_date_to_udint :
 11762     case function_bcd_to_udint :
  7443     {
 11763     {
  7444         symbol_c *last_type_symbol = NULL;
 11764         symbol_c *last_type_symbol = NULL;
  7445 
 11765 
  7446         {
 11766         {
  7447             identifier_c param_name("IN");
 11767             identifier_c param_name("IN");
  7448             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11768             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7450             
 11770             
  7451             /* Get the value from a foo(<param_value>) style call */
 11771             /* Get the value from a foo(<param_value>) style call */
  7452             if (IN_param_value == NULL)
 11772             if (IN_param_value == NULL)
  7453               IN_param_value = function_call_param_iterator.next();
 11773               IN_param_value = function_call_param_iterator.next();
  7454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7456             
 11776             
  7457             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 11777             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
  7458             {
 11778             {
  7459         
 11779         
  7460                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 11780                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
  7461                 return return_type_symbol;
 11781                 return return_type_symbol;
  7462                 
 11782                 
  7463             }
 11783             }
  7464             
 11784             
  7465             ERROR;
 11785             ERROR;
  7466         }
 11786         }
  7467         
 11787         
  7468     }/*function_date_to_udint*/
 11788     }/*function_bcd_to_udint*/
  7469     break;
 11789     break;
  7470 
 11790 
  7471 /****
 11791 /****
  7472  *DATE_TO_ULINT
 11792  *BCD_TO_ULINT
  7473  */
 11793  */
  7474     case function_date_to_ulint :
 11794     case function_bcd_to_ulint :
  7475     {
 11795     {
  7476         symbol_c *last_type_symbol = NULL;
 11796         symbol_c *last_type_symbol = NULL;
  7477 
 11797 
  7478         {
 11798         {
  7479             identifier_c param_name("IN");
 11799             identifier_c param_name("IN");
  7480             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11800             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7482             
 11802             
  7483             /* Get the value from a foo(<param_value>) style call */
 11803             /* Get the value from a foo(<param_value>) style call */
  7484             if (IN_param_value == NULL)
 11804             if (IN_param_value == NULL)
  7485               IN_param_value = function_call_param_iterator.next();
 11805               IN_param_value = function_call_param_iterator.next();
  7486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7488             
 11808             
  7489             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 11809             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
  7490             {
 11810             {
  7491         
 11811         
  7492                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 11812                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
  7493                 return return_type_symbol;
 11813                 return return_type_symbol;
  7494                 
 11814                 
  7495             }
 11815             }
  7496             
 11816             
  7497             ERROR;
 11817             ERROR;
  7498         }
 11818         }
  7499         
 11819         
  7500     }/*function_date_to_ulint*/
 11820     }/*function_bcd_to_ulint*/
  7501     break;
 11821     break;
  7502 
 11822 
  7503 /****
 11823 /****
  7504  *DATE_TO_REAL
 11824  *USINT_TO_BCD
  7505  */
 11825  */
  7506     case function_date_to_real :
 11826     case function_usint_to_bcd :
  7507     {
 11827     {
  7508         symbol_c *last_type_symbol = NULL;
 11828         symbol_c *last_type_symbol = NULL;
  7509 
 11829 
  7510         {
 11830         {
  7511             identifier_c param_name("IN");
 11831             identifier_c param_name("IN");
  7512             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11832             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7514             
 11834             
  7515             /* Get the value from a foo(<param_value>) style call */
 11835             /* Get the value from a foo(<param_value>) style call */
  7516             if (IN_param_value == NULL)
 11836             if (IN_param_value == NULL)
  7517               IN_param_value = function_call_param_iterator.next();
 11837               IN_param_value = function_call_param_iterator.next();
  7518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7520             
 11840             
  7521             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 11841             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
  7522             {
 11842             {
  7523         
 11843         
  7524                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 11844                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
  7525                 return return_type_symbol;
 11845                 return return_type_symbol;
  7526                 
 11846                 
  7527             }
 11847             }
  7528             
 11848             
  7529             ERROR;
 11849             ERROR;
  7530         }
 11850         }
  7531         
 11851         
  7532     }/*function_date_to_real*/
 11852     }/*function_usint_to_bcd*/
  7533     break;
 11853     break;
  7534 
 11854 
  7535 /****
 11855 /****
  7536  *DATE_TO_LREAL
 11856  *UINT_TO_BCD
  7537  */
 11857  */
  7538     case function_date_to_lreal :
 11858     case function_uint_to_bcd :
  7539     {
 11859     {
  7540         symbol_c *last_type_symbol = NULL;
 11860         symbol_c *last_type_symbol = NULL;
  7541 
 11861 
  7542         {
 11862         {
  7543             identifier_c param_name("IN");
 11863             identifier_c param_name("IN");
  7544             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11864             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7546             
 11866             
  7547             /* Get the value from a foo(<param_value>) style call */
 11867             /* Get the value from a foo(<param_value>) style call */
  7548             if (IN_param_value == NULL)
 11868             if (IN_param_value == NULL)
  7549               IN_param_value = function_call_param_iterator.next();
 11869               IN_param_value = function_call_param_iterator.next();
  7550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7552             
 11872             
  7553             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 11873             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
  7554             {
 11874             {
  7555         
 11875         
  7556                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 11876                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
  7557                 return return_type_symbol;
 11877                 return return_type_symbol;
  7558                 
 11878                 
  7559             }
 11879             }
  7560             
 11880             
  7561             ERROR;
 11881             ERROR;
  7562         }
 11882         }
  7563         
 11883         
  7564     }/*function_date_to_lreal*/
 11884     }/*function_uint_to_bcd*/
  7565     break;
 11885     break;
  7566 
 11886 
  7567 /****
 11887 /****
  7568  *DATE_TO_STRING
 11888  *UDINT_TO_BCD
  7569  */
 11889  */
  7570     case function_date_to_string :
 11890     case function_udint_to_bcd :
  7571     {
 11891     {
  7572         symbol_c *last_type_symbol = NULL;
 11892         symbol_c *last_type_symbol = NULL;
  7573 
 11893 
  7574         {
 11894         {
  7575             identifier_c param_name("IN");
 11895             identifier_c param_name("IN");
  7576             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11896             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7577             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7578             
 11898             
  7579             /* Get the value from a foo(<param_value>) style call */
 11899             /* Get the value from a foo(<param_value>) style call */
  7580             if (IN_param_value == NULL)
 11900             if (IN_param_value == NULL)
  7581               IN_param_value = function_call_param_iterator.next();
 11901               IN_param_value = function_call_param_iterator.next();
  7582             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7583             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7584             
 11904             
  7585             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 11905             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
  7586             {
 11906             {
  7587         
 11907         
  7588                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 11908                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
  7589                 return return_type_symbol;
 11909                 return return_type_symbol;
  7590                 
 11910                 
  7591             }
 11911             }
  7592             
 11912             
  7593             ERROR;
 11913             ERROR;
  7594         }
 11914         }
  7595         
 11915         
  7596     }/*function_date_to_string*/
 11916     }/*function_udint_to_bcd*/
  7597     break;
 11917     break;
  7598 
 11918 
  7599 /****
 11919 /****
  7600  *DATE_TO_BYTE
 11920  *ULINT_TO_BCD
  7601  */
 11921  */
  7602     case function_date_to_byte :
 11922     case function_ulint_to_bcd :
  7603     {
 11923     {
  7604         symbol_c *last_type_symbol = NULL;
 11924         symbol_c *last_type_symbol = NULL;
  7605 
 11925 
  7606         {
 11926         {
  7607             identifier_c param_name("IN");
 11927             identifier_c param_name("IN");
  7608             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11928             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7610             
 11930             
  7611             /* Get the value from a foo(<param_value>) style call */
 11931             /* Get the value from a foo(<param_value>) style call */
  7612             if (IN_param_value == NULL)
 11932             if (IN_param_value == NULL)
  7613               IN_param_value = function_call_param_iterator.next();
 11933               IN_param_value = function_call_param_iterator.next();
  7614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7616             
 11936             
  7617             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 11937             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
  7618             {
 11938             {
  7619         
 11939         
  7620                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 11940                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
  7621                 return return_type_symbol;
 11941                 return return_type_symbol;
  7622                 
 11942                 
  7623             }
 11943             }
  7624             
 11944             
  7625             ERROR;
 11945             ERROR;
  7626         }
 11946         }
  7627         
 11947         
  7628     }/*function_date_to_byte*/
 11948     }/*function_ulint_to_bcd*/
  7629     break;
 11949     break;
  7630 
 11950 
  7631 /****
 11951 /****
  7632  *DATE_TO_WORD
 11952  *DATE_AND_TIME_TO_TIME_OF_DAY
  7633  */
 11953  */
  7634     case function_date_to_word :
 11954     case function_date_and_time_to_time_of_day :
  7635     {
 11955     {
  7636         symbol_c *last_type_symbol = NULL;
 11956         symbol_c *last_type_symbol = NULL;
  7637 
 11957 
  7638         {
 11958         {
  7639             identifier_c param_name("IN");
 11959             identifier_c param_name("IN");
  7640             /* Get the value from a foo(<param_name> = <param_value>) style call */
 11960             /* Get the value from a foo(<param_name> = <param_value>) style call */
  7641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
 11961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
  7642             
 11962             
  7643             /* Get the value from a foo(<param_value>) style call */
 11963             /* Get the value from a foo(<param_value>) style call */
  7644             if (IN_param_value == NULL)
 11964             if (IN_param_value == NULL)
  7645               IN_param_value = function_call_param_iterator.next();
 11965               IN_param_value = function_call_param_iterator.next();
  7646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
  7647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
  7648             
 11968             
  7649             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 11969             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
  7650             {
       
  7651         
       
  7652                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  7653                 return return_type_symbol;
       
  7654                 
       
  7655             }
       
  7656             
       
  7657             ERROR;
       
  7658         }
       
  7659         
       
  7660     }/*function_date_to_word*/
       
  7661     break;
       
  7662 
       
  7663 /****
       
  7664  *DATE_TO_DWORD
       
  7665  */
       
  7666     case function_date_to_dword :
       
  7667     {
       
  7668         symbol_c *last_type_symbol = NULL;
       
  7669 
       
  7670         {
       
  7671             identifier_c param_name("IN");
       
  7672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7674             
       
  7675             /* Get the value from a foo(<param_value>) style call */
       
  7676             if (IN_param_value == NULL)
       
  7677               IN_param_value = function_call_param_iterator.next();
       
  7678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7680             
       
  7681             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  7682             {
       
  7683         
       
  7684                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  7685                 return return_type_symbol;
       
  7686                 
       
  7687             }
       
  7688             
       
  7689             ERROR;
       
  7690         }
       
  7691         
       
  7692     }/*function_date_to_dword*/
       
  7693     break;
       
  7694 
       
  7695 /****
       
  7696  *DATE_TO_LWORD
       
  7697  */
       
  7698     case function_date_to_lword :
       
  7699     {
       
  7700         symbol_c *last_type_symbol = NULL;
       
  7701 
       
  7702         {
       
  7703             identifier_c param_name("IN");
       
  7704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7706             
       
  7707             /* Get the value from a foo(<param_value>) style call */
       
  7708             if (IN_param_value == NULL)
       
  7709               IN_param_value = function_call_param_iterator.next();
       
  7710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7712             
       
  7713             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
  7714             {
       
  7715         
       
  7716                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  7717                 return return_type_symbol;
       
  7718                 
       
  7719             }
       
  7720             
       
  7721             ERROR;
       
  7722         }
       
  7723         
       
  7724     }/*function_date_to_lword*/
       
  7725     break;
       
  7726 
       
  7727 /****
       
  7728  *TOD_TO_BOOL
       
  7729  */
       
  7730     case function_tod_to_bool :
       
  7731     {
       
  7732         symbol_c *last_type_symbol = NULL;
       
  7733 
       
  7734         {
       
  7735             identifier_c param_name("IN");
       
  7736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7738             
       
  7739             /* Get the value from a foo(<param_value>) style call */
       
  7740             if (IN_param_value == NULL)
       
  7741               IN_param_value = function_call_param_iterator.next();
       
  7742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7744             
       
  7745             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  7746             {
       
  7747         
       
  7748                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  7749                 return return_type_symbol;
       
  7750                 
       
  7751             }
       
  7752             
       
  7753             ERROR;
       
  7754         }
       
  7755         
       
  7756     }/*function_tod_to_bool*/
       
  7757     break;
       
  7758 
       
  7759 /****
       
  7760  *TOD_TO_SINT
       
  7761  */
       
  7762     case function_tod_to_sint :
       
  7763     {
       
  7764         symbol_c *last_type_symbol = NULL;
       
  7765 
       
  7766         {
       
  7767             identifier_c param_name("IN");
       
  7768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7770             
       
  7771             /* Get the value from a foo(<param_value>) style call */
       
  7772             if (IN_param_value == NULL)
       
  7773               IN_param_value = function_call_param_iterator.next();
       
  7774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7776             
       
  7777             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  7778             {
       
  7779         
       
  7780                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  7781                 return return_type_symbol;
       
  7782                 
       
  7783             }
       
  7784             
       
  7785             ERROR;
       
  7786         }
       
  7787         
       
  7788     }/*function_tod_to_sint*/
       
  7789     break;
       
  7790 
       
  7791 /****
       
  7792  *TOD_TO_INT
       
  7793  */
       
  7794     case function_tod_to_int :
       
  7795     {
       
  7796         symbol_c *last_type_symbol = NULL;
       
  7797 
       
  7798         {
       
  7799             identifier_c param_name("IN");
       
  7800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7802             
       
  7803             /* Get the value from a foo(<param_value>) style call */
       
  7804             if (IN_param_value == NULL)
       
  7805               IN_param_value = function_call_param_iterator.next();
       
  7806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7808             
       
  7809             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  7810             {
       
  7811         
       
  7812                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  7813                 return return_type_symbol;
       
  7814                 
       
  7815             }
       
  7816             
       
  7817             ERROR;
       
  7818         }
       
  7819         
       
  7820     }/*function_tod_to_int*/
       
  7821     break;
       
  7822 
       
  7823 /****
       
  7824  *TOD_TO_DINT
       
  7825  */
       
  7826     case function_tod_to_dint :
       
  7827     {
       
  7828         symbol_c *last_type_symbol = NULL;
       
  7829 
       
  7830         {
       
  7831             identifier_c param_name("IN");
       
  7832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7834             
       
  7835             /* Get the value from a foo(<param_value>) style call */
       
  7836             if (IN_param_value == NULL)
       
  7837               IN_param_value = function_call_param_iterator.next();
       
  7838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7840             
       
  7841             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  7842             {
       
  7843         
       
  7844                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  7845                 return return_type_symbol;
       
  7846                 
       
  7847             }
       
  7848             
       
  7849             ERROR;
       
  7850         }
       
  7851         
       
  7852     }/*function_tod_to_dint*/
       
  7853     break;
       
  7854 
       
  7855 /****
       
  7856  *TOD_TO_LINT
       
  7857  */
       
  7858     case function_tod_to_lint :
       
  7859     {
       
  7860         symbol_c *last_type_symbol = NULL;
       
  7861 
       
  7862         {
       
  7863             identifier_c param_name("IN");
       
  7864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7866             
       
  7867             /* Get the value from a foo(<param_value>) style call */
       
  7868             if (IN_param_value == NULL)
       
  7869               IN_param_value = function_call_param_iterator.next();
       
  7870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7872             
       
  7873             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  7874             {
       
  7875         
       
  7876                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  7877                 return return_type_symbol;
       
  7878                 
       
  7879             }
       
  7880             
       
  7881             ERROR;
       
  7882         }
       
  7883         
       
  7884     }/*function_tod_to_lint*/
       
  7885     break;
       
  7886 
       
  7887 /****
       
  7888  *TOD_TO_USINT
       
  7889  */
       
  7890     case function_tod_to_usint :
       
  7891     {
       
  7892         symbol_c *last_type_symbol = NULL;
       
  7893 
       
  7894         {
       
  7895             identifier_c param_name("IN");
       
  7896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7898             
       
  7899             /* Get the value from a foo(<param_value>) style call */
       
  7900             if (IN_param_value == NULL)
       
  7901               IN_param_value = function_call_param_iterator.next();
       
  7902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7904             
       
  7905             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  7906             {
       
  7907         
       
  7908                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  7909                 return return_type_symbol;
       
  7910                 
       
  7911             }
       
  7912             
       
  7913             ERROR;
       
  7914         }
       
  7915         
       
  7916     }/*function_tod_to_usint*/
       
  7917     break;
       
  7918 
       
  7919 /****
       
  7920  *TOD_TO_UINT
       
  7921  */
       
  7922     case function_tod_to_uint :
       
  7923     {
       
  7924         symbol_c *last_type_symbol = NULL;
       
  7925 
       
  7926         {
       
  7927             identifier_c param_name("IN");
       
  7928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7930             
       
  7931             /* Get the value from a foo(<param_value>) style call */
       
  7932             if (IN_param_value == NULL)
       
  7933               IN_param_value = function_call_param_iterator.next();
       
  7934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7936             
       
  7937             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  7938             {
       
  7939         
       
  7940                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  7941                 return return_type_symbol;
       
  7942                 
       
  7943             }
       
  7944             
       
  7945             ERROR;
       
  7946         }
       
  7947         
       
  7948     }/*function_tod_to_uint*/
       
  7949     break;
       
  7950 
       
  7951 /****
       
  7952  *TOD_TO_UDINT
       
  7953  */
       
  7954     case function_tod_to_udint :
       
  7955     {
       
  7956         symbol_c *last_type_symbol = NULL;
       
  7957 
       
  7958         {
       
  7959             identifier_c param_name("IN");
       
  7960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7962             
       
  7963             /* Get the value from a foo(<param_value>) style call */
       
  7964             if (IN_param_value == NULL)
       
  7965               IN_param_value = function_call_param_iterator.next();
       
  7966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  7968             
       
  7969             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  7970             {
       
  7971         
       
  7972                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  7973                 return return_type_symbol;
       
  7974                 
       
  7975             }
       
  7976             
       
  7977             ERROR;
       
  7978         }
       
  7979         
       
  7980     }/*function_tod_to_udint*/
       
  7981     break;
       
  7982 
       
  7983 /****
       
  7984  *TOD_TO_ULINT
       
  7985  */
       
  7986     case function_tod_to_ulint :
       
  7987     {
       
  7988         symbol_c *last_type_symbol = NULL;
       
  7989 
       
  7990         {
       
  7991             identifier_c param_name("IN");
       
  7992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  7993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  7994             
       
  7995             /* Get the value from a foo(<param_value>) style call */
       
  7996             if (IN_param_value == NULL)
       
  7997               IN_param_value = function_call_param_iterator.next();
       
  7998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  7999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8000             
       
  8001             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8002             {
       
  8003         
       
  8004                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8005                 return return_type_symbol;
       
  8006                 
       
  8007             }
       
  8008             
       
  8009             ERROR;
       
  8010         }
       
  8011         
       
  8012     }/*function_tod_to_ulint*/
       
  8013     break;
       
  8014 
       
  8015 /****
       
  8016  *TOD_TO_REAL
       
  8017  */
       
  8018     case function_tod_to_real :
       
  8019     {
       
  8020         symbol_c *last_type_symbol = NULL;
       
  8021 
       
  8022         {
       
  8023             identifier_c param_name("IN");
       
  8024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8026             
       
  8027             /* Get the value from a foo(<param_value>) style call */
       
  8028             if (IN_param_value == NULL)
       
  8029               IN_param_value = function_call_param_iterator.next();
       
  8030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8032             
       
  8033             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8034             {
       
  8035         
       
  8036                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8037                 return return_type_symbol;
       
  8038                 
       
  8039             }
       
  8040             
       
  8041             ERROR;
       
  8042         }
       
  8043         
       
  8044     }/*function_tod_to_real*/
       
  8045     break;
       
  8046 
       
  8047 /****
       
  8048  *TOD_TO_LREAL
       
  8049  */
       
  8050     case function_tod_to_lreal :
       
  8051     {
       
  8052         symbol_c *last_type_symbol = NULL;
       
  8053 
       
  8054         {
       
  8055             identifier_c param_name("IN");
       
  8056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8058             
       
  8059             /* Get the value from a foo(<param_value>) style call */
       
  8060             if (IN_param_value == NULL)
       
  8061               IN_param_value = function_call_param_iterator.next();
       
  8062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8064             
       
  8065             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8066             {
       
  8067         
       
  8068                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8069                 return return_type_symbol;
       
  8070                 
       
  8071             }
       
  8072             
       
  8073             ERROR;
       
  8074         }
       
  8075         
       
  8076     }/*function_tod_to_lreal*/
       
  8077     break;
       
  8078 
       
  8079 /****
       
  8080  *TOD_TO_STRING
       
  8081  */
       
  8082     case function_tod_to_string :
       
  8083     {
       
  8084         symbol_c *last_type_symbol = NULL;
       
  8085 
       
  8086         {
       
  8087             identifier_c param_name("IN");
       
  8088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8090             
       
  8091             /* Get the value from a foo(<param_value>) style call */
       
  8092             if (IN_param_value == NULL)
       
  8093               IN_param_value = function_call_param_iterator.next();
       
  8094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8096             
       
  8097             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8098             {
       
  8099         
       
  8100                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8101                 return return_type_symbol;
       
  8102                 
       
  8103             }
       
  8104             
       
  8105             ERROR;
       
  8106         }
       
  8107         
       
  8108     }/*function_tod_to_string*/
       
  8109     break;
       
  8110 
       
  8111 /****
       
  8112  *TOD_TO_BYTE
       
  8113  */
       
  8114     case function_tod_to_byte :
       
  8115     {
       
  8116         symbol_c *last_type_symbol = NULL;
       
  8117 
       
  8118         {
       
  8119             identifier_c param_name("IN");
       
  8120             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8121             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8122             
       
  8123             /* Get the value from a foo(<param_value>) style call */
       
  8124             if (IN_param_value == NULL)
       
  8125               IN_param_value = function_call_param_iterator.next();
       
  8126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8128             
       
  8129             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8130             {
       
  8131         
       
  8132                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8133                 return return_type_symbol;
       
  8134                 
       
  8135             }
       
  8136             
       
  8137             ERROR;
       
  8138         }
       
  8139         
       
  8140     }/*function_tod_to_byte*/
       
  8141     break;
       
  8142 
       
  8143 /****
       
  8144  *TOD_TO_WORD
       
  8145  */
       
  8146     case function_tod_to_word :
       
  8147     {
       
  8148         symbol_c *last_type_symbol = NULL;
       
  8149 
       
  8150         {
       
  8151             identifier_c param_name("IN");
       
  8152             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8153             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8154             
       
  8155             /* Get the value from a foo(<param_value>) style call */
       
  8156             if (IN_param_value == NULL)
       
  8157               IN_param_value = function_call_param_iterator.next();
       
  8158             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8159             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8160             
       
  8161             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8162             {
       
  8163         
       
  8164                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8165                 return return_type_symbol;
       
  8166                 
       
  8167             }
       
  8168             
       
  8169             ERROR;
       
  8170         }
       
  8171         
       
  8172     }/*function_tod_to_word*/
       
  8173     break;
       
  8174 
       
  8175 /****
       
  8176  *TOD_TO_DWORD
       
  8177  */
       
  8178     case function_tod_to_dword :
       
  8179     {
       
  8180         symbol_c *last_type_symbol = NULL;
       
  8181 
       
  8182         {
       
  8183             identifier_c param_name("IN");
       
  8184             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8185             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8186             
       
  8187             /* Get the value from a foo(<param_value>) style call */
       
  8188             if (IN_param_value == NULL)
       
  8189               IN_param_value = function_call_param_iterator.next();
       
  8190             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8192             
       
  8193             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8194             {
       
  8195         
       
  8196                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8197                 return return_type_symbol;
       
  8198                 
       
  8199             }
       
  8200             
       
  8201             ERROR;
       
  8202         }
       
  8203         
       
  8204     }/*function_tod_to_dword*/
       
  8205     break;
       
  8206 
       
  8207 /****
       
  8208  *TOD_TO_LWORD
       
  8209  */
       
  8210     case function_tod_to_lword :
       
  8211     {
       
  8212         symbol_c *last_type_symbol = NULL;
       
  8213 
       
  8214         {
       
  8215             identifier_c param_name("IN");
       
  8216             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8217             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8218             
       
  8219             /* Get the value from a foo(<param_value>) style call */
       
  8220             if (IN_param_value == NULL)
       
  8221               IN_param_value = function_call_param_iterator.next();
       
  8222             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8223             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8224             
       
  8225             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
  8226             {
       
  8227         
       
  8228                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8229                 return return_type_symbol;
       
  8230                 
       
  8231             }
       
  8232             
       
  8233             ERROR;
       
  8234         }
       
  8235         
       
  8236     }/*function_tod_to_lword*/
       
  8237     break;
       
  8238 
       
  8239 /****
       
  8240  *DT_TO_BOOL
       
  8241  */
       
  8242     case function_dt_to_bool :
       
  8243     {
       
  8244         symbol_c *last_type_symbol = NULL;
       
  8245 
       
  8246         {
       
  8247             identifier_c param_name("IN");
       
  8248             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8249             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8250             
       
  8251             /* Get the value from a foo(<param_value>) style call */
       
  8252             if (IN_param_value == NULL)
       
  8253               IN_param_value = function_call_param_iterator.next();
       
  8254             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8255             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8256             
       
  8257             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8258             {
       
  8259         
       
  8260                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8261                 return return_type_symbol;
       
  8262                 
       
  8263             }
       
  8264             
       
  8265             ERROR;
       
  8266         }
       
  8267         
       
  8268     }/*function_dt_to_bool*/
       
  8269     break;
       
  8270 
       
  8271 /****
       
  8272  *DT_TO_SINT
       
  8273  */
       
  8274     case function_dt_to_sint :
       
  8275     {
       
  8276         symbol_c *last_type_symbol = NULL;
       
  8277 
       
  8278         {
       
  8279             identifier_c param_name("IN");
       
  8280             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8281             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8282             
       
  8283             /* Get the value from a foo(<param_value>) style call */
       
  8284             if (IN_param_value == NULL)
       
  8285               IN_param_value = function_call_param_iterator.next();
       
  8286             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8287             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8288             
       
  8289             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8290             {
       
  8291         
       
  8292                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8293                 return return_type_symbol;
       
  8294                 
       
  8295             }
       
  8296             
       
  8297             ERROR;
       
  8298         }
       
  8299         
       
  8300     }/*function_dt_to_sint*/
       
  8301     break;
       
  8302 
       
  8303 /****
       
  8304  *DT_TO_INT
       
  8305  */
       
  8306     case function_dt_to_int :
       
  8307     {
       
  8308         symbol_c *last_type_symbol = NULL;
       
  8309 
       
  8310         {
       
  8311             identifier_c param_name("IN");
       
  8312             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8313             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8314             
       
  8315             /* Get the value from a foo(<param_value>) style call */
       
  8316             if (IN_param_value == NULL)
       
  8317               IN_param_value = function_call_param_iterator.next();
       
  8318             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8320             
       
  8321             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8322             {
       
  8323         
       
  8324                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8325                 return return_type_symbol;
       
  8326                 
       
  8327             }
       
  8328             
       
  8329             ERROR;
       
  8330         }
       
  8331         
       
  8332     }/*function_dt_to_int*/
       
  8333     break;
       
  8334 
       
  8335 /****
       
  8336  *DT_TO_DINT
       
  8337  */
       
  8338     case function_dt_to_dint :
       
  8339     {
       
  8340         symbol_c *last_type_symbol = NULL;
       
  8341 
       
  8342         {
       
  8343             identifier_c param_name("IN");
       
  8344             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8345             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8346             
       
  8347             /* Get the value from a foo(<param_value>) style call */
       
  8348             if (IN_param_value == NULL)
       
  8349               IN_param_value = function_call_param_iterator.next();
       
  8350             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8351             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8352             
       
  8353             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8354             {
       
  8355         
       
  8356                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8357                 return return_type_symbol;
       
  8358                 
       
  8359             }
       
  8360             
       
  8361             ERROR;
       
  8362         }
       
  8363         
       
  8364     }/*function_dt_to_dint*/
       
  8365     break;
       
  8366 
       
  8367 /****
       
  8368  *DT_TO_LINT
       
  8369  */
       
  8370     case function_dt_to_lint :
       
  8371     {
       
  8372         symbol_c *last_type_symbol = NULL;
       
  8373 
       
  8374         {
       
  8375             identifier_c param_name("IN");
       
  8376             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8377             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8378             
       
  8379             /* Get the value from a foo(<param_value>) style call */
       
  8380             if (IN_param_value == NULL)
       
  8381               IN_param_value = function_call_param_iterator.next();
       
  8382             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8383             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8384             
       
  8385             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8386             {
       
  8387         
       
  8388                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8389                 return return_type_symbol;
       
  8390                 
       
  8391             }
       
  8392             
       
  8393             ERROR;
       
  8394         }
       
  8395         
       
  8396     }/*function_dt_to_lint*/
       
  8397     break;
       
  8398 
       
  8399 /****
       
  8400  *DT_TO_USINT
       
  8401  */
       
  8402     case function_dt_to_usint :
       
  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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8418             {
       
  8419         
       
  8420                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8421                 return return_type_symbol;
       
  8422                 
       
  8423             }
       
  8424             
       
  8425             ERROR;
       
  8426         }
       
  8427         
       
  8428     }/*function_dt_to_usint*/
       
  8429     break;
       
  8430 
       
  8431 /****
       
  8432  *DT_TO_UINT
       
  8433  */
       
  8434     case function_dt_to_uint :
       
  8435     {
       
  8436         symbol_c *last_type_symbol = NULL;
       
  8437 
       
  8438         {
       
  8439             identifier_c param_name("IN");
       
  8440             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8441             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8442             
       
  8443             /* Get the value from a foo(<param_value>) style call */
       
  8444             if (IN_param_value == NULL)
       
  8445               IN_param_value = function_call_param_iterator.next();
       
  8446             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8447             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8448             
       
  8449             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8450             {
       
  8451         
       
  8452                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8453                 return return_type_symbol;
       
  8454                 
       
  8455             }
       
  8456             
       
  8457             ERROR;
       
  8458         }
       
  8459         
       
  8460     }/*function_dt_to_uint*/
       
  8461     break;
       
  8462 
       
  8463 /****
       
  8464  *DT_TO_UDINT
       
  8465  */
       
  8466     case function_dt_to_udint :
       
  8467     {
       
  8468         symbol_c *last_type_symbol = NULL;
       
  8469 
       
  8470         {
       
  8471             identifier_c param_name("IN");
       
  8472             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8473             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8474             
       
  8475             /* Get the value from a foo(<param_value>) style call */
       
  8476             if (IN_param_value == NULL)
       
  8477               IN_param_value = function_call_param_iterator.next();
       
  8478             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8479             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8480             
       
  8481             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8482             {
       
  8483         
       
  8484                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8485                 return return_type_symbol;
       
  8486                 
       
  8487             }
       
  8488             
       
  8489             ERROR;
       
  8490         }
       
  8491         
       
  8492     }/*function_dt_to_udint*/
       
  8493     break;
       
  8494 
       
  8495 /****
       
  8496  *DT_TO_ULINT
       
  8497  */
       
  8498     case function_dt_to_ulint :
       
  8499     {
       
  8500         symbol_c *last_type_symbol = NULL;
       
  8501 
       
  8502         {
       
  8503             identifier_c param_name("IN");
       
  8504             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8505             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8506             
       
  8507             /* Get the value from a foo(<param_value>) style call */
       
  8508             if (IN_param_value == NULL)
       
  8509               IN_param_value = function_call_param_iterator.next();
       
  8510             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8511             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8512             
       
  8513             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8514             {
       
  8515         
       
  8516                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  8517                 return return_type_symbol;
       
  8518                 
       
  8519             }
       
  8520             
       
  8521             ERROR;
       
  8522         }
       
  8523         
       
  8524     }/*function_dt_to_ulint*/
       
  8525     break;
       
  8526 
       
  8527 /****
       
  8528  *DT_TO_REAL
       
  8529  */
       
  8530     case function_dt_to_real :
       
  8531     {
       
  8532         symbol_c *last_type_symbol = NULL;
       
  8533 
       
  8534         {
       
  8535             identifier_c param_name("IN");
       
  8536             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8537             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8538             
       
  8539             /* Get the value from a foo(<param_value>) style call */
       
  8540             if (IN_param_value == NULL)
       
  8541               IN_param_value = function_call_param_iterator.next();
       
  8542             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8543             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8544             
       
  8545             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8546             {
       
  8547         
       
  8548                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  8549                 return return_type_symbol;
       
  8550                 
       
  8551             }
       
  8552             
       
  8553             ERROR;
       
  8554         }
       
  8555         
       
  8556     }/*function_dt_to_real*/
       
  8557     break;
       
  8558 
       
  8559 /****
       
  8560  *DT_TO_LREAL
       
  8561  */
       
  8562     case function_dt_to_lreal :
       
  8563     {
       
  8564         symbol_c *last_type_symbol = NULL;
       
  8565 
       
  8566         {
       
  8567             identifier_c param_name("IN");
       
  8568             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8569             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8570             
       
  8571             /* Get the value from a foo(<param_value>) style call */
       
  8572             if (IN_param_value == NULL)
       
  8573               IN_param_value = function_call_param_iterator.next();
       
  8574             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8575             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8576             
       
  8577             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8578             {
       
  8579         
       
  8580                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  8581                 return return_type_symbol;
       
  8582                 
       
  8583             }
       
  8584             
       
  8585             ERROR;
       
  8586         }
       
  8587         
       
  8588     }/*function_dt_to_lreal*/
       
  8589     break;
       
  8590 
       
  8591 /****
       
  8592  *DT_TO_STRING
       
  8593  */
       
  8594     case function_dt_to_string :
       
  8595     {
       
  8596         symbol_c *last_type_symbol = NULL;
       
  8597 
       
  8598         {
       
  8599             identifier_c param_name("IN");
       
  8600             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8601             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8602             
       
  8603             /* Get the value from a foo(<param_value>) style call */
       
  8604             if (IN_param_value == NULL)
       
  8605               IN_param_value = function_call_param_iterator.next();
       
  8606             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8607             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8608             
       
  8609             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8610             {
       
  8611         
       
  8612                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  8613                 return return_type_symbol;
       
  8614                 
       
  8615             }
       
  8616             
       
  8617             ERROR;
       
  8618         }
       
  8619         
       
  8620     }/*function_dt_to_string*/
       
  8621     break;
       
  8622 
       
  8623 /****
       
  8624  *DT_TO_BYTE
       
  8625  */
       
  8626     case function_dt_to_byte :
       
  8627     {
       
  8628         symbol_c *last_type_symbol = NULL;
       
  8629 
       
  8630         {
       
  8631             identifier_c param_name("IN");
       
  8632             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8633             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8634             
       
  8635             /* Get the value from a foo(<param_value>) style call */
       
  8636             if (IN_param_value == NULL)
       
  8637               IN_param_value = function_call_param_iterator.next();
       
  8638             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8639             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8640             
       
  8641             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8642             {
       
  8643         
       
  8644                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  8645                 return return_type_symbol;
       
  8646                 
       
  8647             }
       
  8648             
       
  8649             ERROR;
       
  8650         }
       
  8651         
       
  8652     }/*function_dt_to_byte*/
       
  8653     break;
       
  8654 
       
  8655 /****
       
  8656  *DT_TO_WORD
       
  8657  */
       
  8658     case function_dt_to_word :
       
  8659     {
       
  8660         symbol_c *last_type_symbol = NULL;
       
  8661 
       
  8662         {
       
  8663             identifier_c param_name("IN");
       
  8664             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8665             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8666             
       
  8667             /* Get the value from a foo(<param_value>) style call */
       
  8668             if (IN_param_value == NULL)
       
  8669               IN_param_value = function_call_param_iterator.next();
       
  8670             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8671             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8672             
       
  8673             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8674             {
       
  8675         
       
  8676                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  8677                 return return_type_symbol;
       
  8678                 
       
  8679             }
       
  8680             
       
  8681             ERROR;
       
  8682         }
       
  8683         
       
  8684     }/*function_dt_to_word*/
       
  8685     break;
       
  8686 
       
  8687 /****
       
  8688  *DT_TO_DWORD
       
  8689  */
       
  8690     case function_dt_to_dword :
       
  8691     {
       
  8692         symbol_c *last_type_symbol = NULL;
       
  8693 
       
  8694         {
       
  8695             identifier_c param_name("IN");
       
  8696             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8697             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8698             
       
  8699             /* Get the value from a foo(<param_value>) style call */
       
  8700             if (IN_param_value == NULL)
       
  8701               IN_param_value = function_call_param_iterator.next();
       
  8702             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8703             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8704             
       
  8705             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8706             {
       
  8707         
       
  8708                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  8709                 return return_type_symbol;
       
  8710                 
       
  8711             }
       
  8712             
       
  8713             ERROR;
       
  8714         }
       
  8715         
       
  8716     }/*function_dt_to_dword*/
       
  8717     break;
       
  8718 
       
  8719 /****
       
  8720  *DT_TO_LWORD
       
  8721  */
       
  8722     case function_dt_to_lword :
       
  8723     {
       
  8724         symbol_c *last_type_symbol = NULL;
       
  8725 
       
  8726         {
       
  8727             identifier_c param_name("IN");
       
  8728             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8729             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8730             
       
  8731             /* Get the value from a foo(<param_value>) style call */
       
  8732             if (IN_param_value == NULL)
       
  8733               IN_param_value = function_call_param_iterator.next();
       
  8734             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8735             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8736             
       
  8737             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
  8738             {
       
  8739         
       
  8740                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  8741                 return return_type_symbol;
       
  8742                 
       
  8743             }
       
  8744             
       
  8745             ERROR;
       
  8746         }
       
  8747         
       
  8748     }/*function_dt_to_lword*/
       
  8749     break;
       
  8750 
       
  8751 /****
       
  8752  *STRING_TO_BOOL
       
  8753  */
       
  8754     case function_string_to_bool :
       
  8755     {
       
  8756         symbol_c *last_type_symbol = NULL;
       
  8757 
       
  8758         {
       
  8759             identifier_c param_name("IN");
       
  8760             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8761             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8762             
       
  8763             /* Get the value from a foo(<param_value>) style call */
       
  8764             if (IN_param_value == NULL)
       
  8765               IN_param_value = function_call_param_iterator.next();
       
  8766             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8767             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8768             
       
  8769             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8770             {
       
  8771         
       
  8772                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  8773                 return return_type_symbol;
       
  8774                 
       
  8775             }
       
  8776             
       
  8777             ERROR;
       
  8778         }
       
  8779         
       
  8780     }/*function_string_to_bool*/
       
  8781     break;
       
  8782 
       
  8783 /****
       
  8784  *STRING_TO_SINT
       
  8785  */
       
  8786     case function_string_to_sint :
       
  8787     {
       
  8788         symbol_c *last_type_symbol = NULL;
       
  8789 
       
  8790         {
       
  8791             identifier_c param_name("IN");
       
  8792             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8793             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8794             
       
  8795             /* Get the value from a foo(<param_value>) style call */
       
  8796             if (IN_param_value == NULL)
       
  8797               IN_param_value = function_call_param_iterator.next();
       
  8798             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8799             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8800             
       
  8801             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8802             {
       
  8803         
       
  8804                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  8805                 return return_type_symbol;
       
  8806                 
       
  8807             }
       
  8808             
       
  8809             ERROR;
       
  8810         }
       
  8811         
       
  8812     }/*function_string_to_sint*/
       
  8813     break;
       
  8814 
       
  8815 /****
       
  8816  *STRING_TO_INT
       
  8817  */
       
  8818     case function_string_to_int :
       
  8819     {
       
  8820         symbol_c *last_type_symbol = NULL;
       
  8821 
       
  8822         {
       
  8823             identifier_c param_name("IN");
       
  8824             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8825             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8826             
       
  8827             /* Get the value from a foo(<param_value>) style call */
       
  8828             if (IN_param_value == NULL)
       
  8829               IN_param_value = function_call_param_iterator.next();
       
  8830             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8831             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8832             
       
  8833             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8834             {
       
  8835         
       
  8836                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  8837                 return return_type_symbol;
       
  8838                 
       
  8839             }
       
  8840             
       
  8841             ERROR;
       
  8842         }
       
  8843         
       
  8844     }/*function_string_to_int*/
       
  8845     break;
       
  8846 
       
  8847 /****
       
  8848  *STRING_TO_DINT
       
  8849  */
       
  8850     case function_string_to_dint :
       
  8851     {
       
  8852         symbol_c *last_type_symbol = NULL;
       
  8853 
       
  8854         {
       
  8855             identifier_c param_name("IN");
       
  8856             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8857             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8858             
       
  8859             /* Get the value from a foo(<param_value>) style call */
       
  8860             if (IN_param_value == NULL)
       
  8861               IN_param_value = function_call_param_iterator.next();
       
  8862             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8863             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8864             
       
  8865             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8866             {
       
  8867         
       
  8868                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  8869                 return return_type_symbol;
       
  8870                 
       
  8871             }
       
  8872             
       
  8873             ERROR;
       
  8874         }
       
  8875         
       
  8876     }/*function_string_to_dint*/
       
  8877     break;
       
  8878 
       
  8879 /****
       
  8880  *STRING_TO_LINT
       
  8881  */
       
  8882     case function_string_to_lint :
       
  8883     {
       
  8884         symbol_c *last_type_symbol = NULL;
       
  8885 
       
  8886         {
       
  8887             identifier_c param_name("IN");
       
  8888             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8889             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8890             
       
  8891             /* Get the value from a foo(<param_value>) style call */
       
  8892             if (IN_param_value == NULL)
       
  8893               IN_param_value = function_call_param_iterator.next();
       
  8894             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8895             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8896             
       
  8897             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8898             {
       
  8899         
       
  8900                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  8901                 return return_type_symbol;
       
  8902                 
       
  8903             }
       
  8904             
       
  8905             ERROR;
       
  8906         }
       
  8907         
       
  8908     }/*function_string_to_lint*/
       
  8909     break;
       
  8910 
       
  8911 /****
       
  8912  *STRING_TO_USINT
       
  8913  */
       
  8914     case function_string_to_usint :
       
  8915     {
       
  8916         symbol_c *last_type_symbol = NULL;
       
  8917 
       
  8918         {
       
  8919             identifier_c param_name("IN");
       
  8920             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8921             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8922             
       
  8923             /* Get the value from a foo(<param_value>) style call */
       
  8924             if (IN_param_value == NULL)
       
  8925               IN_param_value = function_call_param_iterator.next();
       
  8926             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8927             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8928             
       
  8929             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8930             {
       
  8931         
       
  8932                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  8933                 return return_type_symbol;
       
  8934                 
       
  8935             }
       
  8936             
       
  8937             ERROR;
       
  8938         }
       
  8939         
       
  8940     }/*function_string_to_usint*/
       
  8941     break;
       
  8942 
       
  8943 /****
       
  8944  *STRING_TO_UINT
       
  8945  */
       
  8946     case function_string_to_uint :
       
  8947     {
       
  8948         symbol_c *last_type_symbol = NULL;
       
  8949 
       
  8950         {
       
  8951             identifier_c param_name("IN");
       
  8952             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8953             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8954             
       
  8955             /* Get the value from a foo(<param_value>) style call */
       
  8956             if (IN_param_value == NULL)
       
  8957               IN_param_value = function_call_param_iterator.next();
       
  8958             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8959             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8960             
       
  8961             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8962             {
       
  8963         
       
  8964                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  8965                 return return_type_symbol;
       
  8966                 
       
  8967             }
       
  8968             
       
  8969             ERROR;
       
  8970         }
       
  8971         
       
  8972     }/*function_string_to_uint*/
       
  8973     break;
       
  8974 
       
  8975 /****
       
  8976  *STRING_TO_UDINT
       
  8977  */
       
  8978     case function_string_to_udint :
       
  8979     {
       
  8980         symbol_c *last_type_symbol = NULL;
       
  8981 
       
  8982         {
       
  8983             identifier_c param_name("IN");
       
  8984             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  8985             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  8986             
       
  8987             /* Get the value from a foo(<param_value>) style call */
       
  8988             if (IN_param_value == NULL)
       
  8989               IN_param_value = function_call_param_iterator.next();
       
  8990             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  8991             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  8992             
       
  8993             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  8994             {
       
  8995         
       
  8996                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  8997                 return return_type_symbol;
       
  8998                 
       
  8999             }
       
  9000             
       
  9001             ERROR;
       
  9002         }
       
  9003         
       
  9004     }/*function_string_to_udint*/
       
  9005     break;
       
  9006 
       
  9007 /****
       
  9008  *STRING_TO_ULINT
       
  9009  */
       
  9010     case function_string_to_ulint :
       
  9011     {
       
  9012         symbol_c *last_type_symbol = NULL;
       
  9013 
       
  9014         {
       
  9015             identifier_c param_name("IN");
       
  9016             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9017             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9018             
       
  9019             /* Get the value from a foo(<param_value>) style call */
       
  9020             if (IN_param_value == NULL)
       
  9021               IN_param_value = function_call_param_iterator.next();
       
  9022             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9023             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9024             
       
  9025             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9026             {
       
  9027         
       
  9028                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9029                 return return_type_symbol;
       
  9030                 
       
  9031             }
       
  9032             
       
  9033             ERROR;
       
  9034         }
       
  9035         
       
  9036     }/*function_string_to_ulint*/
       
  9037     break;
       
  9038 
       
  9039 /****
       
  9040  *STRING_TO_REAL
       
  9041  */
       
  9042     case function_string_to_real :
       
  9043     {
       
  9044         symbol_c *last_type_symbol = NULL;
       
  9045 
       
  9046         {
       
  9047             identifier_c param_name("IN");
       
  9048             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9049             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9050             
       
  9051             /* Get the value from a foo(<param_value>) style call */
       
  9052             if (IN_param_value == NULL)
       
  9053               IN_param_value = function_call_param_iterator.next();
       
  9054             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9055             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9056             
       
  9057             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9058             {
       
  9059         
       
  9060                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9061                 return return_type_symbol;
       
  9062                 
       
  9063             }
       
  9064             
       
  9065             ERROR;
       
  9066         }
       
  9067         
       
  9068     }/*function_string_to_real*/
       
  9069     break;
       
  9070 
       
  9071 /****
       
  9072  *STRING_TO_LREAL
       
  9073  */
       
  9074     case function_string_to_lreal :
       
  9075     {
       
  9076         symbol_c *last_type_symbol = NULL;
       
  9077 
       
  9078         {
       
  9079             identifier_c param_name("IN");
       
  9080             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9081             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9082             
       
  9083             /* Get the value from a foo(<param_value>) style call */
       
  9084             if (IN_param_value == NULL)
       
  9085               IN_param_value = function_call_param_iterator.next();
       
  9086             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9087             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9088             
       
  9089             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9090             {
       
  9091         
       
  9092                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9093                 return return_type_symbol;
       
  9094                 
       
  9095             }
       
  9096             
       
  9097             ERROR;
       
  9098         }
       
  9099         
       
  9100     }/*function_string_to_lreal*/
       
  9101     break;
       
  9102 
       
  9103 /****
       
  9104  *STRING_TO_TIME
       
  9105  */
       
  9106     case function_string_to_time :
       
  9107     {
       
  9108         symbol_c *last_type_symbol = NULL;
       
  9109 
       
  9110         {
       
  9111             identifier_c param_name("IN");
       
  9112             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9113             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9114             
       
  9115             /* Get the value from a foo(<param_value>) style call */
       
  9116             if (IN_param_value == NULL)
       
  9117               IN_param_value = function_call_param_iterator.next();
       
  9118             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9119             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9120             
       
  9121             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9122             {
       
  9123         
       
  9124                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9125                 return return_type_symbol;
       
  9126                 
       
  9127             }
       
  9128             
       
  9129             ERROR;
       
  9130         }
       
  9131         
       
  9132     }/*function_string_to_time*/
       
  9133     break;
       
  9134 
       
  9135 /****
       
  9136  *STRING_TO_DATE
       
  9137  */
       
  9138     case function_string_to_date :
       
  9139     {
       
  9140         symbol_c *last_type_symbol = NULL;
       
  9141 
       
  9142         {
       
  9143             identifier_c param_name("IN");
       
  9144             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9145             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9146             
       
  9147             /* Get the value from a foo(<param_value>) style call */
       
  9148             if (IN_param_value == NULL)
       
  9149               IN_param_value = function_call_param_iterator.next();
       
  9150             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9151             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9152             
       
  9153             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9154             {
       
  9155         
       
  9156                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9157                 return return_type_symbol;
       
  9158                 
       
  9159             }
       
  9160             
       
  9161             ERROR;
       
  9162         }
       
  9163         
       
  9164     }/*function_string_to_date*/
       
  9165     break;
       
  9166 
       
  9167 /****
       
  9168  *STRING_TO_TOD
       
  9169  */
       
  9170     case function_string_to_tod :
       
  9171     {
       
  9172         symbol_c *last_type_symbol = NULL;
       
  9173 
       
  9174         {
       
  9175             identifier_c param_name("IN");
       
  9176             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9177             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9178             
       
  9179             /* Get the value from a foo(<param_value>) style call */
       
  9180             if (IN_param_value == NULL)
       
  9181               IN_param_value = function_call_param_iterator.next();
       
  9182             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9183             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9184             
       
  9185             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9186             {
 11970             {
  9187         
 11971         
  9188                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 11972                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
  9189                 return return_type_symbol;
 11973                 return return_type_symbol;
  9190                 
 11974                 
  9191             }
 11975             }
  9192             
 11976             
  9193             ERROR;
 11977             ERROR;
  9194         }
 11978         }
  9195         
 11979         
  9196     }/*function_string_to_tod*/
       
  9197     break;
       
  9198 
       
  9199 /****
       
  9200  *STRING_TO_DT
       
  9201  */
       
  9202     case function_string_to_dt :
       
  9203     {
       
  9204         symbol_c *last_type_symbol = NULL;
       
  9205 
       
  9206         {
       
  9207             identifier_c param_name("IN");
       
  9208             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9209             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9210             
       
  9211             /* Get the value from a foo(<param_value>) style call */
       
  9212             if (IN_param_value == NULL)
       
  9213               IN_param_value = function_call_param_iterator.next();
       
  9214             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9215             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9216             
       
  9217             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9218             {
       
  9219         
       
  9220                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9221                 return return_type_symbol;
       
  9222                 
       
  9223             }
       
  9224             
       
  9225             ERROR;
       
  9226         }
       
  9227         
       
  9228     }/*function_string_to_dt*/
       
  9229     break;
       
  9230 
       
  9231 /****
       
  9232  *STRING_TO_BYTE
       
  9233  */
       
  9234     case function_string_to_byte :
       
  9235     {
       
  9236         symbol_c *last_type_symbol = NULL;
       
  9237 
       
  9238         {
       
  9239             identifier_c param_name("IN");
       
  9240             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9241             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9242             
       
  9243             /* Get the value from a foo(<param_value>) style call */
       
  9244             if (IN_param_value == NULL)
       
  9245               IN_param_value = function_call_param_iterator.next();
       
  9246             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9247             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9248             
       
  9249             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9250             {
       
  9251         
       
  9252                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
  9253                 return return_type_symbol;
       
  9254                 
       
  9255             }
       
  9256             
       
  9257             ERROR;
       
  9258         }
       
  9259         
       
  9260     }/*function_string_to_byte*/
       
  9261     break;
       
  9262 
       
  9263 /****
       
  9264  *STRING_TO_WORD
       
  9265  */
       
  9266     case function_string_to_word :
       
  9267     {
       
  9268         symbol_c *last_type_symbol = NULL;
       
  9269 
       
  9270         {
       
  9271             identifier_c param_name("IN");
       
  9272             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9273             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9274             
       
  9275             /* Get the value from a foo(<param_value>) style call */
       
  9276             if (IN_param_value == NULL)
       
  9277               IN_param_value = function_call_param_iterator.next();
       
  9278             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9279             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9280             
       
  9281             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9282             {
       
  9283         
       
  9284                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9285                 return return_type_symbol;
       
  9286                 
       
  9287             }
       
  9288             
       
  9289             ERROR;
       
  9290         }
       
  9291         
       
  9292     }/*function_string_to_word*/
       
  9293     break;
       
  9294 
       
  9295 /****
       
  9296  *STRING_TO_DWORD
       
  9297  */
       
  9298     case function_string_to_dword :
       
  9299     {
       
  9300         symbol_c *last_type_symbol = NULL;
       
  9301 
       
  9302         {
       
  9303             identifier_c param_name("IN");
       
  9304             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9305             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9306             
       
  9307             /* Get the value from a foo(<param_value>) style call */
       
  9308             if (IN_param_value == NULL)
       
  9309               IN_param_value = function_call_param_iterator.next();
       
  9310             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9311             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9312             
       
  9313             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9314             {
       
  9315         
       
  9316                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9317                 return return_type_symbol;
       
  9318                 
       
  9319             }
       
  9320             
       
  9321             ERROR;
       
  9322         }
       
  9323         
       
  9324     }/*function_string_to_dword*/
       
  9325     break;
       
  9326 
       
  9327 /****
       
  9328  *STRING_TO_LWORD
       
  9329  */
       
  9330     case function_string_to_lword :
       
  9331     {
       
  9332         symbol_c *last_type_symbol = NULL;
       
  9333 
       
  9334         {
       
  9335             identifier_c param_name("IN");
       
  9336             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9337             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9338             
       
  9339             /* Get the value from a foo(<param_value>) style call */
       
  9340             if (IN_param_value == NULL)
       
  9341               IN_param_value = function_call_param_iterator.next();
       
  9342             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9343             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9344             
       
  9345             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
  9346             {
       
  9347         
       
  9348                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9349                 return return_type_symbol;
       
  9350                 
       
  9351             }
       
  9352             
       
  9353             ERROR;
       
  9354         }
       
  9355         
       
  9356     }/*function_string_to_lword*/
       
  9357     break;
       
  9358 
       
  9359 /****
       
  9360  *BYTE_TO_BOOL
       
  9361  */
       
  9362     case function_byte_to_bool :
       
  9363     {
       
  9364         symbol_c *last_type_symbol = NULL;
       
  9365 
       
  9366         {
       
  9367             identifier_c param_name("IN");
       
  9368             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9369             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9370             
       
  9371             /* Get the value from a foo(<param_value>) style call */
       
  9372             if (IN_param_value == NULL)
       
  9373               IN_param_value = function_call_param_iterator.next();
       
  9374             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9375             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9376             
       
  9377             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9378             {
       
  9379         
       
  9380                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9381                 return return_type_symbol;
       
  9382                 
       
  9383             }
       
  9384             
       
  9385             ERROR;
       
  9386         }
       
  9387         
       
  9388     }/*function_byte_to_bool*/
       
  9389     break;
       
  9390 
       
  9391 /****
       
  9392  *BYTE_TO_SINT
       
  9393  */
       
  9394     case function_byte_to_sint :
       
  9395     {
       
  9396         symbol_c *last_type_symbol = NULL;
       
  9397 
       
  9398         {
       
  9399             identifier_c param_name("IN");
       
  9400             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9401             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9402             
       
  9403             /* Get the value from a foo(<param_value>) style call */
       
  9404             if (IN_param_value == NULL)
       
  9405               IN_param_value = function_call_param_iterator.next();
       
  9406             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9407             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9408             
       
  9409             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9410             {
       
  9411         
       
  9412                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
  9413                 return return_type_symbol;
       
  9414                 
       
  9415             }
       
  9416             
       
  9417             ERROR;
       
  9418         }
       
  9419         
       
  9420     }/*function_byte_to_sint*/
       
  9421     break;
       
  9422 
       
  9423 /****
       
  9424  *BYTE_TO_INT
       
  9425  */
       
  9426     case function_byte_to_int :
       
  9427     {
       
  9428         symbol_c *last_type_symbol = NULL;
       
  9429 
       
  9430         {
       
  9431             identifier_c param_name("IN");
       
  9432             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9433             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9434             
       
  9435             /* Get the value from a foo(<param_value>) style call */
       
  9436             if (IN_param_value == NULL)
       
  9437               IN_param_value = function_call_param_iterator.next();
       
  9438             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9439             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9440             
       
  9441             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9442             {
       
  9443         
       
  9444                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
  9445                 return return_type_symbol;
       
  9446                 
       
  9447             }
       
  9448             
       
  9449             ERROR;
       
  9450         }
       
  9451         
       
  9452     }/*function_byte_to_int*/
       
  9453     break;
       
  9454 
       
  9455 /****
       
  9456  *BYTE_TO_DINT
       
  9457  */
       
  9458     case function_byte_to_dint :
       
  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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9474             {
       
  9475         
       
  9476                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
  9477                 return return_type_symbol;
       
  9478                 
       
  9479             }
       
  9480             
       
  9481             ERROR;
       
  9482         }
       
  9483         
       
  9484     }/*function_byte_to_dint*/
       
  9485     break;
       
  9486 
       
  9487 /****
       
  9488  *BYTE_TO_LINT
       
  9489  */
       
  9490     case function_byte_to_lint :
       
  9491     {
       
  9492         symbol_c *last_type_symbol = NULL;
       
  9493 
       
  9494         {
       
  9495             identifier_c param_name("IN");
       
  9496             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9497             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9498             
       
  9499             /* Get the value from a foo(<param_value>) style call */
       
  9500             if (IN_param_value == NULL)
       
  9501               IN_param_value = function_call_param_iterator.next();
       
  9502             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9503             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9504             
       
  9505             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9506             {
       
  9507         
       
  9508                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
  9509                 return return_type_symbol;
       
  9510                 
       
  9511             }
       
  9512             
       
  9513             ERROR;
       
  9514         }
       
  9515         
       
  9516     }/*function_byte_to_lint*/
       
  9517     break;
       
  9518 
       
  9519 /****
       
  9520  *BYTE_TO_USINT
       
  9521  */
       
  9522     case function_byte_to_usint :
       
  9523     {
       
  9524         symbol_c *last_type_symbol = NULL;
       
  9525 
       
  9526         {
       
  9527             identifier_c param_name("IN");
       
  9528             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9529             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9530             
       
  9531             /* Get the value from a foo(<param_value>) style call */
       
  9532             if (IN_param_value == NULL)
       
  9533               IN_param_value = function_call_param_iterator.next();
       
  9534             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9535             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9536             
       
  9537             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9538             {
       
  9539         
       
  9540                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
  9541                 return return_type_symbol;
       
  9542                 
       
  9543             }
       
  9544             
       
  9545             ERROR;
       
  9546         }
       
  9547         
       
  9548     }/*function_byte_to_usint*/
       
  9549     break;
       
  9550 
       
  9551 /****
       
  9552  *BYTE_TO_UINT
       
  9553  */
       
  9554     case function_byte_to_uint :
       
  9555     {
       
  9556         symbol_c *last_type_symbol = NULL;
       
  9557 
       
  9558         {
       
  9559             identifier_c param_name("IN");
       
  9560             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9561             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9562             
       
  9563             /* Get the value from a foo(<param_value>) style call */
       
  9564             if (IN_param_value == NULL)
       
  9565               IN_param_value = function_call_param_iterator.next();
       
  9566             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9567             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9568             
       
  9569             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9570             {
       
  9571         
       
  9572                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
  9573                 return return_type_symbol;
       
  9574                 
       
  9575             }
       
  9576             
       
  9577             ERROR;
       
  9578         }
       
  9579         
       
  9580     }/*function_byte_to_uint*/
       
  9581     break;
       
  9582 
       
  9583 /****
       
  9584  *BYTE_TO_UDINT
       
  9585  */
       
  9586     case function_byte_to_udint :
       
  9587     {
       
  9588         symbol_c *last_type_symbol = NULL;
       
  9589 
       
  9590         {
       
  9591             identifier_c param_name("IN");
       
  9592             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9593             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9594             
       
  9595             /* Get the value from a foo(<param_value>) style call */
       
  9596             if (IN_param_value == NULL)
       
  9597               IN_param_value = function_call_param_iterator.next();
       
  9598             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9599             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9600             
       
  9601             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9602             {
       
  9603         
       
  9604                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
  9605                 return return_type_symbol;
       
  9606                 
       
  9607             }
       
  9608             
       
  9609             ERROR;
       
  9610         }
       
  9611         
       
  9612     }/*function_byte_to_udint*/
       
  9613     break;
       
  9614 
       
  9615 /****
       
  9616  *BYTE_TO_ULINT
       
  9617  */
       
  9618     case function_byte_to_ulint :
       
  9619     {
       
  9620         symbol_c *last_type_symbol = NULL;
       
  9621 
       
  9622         {
       
  9623             identifier_c param_name("IN");
       
  9624             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9625             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9626             
       
  9627             /* Get the value from a foo(<param_value>) style call */
       
  9628             if (IN_param_value == NULL)
       
  9629               IN_param_value = function_call_param_iterator.next();
       
  9630             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9631             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9632             
       
  9633             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9634             {
       
  9635         
       
  9636                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
  9637                 return return_type_symbol;
       
  9638                 
       
  9639             }
       
  9640             
       
  9641             ERROR;
       
  9642         }
       
  9643         
       
  9644     }/*function_byte_to_ulint*/
       
  9645     break;
       
  9646 
       
  9647 /****
       
  9648  *BYTE_TO_REAL
       
  9649  */
       
  9650     case function_byte_to_real :
       
  9651     {
       
  9652         symbol_c *last_type_symbol = NULL;
       
  9653 
       
  9654         {
       
  9655             identifier_c param_name("IN");
       
  9656             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9657             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9658             
       
  9659             /* Get the value from a foo(<param_value>) style call */
       
  9660             if (IN_param_value == NULL)
       
  9661               IN_param_value = function_call_param_iterator.next();
       
  9662             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9663             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9664             
       
  9665             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9666             {
       
  9667         
       
  9668                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
  9669                 return return_type_symbol;
       
  9670                 
       
  9671             }
       
  9672             
       
  9673             ERROR;
       
  9674         }
       
  9675         
       
  9676     }/*function_byte_to_real*/
       
  9677     break;
       
  9678 
       
  9679 /****
       
  9680  *BYTE_TO_LREAL
       
  9681  */
       
  9682     case function_byte_to_lreal :
       
  9683     {
       
  9684         symbol_c *last_type_symbol = NULL;
       
  9685 
       
  9686         {
       
  9687             identifier_c param_name("IN");
       
  9688             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9689             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9690             
       
  9691             /* Get the value from a foo(<param_value>) style call */
       
  9692             if (IN_param_value == NULL)
       
  9693               IN_param_value = function_call_param_iterator.next();
       
  9694             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9695             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9696             
       
  9697             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9698             {
       
  9699         
       
  9700                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
  9701                 return return_type_symbol;
       
  9702                 
       
  9703             }
       
  9704             
       
  9705             ERROR;
       
  9706         }
       
  9707         
       
  9708     }/*function_byte_to_lreal*/
       
  9709     break;
       
  9710 
       
  9711 /****
       
  9712  *BYTE_TO_TIME
       
  9713  */
       
  9714     case function_byte_to_time :
       
  9715     {
       
  9716         symbol_c *last_type_symbol = NULL;
       
  9717 
       
  9718         {
       
  9719             identifier_c param_name("IN");
       
  9720             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9721             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9722             
       
  9723             /* Get the value from a foo(<param_value>) style call */
       
  9724             if (IN_param_value == NULL)
       
  9725               IN_param_value = function_call_param_iterator.next();
       
  9726             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9727             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9728             
       
  9729             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9730             {
       
  9731         
       
  9732                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
  9733                 return return_type_symbol;
       
  9734                 
       
  9735             }
       
  9736             
       
  9737             ERROR;
       
  9738         }
       
  9739         
       
  9740     }/*function_byte_to_time*/
       
  9741     break;
       
  9742 
       
  9743 /****
       
  9744  *BYTE_TO_DATE
       
  9745  */
       
  9746     case function_byte_to_date :
       
  9747     {
       
  9748         symbol_c *last_type_symbol = NULL;
       
  9749 
       
  9750         {
       
  9751             identifier_c param_name("IN");
       
  9752             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9753             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9754             
       
  9755             /* Get the value from a foo(<param_value>) style call */
       
  9756             if (IN_param_value == NULL)
       
  9757               IN_param_value = function_call_param_iterator.next();
       
  9758             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9759             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9760             
       
  9761             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9762             {
       
  9763         
       
  9764                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
  9765                 return return_type_symbol;
       
  9766                 
       
  9767             }
       
  9768             
       
  9769             ERROR;
       
  9770         }
       
  9771         
       
  9772     }/*function_byte_to_date*/
       
  9773     break;
       
  9774 
       
  9775 /****
       
  9776  *BYTE_TO_TOD
       
  9777  */
       
  9778     case function_byte_to_tod :
       
  9779     {
       
  9780         symbol_c *last_type_symbol = NULL;
       
  9781 
       
  9782         {
       
  9783             identifier_c param_name("IN");
       
  9784             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9785             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9786             
       
  9787             /* Get the value from a foo(<param_value>) style call */
       
  9788             if (IN_param_value == NULL)
       
  9789               IN_param_value = function_call_param_iterator.next();
       
  9790             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9791             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9792             
       
  9793             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9794             {
       
  9795         
       
  9796                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
  9797                 return return_type_symbol;
       
  9798                 
       
  9799             }
       
  9800             
       
  9801             ERROR;
       
  9802         }
       
  9803         
       
  9804     }/*function_byte_to_tod*/
       
  9805     break;
       
  9806 
       
  9807 /****
       
  9808  *BYTE_TO_DT
       
  9809  */
       
  9810     case function_byte_to_dt :
       
  9811     {
       
  9812         symbol_c *last_type_symbol = NULL;
       
  9813 
       
  9814         {
       
  9815             identifier_c param_name("IN");
       
  9816             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9817             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9818             
       
  9819             /* Get the value from a foo(<param_value>) style call */
       
  9820             if (IN_param_value == NULL)
       
  9821               IN_param_value = function_call_param_iterator.next();
       
  9822             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9823             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9824             
       
  9825             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9826             {
       
  9827         
       
  9828                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
  9829                 return return_type_symbol;
       
  9830                 
       
  9831             }
       
  9832             
       
  9833             ERROR;
       
  9834         }
       
  9835         
       
  9836     }/*function_byte_to_dt*/
       
  9837     break;
       
  9838 
       
  9839 /****
       
  9840  *BYTE_TO_STRING
       
  9841  */
       
  9842     case function_byte_to_string :
       
  9843     {
       
  9844         symbol_c *last_type_symbol = NULL;
       
  9845 
       
  9846         {
       
  9847             identifier_c param_name("IN");
       
  9848             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9849             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9850             
       
  9851             /* Get the value from a foo(<param_value>) style call */
       
  9852             if (IN_param_value == NULL)
       
  9853               IN_param_value = function_call_param_iterator.next();
       
  9854             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9855             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9856             
       
  9857             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9858             {
       
  9859         
       
  9860                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
  9861                 return return_type_symbol;
       
  9862                 
       
  9863             }
       
  9864             
       
  9865             ERROR;
       
  9866         }
       
  9867         
       
  9868     }/*function_byte_to_string*/
       
  9869     break;
       
  9870 
       
  9871 /****
       
  9872  *BYTE_TO_WORD
       
  9873  */
       
  9874     case function_byte_to_word :
       
  9875     {
       
  9876         symbol_c *last_type_symbol = NULL;
       
  9877 
       
  9878         {
       
  9879             identifier_c param_name("IN");
       
  9880             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9881             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9882             
       
  9883             /* Get the value from a foo(<param_value>) style call */
       
  9884             if (IN_param_value == NULL)
       
  9885               IN_param_value = function_call_param_iterator.next();
       
  9886             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9887             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9888             
       
  9889             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9890             {
       
  9891         
       
  9892                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
  9893                 return return_type_symbol;
       
  9894                 
       
  9895             }
       
  9896             
       
  9897             ERROR;
       
  9898         }
       
  9899         
       
  9900     }/*function_byte_to_word*/
       
  9901     break;
       
  9902 
       
  9903 /****
       
  9904  *BYTE_TO_DWORD
       
  9905  */
       
  9906     case function_byte_to_dword :
       
  9907     {
       
  9908         symbol_c *last_type_symbol = NULL;
       
  9909 
       
  9910         {
       
  9911             identifier_c param_name("IN");
       
  9912             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9913             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9914             
       
  9915             /* Get the value from a foo(<param_value>) style call */
       
  9916             if (IN_param_value == NULL)
       
  9917               IN_param_value = function_call_param_iterator.next();
       
  9918             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9919             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9920             
       
  9921             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9922             {
       
  9923         
       
  9924                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
  9925                 return return_type_symbol;
       
  9926                 
       
  9927             }
       
  9928             
       
  9929             ERROR;
       
  9930         }
       
  9931         
       
  9932     }/*function_byte_to_dword*/
       
  9933     break;
       
  9934 
       
  9935 /****
       
  9936  *BYTE_TO_LWORD
       
  9937  */
       
  9938     case function_byte_to_lword :
       
  9939     {
       
  9940         symbol_c *last_type_symbol = NULL;
       
  9941 
       
  9942         {
       
  9943             identifier_c param_name("IN");
       
  9944             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9945             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9946             
       
  9947             /* Get the value from a foo(<param_value>) style call */
       
  9948             if (IN_param_value == NULL)
       
  9949               IN_param_value = function_call_param_iterator.next();
       
  9950             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9951             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9952             
       
  9953             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
  9954             {
       
  9955         
       
  9956                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
  9957                 return return_type_symbol;
       
  9958                 
       
  9959             }
       
  9960             
       
  9961             ERROR;
       
  9962         }
       
  9963         
       
  9964     }/*function_byte_to_lword*/
       
  9965     break;
       
  9966 
       
  9967 /****
       
  9968  *WORD_TO_BOOL
       
  9969  */
       
  9970     case function_word_to_bool :
       
  9971     {
       
  9972         symbol_c *last_type_symbol = NULL;
       
  9973 
       
  9974         {
       
  9975             identifier_c param_name("IN");
       
  9976             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
  9977             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
  9978             
       
  9979             /* Get the value from a foo(<param_value>) style call */
       
  9980             if (IN_param_value == NULL)
       
  9981               IN_param_value = function_call_param_iterator.next();
       
  9982             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
  9983             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
  9984             
       
  9985             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
  9986             {
       
  9987         
       
  9988                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
  9989                 return return_type_symbol;
       
  9990                 
       
  9991             }
       
  9992             
       
  9993             ERROR;
       
  9994         }
       
  9995         
       
  9996     }/*function_word_to_bool*/
       
  9997     break;
       
  9998 
       
  9999 /****
       
 10000  *WORD_TO_SINT
       
 10001  */
       
 10002     case function_word_to_sint :
       
 10003     {
       
 10004         symbol_c *last_type_symbol = NULL;
       
 10005 
       
 10006         {
       
 10007             identifier_c param_name("IN");
       
 10008             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10009             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10010             
       
 10011             /* Get the value from a foo(<param_value>) style call */
       
 10012             if (IN_param_value == NULL)
       
 10013               IN_param_value = function_call_param_iterator.next();
       
 10014             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10015             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10016             
       
 10017             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10018             {
       
 10019         
       
 10020                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10021                 return return_type_symbol;
       
 10022                 
       
 10023             }
       
 10024             
       
 10025             ERROR;
       
 10026         }
       
 10027         
       
 10028     }/*function_word_to_sint*/
       
 10029     break;
       
 10030 
       
 10031 /****
       
 10032  *WORD_TO_INT
       
 10033  */
       
 10034     case function_word_to_int :
       
 10035     {
       
 10036         symbol_c *last_type_symbol = NULL;
       
 10037 
       
 10038         {
       
 10039             identifier_c param_name("IN");
       
 10040             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10041             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10042             
       
 10043             /* Get the value from a foo(<param_value>) style call */
       
 10044             if (IN_param_value == NULL)
       
 10045               IN_param_value = function_call_param_iterator.next();
       
 10046             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10047             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10048             
       
 10049             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10050             {
       
 10051         
       
 10052                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10053                 return return_type_symbol;
       
 10054                 
       
 10055             }
       
 10056             
       
 10057             ERROR;
       
 10058         }
       
 10059         
       
 10060     }/*function_word_to_int*/
       
 10061     break;
       
 10062 
       
 10063 /****
       
 10064  *WORD_TO_DINT
       
 10065  */
       
 10066     case function_word_to_dint :
       
 10067     {
       
 10068         symbol_c *last_type_symbol = NULL;
       
 10069 
       
 10070         {
       
 10071             identifier_c param_name("IN");
       
 10072             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10073             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10074             
       
 10075             /* Get the value from a foo(<param_value>) style call */
       
 10076             if (IN_param_value == NULL)
       
 10077               IN_param_value = function_call_param_iterator.next();
       
 10078             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10079             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10080             
       
 10081             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10082             {
       
 10083         
       
 10084                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10085                 return return_type_symbol;
       
 10086                 
       
 10087             }
       
 10088             
       
 10089             ERROR;
       
 10090         }
       
 10091         
       
 10092     }/*function_word_to_dint*/
       
 10093     break;
       
 10094 
       
 10095 /****
       
 10096  *WORD_TO_LINT
       
 10097  */
       
 10098     case function_word_to_lint :
       
 10099     {
       
 10100         symbol_c *last_type_symbol = NULL;
       
 10101 
       
 10102         {
       
 10103             identifier_c param_name("IN");
       
 10104             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10105             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10106             
       
 10107             /* Get the value from a foo(<param_value>) style call */
       
 10108             if (IN_param_value == NULL)
       
 10109               IN_param_value = function_call_param_iterator.next();
       
 10110             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10111             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10112             
       
 10113             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10114             {
       
 10115         
       
 10116                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10117                 return return_type_symbol;
       
 10118                 
       
 10119             }
       
 10120             
       
 10121             ERROR;
       
 10122         }
       
 10123         
       
 10124     }/*function_word_to_lint*/
       
 10125     break;
       
 10126 
       
 10127 /****
       
 10128  *WORD_TO_USINT
       
 10129  */
       
 10130     case function_word_to_usint :
       
 10131     {
       
 10132         symbol_c *last_type_symbol = NULL;
       
 10133 
       
 10134         {
       
 10135             identifier_c param_name("IN");
       
 10136             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10137             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10138             
       
 10139             /* Get the value from a foo(<param_value>) style call */
       
 10140             if (IN_param_value == NULL)
       
 10141               IN_param_value = function_call_param_iterator.next();
       
 10142             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10143             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10144             
       
 10145             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10146             {
       
 10147         
       
 10148                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10149                 return return_type_symbol;
       
 10150                 
       
 10151             }
       
 10152             
       
 10153             ERROR;
       
 10154         }
       
 10155         
       
 10156     }/*function_word_to_usint*/
       
 10157     break;
       
 10158 
       
 10159 /****
       
 10160  *WORD_TO_UINT
       
 10161  */
       
 10162     case function_word_to_uint :
       
 10163     {
       
 10164         symbol_c *last_type_symbol = NULL;
       
 10165 
       
 10166         {
       
 10167             identifier_c param_name("IN");
       
 10168             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10169             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10170             
       
 10171             /* Get the value from a foo(<param_value>) style call */
       
 10172             if (IN_param_value == NULL)
       
 10173               IN_param_value = function_call_param_iterator.next();
       
 10174             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10175             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10176             
       
 10177             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10178             {
       
 10179         
       
 10180                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10181                 return return_type_symbol;
       
 10182                 
       
 10183             }
       
 10184             
       
 10185             ERROR;
       
 10186         }
       
 10187         
       
 10188     }/*function_word_to_uint*/
       
 10189     break;
       
 10190 
       
 10191 /****
       
 10192  *WORD_TO_UDINT
       
 10193  */
       
 10194     case function_word_to_udint :
       
 10195     {
       
 10196         symbol_c *last_type_symbol = NULL;
       
 10197 
       
 10198         {
       
 10199             identifier_c param_name("IN");
       
 10200             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10201             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10202             
       
 10203             /* Get the value from a foo(<param_value>) style call */
       
 10204             if (IN_param_value == NULL)
       
 10205               IN_param_value = function_call_param_iterator.next();
       
 10206             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10207             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10208             
       
 10209             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10210             {
       
 10211         
       
 10212                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10213                 return return_type_symbol;
       
 10214                 
       
 10215             }
       
 10216             
       
 10217             ERROR;
       
 10218         }
       
 10219         
       
 10220     }/*function_word_to_udint*/
       
 10221     break;
       
 10222 
       
 10223 /****
       
 10224  *WORD_TO_ULINT
       
 10225  */
       
 10226     case function_word_to_ulint :
       
 10227     {
       
 10228         symbol_c *last_type_symbol = NULL;
       
 10229 
       
 10230         {
       
 10231             identifier_c param_name("IN");
       
 10232             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10233             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10234             
       
 10235             /* Get the value from a foo(<param_value>) style call */
       
 10236             if (IN_param_value == NULL)
       
 10237               IN_param_value = function_call_param_iterator.next();
       
 10238             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10239             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10240             
       
 10241             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10242             {
       
 10243         
       
 10244                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10245                 return return_type_symbol;
       
 10246                 
       
 10247             }
       
 10248             
       
 10249             ERROR;
       
 10250         }
       
 10251         
       
 10252     }/*function_word_to_ulint*/
       
 10253     break;
       
 10254 
       
 10255 /****
       
 10256  *WORD_TO_REAL
       
 10257  */
       
 10258     case function_word_to_real :
       
 10259     {
       
 10260         symbol_c *last_type_symbol = NULL;
       
 10261 
       
 10262         {
       
 10263             identifier_c param_name("IN");
       
 10264             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10265             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10266             
       
 10267             /* Get the value from a foo(<param_value>) style call */
       
 10268             if (IN_param_value == NULL)
       
 10269               IN_param_value = function_call_param_iterator.next();
       
 10270             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10271             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10272             
       
 10273             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10274             {
       
 10275         
       
 10276                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10277                 return return_type_symbol;
       
 10278                 
       
 10279             }
       
 10280             
       
 10281             ERROR;
       
 10282         }
       
 10283         
       
 10284     }/*function_word_to_real*/
       
 10285     break;
       
 10286 
       
 10287 /****
       
 10288  *WORD_TO_LREAL
       
 10289  */
       
 10290     case function_word_to_lreal :
       
 10291     {
       
 10292         symbol_c *last_type_symbol = NULL;
       
 10293 
       
 10294         {
       
 10295             identifier_c param_name("IN");
       
 10296             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10297             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10298             
       
 10299             /* Get the value from a foo(<param_value>) style call */
       
 10300             if (IN_param_value == NULL)
       
 10301               IN_param_value = function_call_param_iterator.next();
       
 10302             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10303             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10304             
       
 10305             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10306             {
       
 10307         
       
 10308                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10309                 return return_type_symbol;
       
 10310                 
       
 10311             }
       
 10312             
       
 10313             ERROR;
       
 10314         }
       
 10315         
       
 10316     }/*function_word_to_lreal*/
       
 10317     break;
       
 10318 
       
 10319 /****
       
 10320  *WORD_TO_TIME
       
 10321  */
       
 10322     case function_word_to_time :
       
 10323     {
       
 10324         symbol_c *last_type_symbol = NULL;
       
 10325 
       
 10326         {
       
 10327             identifier_c param_name("IN");
       
 10328             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10329             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10330             
       
 10331             /* Get the value from a foo(<param_value>) style call */
       
 10332             if (IN_param_value == NULL)
       
 10333               IN_param_value = function_call_param_iterator.next();
       
 10334             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10335             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10336             
       
 10337             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10338             {
       
 10339         
       
 10340                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10341                 return return_type_symbol;
       
 10342                 
       
 10343             }
       
 10344             
       
 10345             ERROR;
       
 10346         }
       
 10347         
       
 10348     }/*function_word_to_time*/
       
 10349     break;
       
 10350 
       
 10351 /****
       
 10352  *WORD_TO_DATE
       
 10353  */
       
 10354     case function_word_to_date :
       
 10355     {
       
 10356         symbol_c *last_type_symbol = NULL;
       
 10357 
       
 10358         {
       
 10359             identifier_c param_name("IN");
       
 10360             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10361             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10362             
       
 10363             /* Get the value from a foo(<param_value>) style call */
       
 10364             if (IN_param_value == NULL)
       
 10365               IN_param_value = function_call_param_iterator.next();
       
 10366             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10367             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10368             
       
 10369             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10370             {
       
 10371         
       
 10372                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10373                 return return_type_symbol;
       
 10374                 
       
 10375             }
       
 10376             
       
 10377             ERROR;
       
 10378         }
       
 10379         
       
 10380     }/*function_word_to_date*/
       
 10381     break;
       
 10382 
       
 10383 /****
       
 10384  *WORD_TO_TOD
       
 10385  */
       
 10386     case function_word_to_tod :
       
 10387     {
       
 10388         symbol_c *last_type_symbol = NULL;
       
 10389 
       
 10390         {
       
 10391             identifier_c param_name("IN");
       
 10392             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10393             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10394             
       
 10395             /* Get the value from a foo(<param_value>) style call */
       
 10396             if (IN_param_value == NULL)
       
 10397               IN_param_value = function_call_param_iterator.next();
       
 10398             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10399             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10400             
       
 10401             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10402             {
       
 10403         
       
 10404                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 10405                 return return_type_symbol;
       
 10406                 
       
 10407             }
       
 10408             
       
 10409             ERROR;
       
 10410         }
       
 10411         
       
 10412     }/*function_word_to_tod*/
       
 10413     break;
       
 10414 
       
 10415 /****
       
 10416  *WORD_TO_DT
       
 10417  */
       
 10418     case function_word_to_dt :
       
 10419     {
       
 10420         symbol_c *last_type_symbol = NULL;
       
 10421 
       
 10422         {
       
 10423             identifier_c param_name("IN");
       
 10424             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10425             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10426             
       
 10427             /* Get the value from a foo(<param_value>) style call */
       
 10428             if (IN_param_value == NULL)
       
 10429               IN_param_value = function_call_param_iterator.next();
       
 10430             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10431             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10432             
       
 10433             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10434             {
       
 10435         
       
 10436                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 10437                 return return_type_symbol;
       
 10438                 
       
 10439             }
       
 10440             
       
 10441             ERROR;
       
 10442         }
       
 10443         
       
 10444     }/*function_word_to_dt*/
       
 10445     break;
       
 10446 
       
 10447 /****
       
 10448  *WORD_TO_STRING
       
 10449  */
       
 10450     case function_word_to_string :
       
 10451     {
       
 10452         symbol_c *last_type_symbol = NULL;
       
 10453 
       
 10454         {
       
 10455             identifier_c param_name("IN");
       
 10456             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10457             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10458             
       
 10459             /* Get the value from a foo(<param_value>) style call */
       
 10460             if (IN_param_value == NULL)
       
 10461               IN_param_value = function_call_param_iterator.next();
       
 10462             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10463             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10464             
       
 10465             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10466             {
       
 10467         
       
 10468                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 10469                 return return_type_symbol;
       
 10470                 
       
 10471             }
       
 10472             
       
 10473             ERROR;
       
 10474         }
       
 10475         
       
 10476     }/*function_word_to_string*/
       
 10477     break;
       
 10478 
       
 10479 /****
       
 10480  *WORD_TO_BYTE
       
 10481  */
       
 10482     case function_word_to_byte :
       
 10483     {
       
 10484         symbol_c *last_type_symbol = NULL;
       
 10485 
       
 10486         {
       
 10487             identifier_c param_name("IN");
       
 10488             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10489             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10490             
       
 10491             /* Get the value from a foo(<param_value>) style call */
       
 10492             if (IN_param_value == NULL)
       
 10493               IN_param_value = function_call_param_iterator.next();
       
 10494             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10495             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10496             
       
 10497             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10498             {
       
 10499         
       
 10500                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 10501                 return return_type_symbol;
       
 10502                 
       
 10503             }
       
 10504             
       
 10505             ERROR;
       
 10506         }
       
 10507         
       
 10508     }/*function_word_to_byte*/
       
 10509     break;
       
 10510 
       
 10511 /****
       
 10512  *WORD_TO_DWORD
       
 10513  */
       
 10514     case function_word_to_dword :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10530             {
       
 10531         
       
 10532                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 10533                 return return_type_symbol;
       
 10534                 
       
 10535             }
       
 10536             
       
 10537             ERROR;
       
 10538         }
       
 10539         
       
 10540     }/*function_word_to_dword*/
       
 10541     break;
       
 10542 
       
 10543 /****
       
 10544  *WORD_TO_LWORD
       
 10545  */
       
 10546     case function_word_to_lword :
       
 10547     {
       
 10548         symbol_c *last_type_symbol = NULL;
       
 10549 
       
 10550         {
       
 10551             identifier_c param_name("IN");
       
 10552             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10553             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10554             
       
 10555             /* Get the value from a foo(<param_value>) style call */
       
 10556             if (IN_param_value == NULL)
       
 10557               IN_param_value = function_call_param_iterator.next();
       
 10558             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10559             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10560             
       
 10561             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 10562             {
       
 10563         
       
 10564                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 10565                 return return_type_symbol;
       
 10566                 
       
 10567             }
       
 10568             
       
 10569             ERROR;
       
 10570         }
       
 10571         
       
 10572     }/*function_word_to_lword*/
       
 10573     break;
       
 10574 
       
 10575 /****
       
 10576  *DWORD_TO_BOOL
       
 10577  */
       
 10578     case function_dword_to_bool :
       
 10579     {
       
 10580         symbol_c *last_type_symbol = NULL;
       
 10581 
       
 10582         {
       
 10583             identifier_c param_name("IN");
       
 10584             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10585             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10586             
       
 10587             /* Get the value from a foo(<param_value>) style call */
       
 10588             if (IN_param_value == NULL)
       
 10589               IN_param_value = function_call_param_iterator.next();
       
 10590             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10591             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10592             
       
 10593             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10594             {
       
 10595         
       
 10596                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 10597                 return return_type_symbol;
       
 10598                 
       
 10599             }
       
 10600             
       
 10601             ERROR;
       
 10602         }
       
 10603         
       
 10604     }/*function_dword_to_bool*/
       
 10605     break;
       
 10606 
       
 10607 /****
       
 10608  *DWORD_TO_SINT
       
 10609  */
       
 10610     case function_dword_to_sint :
       
 10611     {
       
 10612         symbol_c *last_type_symbol = NULL;
       
 10613 
       
 10614         {
       
 10615             identifier_c param_name("IN");
       
 10616             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10617             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10618             
       
 10619             /* Get the value from a foo(<param_value>) style call */
       
 10620             if (IN_param_value == NULL)
       
 10621               IN_param_value = function_call_param_iterator.next();
       
 10622             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10623             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10624             
       
 10625             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10626             {
       
 10627         
       
 10628                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 10629                 return return_type_symbol;
       
 10630                 
       
 10631             }
       
 10632             
       
 10633             ERROR;
       
 10634         }
       
 10635         
       
 10636     }/*function_dword_to_sint*/
       
 10637     break;
       
 10638 
       
 10639 /****
       
 10640  *DWORD_TO_INT
       
 10641  */
       
 10642     case function_dword_to_int :
       
 10643     {
       
 10644         symbol_c *last_type_symbol = NULL;
       
 10645 
       
 10646         {
       
 10647             identifier_c param_name("IN");
       
 10648             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10649             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10650             
       
 10651             /* Get the value from a foo(<param_value>) style call */
       
 10652             if (IN_param_value == NULL)
       
 10653               IN_param_value = function_call_param_iterator.next();
       
 10654             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10655             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10656             
       
 10657             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10658             {
       
 10659         
       
 10660                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 10661                 return return_type_symbol;
       
 10662                 
       
 10663             }
       
 10664             
       
 10665             ERROR;
       
 10666         }
       
 10667         
       
 10668     }/*function_dword_to_int*/
       
 10669     break;
       
 10670 
       
 10671 /****
       
 10672  *DWORD_TO_DINT
       
 10673  */
       
 10674     case function_dword_to_dint :
       
 10675     {
       
 10676         symbol_c *last_type_symbol = NULL;
       
 10677 
       
 10678         {
       
 10679             identifier_c param_name("IN");
       
 10680             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10681             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10682             
       
 10683             /* Get the value from a foo(<param_value>) style call */
       
 10684             if (IN_param_value == NULL)
       
 10685               IN_param_value = function_call_param_iterator.next();
       
 10686             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10687             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10688             
       
 10689             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10690             {
       
 10691         
       
 10692                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 10693                 return return_type_symbol;
       
 10694                 
       
 10695             }
       
 10696             
       
 10697             ERROR;
       
 10698         }
       
 10699         
       
 10700     }/*function_dword_to_dint*/
       
 10701     break;
       
 10702 
       
 10703 /****
       
 10704  *DWORD_TO_LINT
       
 10705  */
       
 10706     case function_dword_to_lint :
       
 10707     {
       
 10708         symbol_c *last_type_symbol = NULL;
       
 10709 
       
 10710         {
       
 10711             identifier_c param_name("IN");
       
 10712             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10713             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10714             
       
 10715             /* Get the value from a foo(<param_value>) style call */
       
 10716             if (IN_param_value == NULL)
       
 10717               IN_param_value = function_call_param_iterator.next();
       
 10718             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10719             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10720             
       
 10721             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10722             {
       
 10723         
       
 10724                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 10725                 return return_type_symbol;
       
 10726                 
       
 10727             }
       
 10728             
       
 10729             ERROR;
       
 10730         }
       
 10731         
       
 10732     }/*function_dword_to_lint*/
       
 10733     break;
       
 10734 
       
 10735 /****
       
 10736  *DWORD_TO_USINT
       
 10737  */
       
 10738     case function_dword_to_usint :
       
 10739     {
       
 10740         symbol_c *last_type_symbol = NULL;
       
 10741 
       
 10742         {
       
 10743             identifier_c param_name("IN");
       
 10744             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10745             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10746             
       
 10747             /* Get the value from a foo(<param_value>) style call */
       
 10748             if (IN_param_value == NULL)
       
 10749               IN_param_value = function_call_param_iterator.next();
       
 10750             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10751             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10752             
       
 10753             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10754             {
       
 10755         
       
 10756                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 10757                 return return_type_symbol;
       
 10758                 
       
 10759             }
       
 10760             
       
 10761             ERROR;
       
 10762         }
       
 10763         
       
 10764     }/*function_dword_to_usint*/
       
 10765     break;
       
 10766 
       
 10767 /****
       
 10768  *DWORD_TO_UINT
       
 10769  */
       
 10770     case function_dword_to_uint :
       
 10771     {
       
 10772         symbol_c *last_type_symbol = NULL;
       
 10773 
       
 10774         {
       
 10775             identifier_c param_name("IN");
       
 10776             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10777             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10778             
       
 10779             /* Get the value from a foo(<param_value>) style call */
       
 10780             if (IN_param_value == NULL)
       
 10781               IN_param_value = function_call_param_iterator.next();
       
 10782             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10783             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10784             
       
 10785             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10786             {
       
 10787         
       
 10788                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 10789                 return return_type_symbol;
       
 10790                 
       
 10791             }
       
 10792             
       
 10793             ERROR;
       
 10794         }
       
 10795         
       
 10796     }/*function_dword_to_uint*/
       
 10797     break;
       
 10798 
       
 10799 /****
       
 10800  *DWORD_TO_UDINT
       
 10801  */
       
 10802     case function_dword_to_udint :
       
 10803     {
       
 10804         symbol_c *last_type_symbol = NULL;
       
 10805 
       
 10806         {
       
 10807             identifier_c param_name("IN");
       
 10808             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10809             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10810             
       
 10811             /* Get the value from a foo(<param_value>) style call */
       
 10812             if (IN_param_value == NULL)
       
 10813               IN_param_value = function_call_param_iterator.next();
       
 10814             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10815             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10816             
       
 10817             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10818             {
       
 10819         
       
 10820                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 10821                 return return_type_symbol;
       
 10822                 
       
 10823             }
       
 10824             
       
 10825             ERROR;
       
 10826         }
       
 10827         
       
 10828     }/*function_dword_to_udint*/
       
 10829     break;
       
 10830 
       
 10831 /****
       
 10832  *DWORD_TO_ULINT
       
 10833  */
       
 10834     case function_dword_to_ulint :
       
 10835     {
       
 10836         symbol_c *last_type_symbol = NULL;
       
 10837 
       
 10838         {
       
 10839             identifier_c param_name("IN");
       
 10840             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10841             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10842             
       
 10843             /* Get the value from a foo(<param_value>) style call */
       
 10844             if (IN_param_value == NULL)
       
 10845               IN_param_value = function_call_param_iterator.next();
       
 10846             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10847             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10848             
       
 10849             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10850             {
       
 10851         
       
 10852                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 10853                 return return_type_symbol;
       
 10854                 
       
 10855             }
       
 10856             
       
 10857             ERROR;
       
 10858         }
       
 10859         
       
 10860     }/*function_dword_to_ulint*/
       
 10861     break;
       
 10862 
       
 10863 /****
       
 10864  *DWORD_TO_REAL
       
 10865  */
       
 10866     case function_dword_to_real :
       
 10867     {
       
 10868         symbol_c *last_type_symbol = NULL;
       
 10869 
       
 10870         {
       
 10871             identifier_c param_name("IN");
       
 10872             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10873             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10874             
       
 10875             /* Get the value from a foo(<param_value>) style call */
       
 10876             if (IN_param_value == NULL)
       
 10877               IN_param_value = function_call_param_iterator.next();
       
 10878             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10879             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10880             
       
 10881             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10882             {
       
 10883         
       
 10884                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 10885                 return return_type_symbol;
       
 10886                 
       
 10887             }
       
 10888             
       
 10889             ERROR;
       
 10890         }
       
 10891         
       
 10892     }/*function_dword_to_real*/
       
 10893     break;
       
 10894 
       
 10895 /****
       
 10896  *DWORD_TO_LREAL
       
 10897  */
       
 10898     case function_dword_to_lreal :
       
 10899     {
       
 10900         symbol_c *last_type_symbol = NULL;
       
 10901 
       
 10902         {
       
 10903             identifier_c param_name("IN");
       
 10904             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10905             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10906             
       
 10907             /* Get the value from a foo(<param_value>) style call */
       
 10908             if (IN_param_value == NULL)
       
 10909               IN_param_value = function_call_param_iterator.next();
       
 10910             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10911             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10912             
       
 10913             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10914             {
       
 10915         
       
 10916                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 10917                 return return_type_symbol;
       
 10918                 
       
 10919             }
       
 10920             
       
 10921             ERROR;
       
 10922         }
       
 10923         
       
 10924     }/*function_dword_to_lreal*/
       
 10925     break;
       
 10926 
       
 10927 /****
       
 10928  *DWORD_TO_TIME
       
 10929  */
       
 10930     case function_dword_to_time :
       
 10931     {
       
 10932         symbol_c *last_type_symbol = NULL;
       
 10933 
       
 10934         {
       
 10935             identifier_c param_name("IN");
       
 10936             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10937             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10938             
       
 10939             /* Get the value from a foo(<param_value>) style call */
       
 10940             if (IN_param_value == NULL)
       
 10941               IN_param_value = function_call_param_iterator.next();
       
 10942             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10943             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10944             
       
 10945             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10946             {
       
 10947         
       
 10948                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 10949                 return return_type_symbol;
       
 10950                 
       
 10951             }
       
 10952             
       
 10953             ERROR;
       
 10954         }
       
 10955         
       
 10956     }/*function_dword_to_time*/
       
 10957     break;
       
 10958 
       
 10959 /****
       
 10960  *DWORD_TO_DATE
       
 10961  */
       
 10962     case function_dword_to_date :
       
 10963     {
       
 10964         symbol_c *last_type_symbol = NULL;
       
 10965 
       
 10966         {
       
 10967             identifier_c param_name("IN");
       
 10968             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 10969             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 10970             
       
 10971             /* Get the value from a foo(<param_value>) style call */
       
 10972             if (IN_param_value == NULL)
       
 10973               IN_param_value = function_call_param_iterator.next();
       
 10974             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 10975             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 10976             
       
 10977             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 10978             {
       
 10979         
       
 10980                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 10981                 return return_type_symbol;
       
 10982                 
       
 10983             }
       
 10984             
       
 10985             ERROR;
       
 10986         }
       
 10987         
       
 10988     }/*function_dword_to_date*/
       
 10989     break;
       
 10990 
       
 10991 /****
       
 10992  *DWORD_TO_TOD
       
 10993  */
       
 10994     case function_dword_to_tod :
       
 10995     {
       
 10996         symbol_c *last_type_symbol = NULL;
       
 10997 
       
 10998         {
       
 10999             identifier_c param_name("IN");
       
 11000             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11001             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11002             
       
 11003             /* Get the value from a foo(<param_value>) style call */
       
 11004             if (IN_param_value == NULL)
       
 11005               IN_param_value = function_call_param_iterator.next();
       
 11006             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11007             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11008             
       
 11009             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 11010             {
       
 11011         
       
 11012                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11013                 return return_type_symbol;
       
 11014                 
       
 11015             }
       
 11016             
       
 11017             ERROR;
       
 11018         }
       
 11019         
       
 11020     }/*function_dword_to_tod*/
       
 11021     break;
       
 11022 
       
 11023 /****
       
 11024  *DWORD_TO_DT
       
 11025  */
       
 11026     case function_dword_to_dt :
       
 11027     {
       
 11028         symbol_c *last_type_symbol = NULL;
       
 11029 
       
 11030         {
       
 11031             identifier_c param_name("IN");
       
 11032             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11033             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11034             
       
 11035             /* Get the value from a foo(<param_value>) style call */
       
 11036             if (IN_param_value == NULL)
       
 11037               IN_param_value = function_call_param_iterator.next();
       
 11038             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11039             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11040             
       
 11041             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 11042             {
       
 11043         
       
 11044                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11045                 return return_type_symbol;
       
 11046                 
       
 11047             }
       
 11048             
       
 11049             ERROR;
       
 11050         }
       
 11051         
       
 11052     }/*function_dword_to_dt*/
       
 11053     break;
       
 11054 
       
 11055 /****
       
 11056  *DWORD_TO_STRING
       
 11057  */
       
 11058     case function_dword_to_string :
       
 11059     {
       
 11060         symbol_c *last_type_symbol = NULL;
       
 11061 
       
 11062         {
       
 11063             identifier_c param_name("IN");
       
 11064             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11065             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11066             
       
 11067             /* Get the value from a foo(<param_value>) style call */
       
 11068             if (IN_param_value == NULL)
       
 11069               IN_param_value = function_call_param_iterator.next();
       
 11070             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11071             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11072             
       
 11073             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 11074             {
       
 11075         
       
 11076                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11077                 return return_type_symbol;
       
 11078                 
       
 11079             }
       
 11080             
       
 11081             ERROR;
       
 11082         }
       
 11083         
       
 11084     }/*function_dword_to_string*/
       
 11085     break;
       
 11086 
       
 11087 /****
       
 11088  *DWORD_TO_BYTE
       
 11089  */
       
 11090     case function_dword_to_byte :
       
 11091     {
       
 11092         symbol_c *last_type_symbol = NULL;
       
 11093 
       
 11094         {
       
 11095             identifier_c param_name("IN");
       
 11096             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11097             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11098             
       
 11099             /* Get the value from a foo(<param_value>) style call */
       
 11100             if (IN_param_value == NULL)
       
 11101               IN_param_value = function_call_param_iterator.next();
       
 11102             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11103             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11104             
       
 11105             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 11106             {
       
 11107         
       
 11108                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11109                 return return_type_symbol;
       
 11110                 
       
 11111             }
       
 11112             
       
 11113             ERROR;
       
 11114         }
       
 11115         
       
 11116     }/*function_dword_to_byte*/
       
 11117     break;
       
 11118 
       
 11119 /****
       
 11120  *DWORD_TO_WORD
       
 11121  */
       
 11122     case function_dword_to_word :
       
 11123     {
       
 11124         symbol_c *last_type_symbol = NULL;
       
 11125 
       
 11126         {
       
 11127             identifier_c param_name("IN");
       
 11128             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11129             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11130             
       
 11131             /* Get the value from a foo(<param_value>) style call */
       
 11132             if (IN_param_value == NULL)
       
 11133               IN_param_value = function_call_param_iterator.next();
       
 11134             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11135             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11136             
       
 11137             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 11138             {
       
 11139         
       
 11140                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11141                 return return_type_symbol;
       
 11142                 
       
 11143             }
       
 11144             
       
 11145             ERROR;
       
 11146         }
       
 11147         
       
 11148     }/*function_dword_to_word*/
       
 11149     break;
       
 11150 
       
 11151 /****
       
 11152  *DWORD_TO_LWORD
       
 11153  */
       
 11154     case function_dword_to_lword :
       
 11155     {
       
 11156         symbol_c *last_type_symbol = NULL;
       
 11157 
       
 11158         {
       
 11159             identifier_c param_name("IN");
       
 11160             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11161             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11162             
       
 11163             /* Get the value from a foo(<param_value>) style call */
       
 11164             if (IN_param_value == NULL)
       
 11165               IN_param_value = function_call_param_iterator.next();
       
 11166             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11167             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11168             
       
 11169             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 11170             {
       
 11171         
       
 11172                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 11173                 return return_type_symbol;
       
 11174                 
       
 11175             }
       
 11176             
       
 11177             ERROR;
       
 11178         }
       
 11179         
       
 11180     }/*function_dword_to_lword*/
       
 11181     break;
       
 11182 
       
 11183 /****
       
 11184  *LWORD_TO_BOOL
       
 11185  */
       
 11186     case function_lword_to_bool :
       
 11187     {
       
 11188         symbol_c *last_type_symbol = NULL;
       
 11189 
       
 11190         {
       
 11191             identifier_c param_name("IN");
       
 11192             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11193             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11194             
       
 11195             /* Get the value from a foo(<param_value>) style call */
       
 11196             if (IN_param_value == NULL)
       
 11197               IN_param_value = function_call_param_iterator.next();
       
 11198             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11199             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11200             
       
 11201             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11202             {
       
 11203         
       
 11204                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 11205                 return return_type_symbol;
       
 11206                 
       
 11207             }
       
 11208             
       
 11209             ERROR;
       
 11210         }
       
 11211         
       
 11212     }/*function_lword_to_bool*/
       
 11213     break;
       
 11214 
       
 11215 /****
       
 11216  *LWORD_TO_SINT
       
 11217  */
       
 11218     case function_lword_to_sint :
       
 11219     {
       
 11220         symbol_c *last_type_symbol = NULL;
       
 11221 
       
 11222         {
       
 11223             identifier_c param_name("IN");
       
 11224             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11225             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11226             
       
 11227             /* Get the value from a foo(<param_value>) style call */
       
 11228             if (IN_param_value == NULL)
       
 11229               IN_param_value = function_call_param_iterator.next();
       
 11230             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11231             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11232             
       
 11233             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11234             {
       
 11235         
       
 11236                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 11237                 return return_type_symbol;
       
 11238                 
       
 11239             }
       
 11240             
       
 11241             ERROR;
       
 11242         }
       
 11243         
       
 11244     }/*function_lword_to_sint*/
       
 11245     break;
       
 11246 
       
 11247 /****
       
 11248  *LWORD_TO_INT
       
 11249  */
       
 11250     case function_lword_to_int :
       
 11251     {
       
 11252         symbol_c *last_type_symbol = NULL;
       
 11253 
       
 11254         {
       
 11255             identifier_c param_name("IN");
       
 11256             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11257             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11258             
       
 11259             /* Get the value from a foo(<param_value>) style call */
       
 11260             if (IN_param_value == NULL)
       
 11261               IN_param_value = function_call_param_iterator.next();
       
 11262             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11263             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11264             
       
 11265             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11266             {
       
 11267         
       
 11268                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 11269                 return return_type_symbol;
       
 11270                 
       
 11271             }
       
 11272             
       
 11273             ERROR;
       
 11274         }
       
 11275         
       
 11276     }/*function_lword_to_int*/
       
 11277     break;
       
 11278 
       
 11279 /****
       
 11280  *LWORD_TO_DINT
       
 11281  */
       
 11282     case function_lword_to_dint :
       
 11283     {
       
 11284         symbol_c *last_type_symbol = NULL;
       
 11285 
       
 11286         {
       
 11287             identifier_c param_name("IN");
       
 11288             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11289             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11290             
       
 11291             /* Get the value from a foo(<param_value>) style call */
       
 11292             if (IN_param_value == NULL)
       
 11293               IN_param_value = function_call_param_iterator.next();
       
 11294             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11295             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11296             
       
 11297             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11298             {
       
 11299         
       
 11300                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 11301                 return return_type_symbol;
       
 11302                 
       
 11303             }
       
 11304             
       
 11305             ERROR;
       
 11306         }
       
 11307         
       
 11308     }/*function_lword_to_dint*/
       
 11309     break;
       
 11310 
       
 11311 /****
       
 11312  *LWORD_TO_LINT
       
 11313  */
       
 11314     case function_lword_to_lint :
       
 11315     {
       
 11316         symbol_c *last_type_symbol = NULL;
       
 11317 
       
 11318         {
       
 11319             identifier_c param_name("IN");
       
 11320             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11321             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11322             
       
 11323             /* Get the value from a foo(<param_value>) style call */
       
 11324             if (IN_param_value == NULL)
       
 11325               IN_param_value = function_call_param_iterator.next();
       
 11326             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11327             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11328             
       
 11329             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11330             {
       
 11331         
       
 11332                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 11333                 return return_type_symbol;
       
 11334                 
       
 11335             }
       
 11336             
       
 11337             ERROR;
       
 11338         }
       
 11339         
       
 11340     }/*function_lword_to_lint*/
       
 11341     break;
       
 11342 
       
 11343 /****
       
 11344  *LWORD_TO_USINT
       
 11345  */
       
 11346     case function_lword_to_usint :
       
 11347     {
       
 11348         symbol_c *last_type_symbol = NULL;
       
 11349 
       
 11350         {
       
 11351             identifier_c param_name("IN");
       
 11352             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11353             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11354             
       
 11355             /* Get the value from a foo(<param_value>) style call */
       
 11356             if (IN_param_value == NULL)
       
 11357               IN_param_value = function_call_param_iterator.next();
       
 11358             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11359             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11360             
       
 11361             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11362             {
       
 11363         
       
 11364                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11365                 return return_type_symbol;
       
 11366                 
       
 11367             }
       
 11368             
       
 11369             ERROR;
       
 11370         }
       
 11371         
       
 11372     }/*function_lword_to_usint*/
       
 11373     break;
       
 11374 
       
 11375 /****
       
 11376  *LWORD_TO_UINT
       
 11377  */
       
 11378     case function_lword_to_uint :
       
 11379     {
       
 11380         symbol_c *last_type_symbol = NULL;
       
 11381 
       
 11382         {
       
 11383             identifier_c param_name("IN");
       
 11384             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11385             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11386             
       
 11387             /* Get the value from a foo(<param_value>) style call */
       
 11388             if (IN_param_value == NULL)
       
 11389               IN_param_value = function_call_param_iterator.next();
       
 11390             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11391             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11392             
       
 11393             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11394             {
       
 11395         
       
 11396                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11397                 return return_type_symbol;
       
 11398                 
       
 11399             }
       
 11400             
       
 11401             ERROR;
       
 11402         }
       
 11403         
       
 11404     }/*function_lword_to_uint*/
       
 11405     break;
       
 11406 
       
 11407 /****
       
 11408  *LWORD_TO_UDINT
       
 11409  */
       
 11410     case function_lword_to_udint :
       
 11411     {
       
 11412         symbol_c *last_type_symbol = NULL;
       
 11413 
       
 11414         {
       
 11415             identifier_c param_name("IN");
       
 11416             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11417             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11418             
       
 11419             /* Get the value from a foo(<param_value>) style call */
       
 11420             if (IN_param_value == NULL)
       
 11421               IN_param_value = function_call_param_iterator.next();
       
 11422             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11423             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11424             
       
 11425             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11426             {
       
 11427         
       
 11428                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11429                 return return_type_symbol;
       
 11430                 
       
 11431             }
       
 11432             
       
 11433             ERROR;
       
 11434         }
       
 11435         
       
 11436     }/*function_lword_to_udint*/
       
 11437     break;
       
 11438 
       
 11439 /****
       
 11440  *LWORD_TO_ULINT
       
 11441  */
       
 11442     case function_lword_to_ulint :
       
 11443     {
       
 11444         symbol_c *last_type_symbol = NULL;
       
 11445 
       
 11446         {
       
 11447             identifier_c param_name("IN");
       
 11448             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11449             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11450             
       
 11451             /* Get the value from a foo(<param_value>) style call */
       
 11452             if (IN_param_value == NULL)
       
 11453               IN_param_value = function_call_param_iterator.next();
       
 11454             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11455             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11456             
       
 11457             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11458             {
       
 11459         
       
 11460                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11461                 return return_type_symbol;
       
 11462                 
       
 11463             }
       
 11464             
       
 11465             ERROR;
       
 11466         }
       
 11467         
       
 11468     }/*function_lword_to_ulint*/
       
 11469     break;
       
 11470 
       
 11471 /****
       
 11472  *LWORD_TO_REAL
       
 11473  */
       
 11474     case function_lword_to_real :
       
 11475     {
       
 11476         symbol_c *last_type_symbol = NULL;
       
 11477 
       
 11478         {
       
 11479             identifier_c param_name("IN");
       
 11480             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11481             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11482             
       
 11483             /* Get the value from a foo(<param_value>) style call */
       
 11484             if (IN_param_value == NULL)
       
 11485               IN_param_value = function_call_param_iterator.next();
       
 11486             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11487             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11488             
       
 11489             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11490             {
       
 11491         
       
 11492                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 11493                 return return_type_symbol;
       
 11494                 
       
 11495             }
       
 11496             
       
 11497             ERROR;
       
 11498         }
       
 11499         
       
 11500     }/*function_lword_to_real*/
       
 11501     break;
       
 11502 
       
 11503 /****
       
 11504  *LWORD_TO_LREAL
       
 11505  */
       
 11506     case function_lword_to_lreal :
       
 11507     {
       
 11508         symbol_c *last_type_symbol = NULL;
       
 11509 
       
 11510         {
       
 11511             identifier_c param_name("IN");
       
 11512             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11513             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11514             
       
 11515             /* Get the value from a foo(<param_value>) style call */
       
 11516             if (IN_param_value == NULL)
       
 11517               IN_param_value = function_call_param_iterator.next();
       
 11518             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11519             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11520             
       
 11521             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11522             {
       
 11523         
       
 11524                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 11525                 return return_type_symbol;
       
 11526                 
       
 11527             }
       
 11528             
       
 11529             ERROR;
       
 11530         }
       
 11531         
       
 11532     }/*function_lword_to_lreal*/
       
 11533     break;
       
 11534 
       
 11535 /****
       
 11536  *LWORD_TO_TIME
       
 11537  */
       
 11538     case function_lword_to_time :
       
 11539     {
       
 11540         symbol_c *last_type_symbol = NULL;
       
 11541 
       
 11542         {
       
 11543             identifier_c param_name("IN");
       
 11544             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11545             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11546             
       
 11547             /* Get the value from a foo(<param_value>) style call */
       
 11548             if (IN_param_value == NULL)
       
 11549               IN_param_value = function_call_param_iterator.next();
       
 11550             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11551             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11552             
       
 11553             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11554             {
       
 11555         
       
 11556                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 11557                 return return_type_symbol;
       
 11558                 
       
 11559             }
       
 11560             
       
 11561             ERROR;
       
 11562         }
       
 11563         
       
 11564     }/*function_lword_to_time*/
       
 11565     break;
       
 11566 
       
 11567 /****
       
 11568  *LWORD_TO_DATE
       
 11569  */
       
 11570     case function_lword_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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11586             {
       
 11587         
       
 11588                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 11589                 return return_type_symbol;
       
 11590                 
       
 11591             }
       
 11592             
       
 11593             ERROR;
       
 11594         }
       
 11595         
       
 11596     }/*function_lword_to_date*/
       
 11597     break;
       
 11598 
       
 11599 /****
       
 11600  *LWORD_TO_TOD
       
 11601  */
       
 11602     case function_lword_to_tod :
       
 11603     {
       
 11604         symbol_c *last_type_symbol = NULL;
       
 11605 
       
 11606         {
       
 11607             identifier_c param_name("IN");
       
 11608             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11609             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11610             
       
 11611             /* Get the value from a foo(<param_value>) style call */
       
 11612             if (IN_param_value == NULL)
       
 11613               IN_param_value = function_call_param_iterator.next();
       
 11614             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11615             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11616             
       
 11617             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11618             {
       
 11619         
       
 11620                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 11621                 return return_type_symbol;
       
 11622                 
       
 11623             }
       
 11624             
       
 11625             ERROR;
       
 11626         }
       
 11627         
       
 11628     }/*function_lword_to_tod*/
       
 11629     break;
       
 11630 
       
 11631 /****
       
 11632  *LWORD_TO_DT
       
 11633  */
       
 11634     case function_lword_to_dt :
       
 11635     {
       
 11636         symbol_c *last_type_symbol = NULL;
       
 11637 
       
 11638         {
       
 11639             identifier_c param_name("IN");
       
 11640             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11641             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11642             
       
 11643             /* Get the value from a foo(<param_value>) style call */
       
 11644             if (IN_param_value == NULL)
       
 11645               IN_param_value = function_call_param_iterator.next();
       
 11646             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11647             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11648             
       
 11649             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11650             {
       
 11651         
       
 11652                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 11653                 return return_type_symbol;
       
 11654                 
       
 11655             }
       
 11656             
       
 11657             ERROR;
       
 11658         }
       
 11659         
       
 11660     }/*function_lword_to_dt*/
       
 11661     break;
       
 11662 
       
 11663 /****
       
 11664  *LWORD_TO_STRING
       
 11665  */
       
 11666     case function_lword_to_string :
       
 11667     {
       
 11668         symbol_c *last_type_symbol = NULL;
       
 11669 
       
 11670         {
       
 11671             identifier_c param_name("IN");
       
 11672             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11673             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11674             
       
 11675             /* Get the value from a foo(<param_value>) style call */
       
 11676             if (IN_param_value == NULL)
       
 11677               IN_param_value = function_call_param_iterator.next();
       
 11678             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11679             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11680             
       
 11681             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11682             {
       
 11683         
       
 11684                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 11685                 return return_type_symbol;
       
 11686                 
       
 11687             }
       
 11688             
       
 11689             ERROR;
       
 11690         }
       
 11691         
       
 11692     }/*function_lword_to_string*/
       
 11693     break;
       
 11694 
       
 11695 /****
       
 11696  *LWORD_TO_BYTE
       
 11697  */
       
 11698     case function_lword_to_byte :
       
 11699     {
       
 11700         symbol_c *last_type_symbol = NULL;
       
 11701 
       
 11702         {
       
 11703             identifier_c param_name("IN");
       
 11704             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11705             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11706             
       
 11707             /* Get the value from a foo(<param_value>) style call */
       
 11708             if (IN_param_value == NULL)
       
 11709               IN_param_value = function_call_param_iterator.next();
       
 11710             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11711             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11712             
       
 11713             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11714             {
       
 11715         
       
 11716                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 11717                 return return_type_symbol;
       
 11718                 
       
 11719             }
       
 11720             
       
 11721             ERROR;
       
 11722         }
       
 11723         
       
 11724     }/*function_lword_to_byte*/
       
 11725     break;
       
 11726 
       
 11727 /****
       
 11728  *LWORD_TO_WORD
       
 11729  */
       
 11730     case function_lword_to_word :
       
 11731     {
       
 11732         symbol_c *last_type_symbol = NULL;
       
 11733 
       
 11734         {
       
 11735             identifier_c param_name("IN");
       
 11736             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11737             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11738             
       
 11739             /* Get the value from a foo(<param_value>) style call */
       
 11740             if (IN_param_value == NULL)
       
 11741               IN_param_value = function_call_param_iterator.next();
       
 11742             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11743             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11744             
       
 11745             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11746             {
       
 11747         
       
 11748                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 11749                 return return_type_symbol;
       
 11750                 
       
 11751             }
       
 11752             
       
 11753             ERROR;
       
 11754         }
       
 11755         
       
 11756     }/*function_lword_to_word*/
       
 11757     break;
       
 11758 
       
 11759 /****
       
 11760  *LWORD_TO_DWORD
       
 11761  */
       
 11762     case function_lword_to_dword :
       
 11763     {
       
 11764         symbol_c *last_type_symbol = NULL;
       
 11765 
       
 11766         {
       
 11767             identifier_c param_name("IN");
       
 11768             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11769             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11770             
       
 11771             /* Get the value from a foo(<param_value>) style call */
       
 11772             if (IN_param_value == NULL)
       
 11773               IN_param_value = function_call_param_iterator.next();
       
 11774             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11775             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11776             
       
 11777             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11778             {
       
 11779         
       
 11780                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 11781                 return return_type_symbol;
       
 11782                 
       
 11783             }
       
 11784             
       
 11785             ERROR;
       
 11786         }
       
 11787         
       
 11788     }/*function_lword_to_dword*/
       
 11789     break;
       
 11790 
       
 11791 /****
       
 11792  *TRUNC
       
 11793  */
       
 11794     case function_trunc :
       
 11795     {
       
 11796         symbol_c *last_type_symbol = NULL;
       
 11797 
       
 11798         {
       
 11799             identifier_c param_name("IN");
       
 11800             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11801             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11802             
       
 11803             /* Get the value from a foo(<param_value>) style call */
       
 11804             if (IN_param_value == NULL)
       
 11805               IN_param_value = function_call_param_iterator.next();
       
 11806             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11807             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11808             
       
 11809             if(search_expression_type->is_real_type(IN_type_symbol))
       
 11810             {
       
 11811         
       
 11812                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 11813                 return return_type_symbol;
       
 11814                 
       
 11815             }
       
 11816             
       
 11817             ERROR;
       
 11818         }
       
 11819         
       
 11820     }/*function_trunc*/
       
 11821     break;
       
 11822 
       
 11823 /****
       
 11824  *BCD_TO_USINT
       
 11825  */
       
 11826     case function_bcd_to_usint :
       
 11827     {
       
 11828         symbol_c *last_type_symbol = NULL;
       
 11829 
       
 11830         {
       
 11831             identifier_c param_name("IN");
       
 11832             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11833             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11834             
       
 11835             /* Get the value from a foo(<param_value>) style call */
       
 11836             if (IN_param_value == NULL)
       
 11837               IN_param_value = function_call_param_iterator.next();
       
 11838             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11839             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11840             
       
 11841             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 11842             {
       
 11843         
       
 11844                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 11845                 return return_type_symbol;
       
 11846                 
       
 11847             }
       
 11848             
       
 11849             ERROR;
       
 11850         }
       
 11851         
       
 11852     }/*function_bcd_to_usint*/
       
 11853     break;
       
 11854 
       
 11855 /****
       
 11856  *BCD_TO_UINT
       
 11857  */
       
 11858     case function_bcd_to_uint :
       
 11859     {
       
 11860         symbol_c *last_type_symbol = NULL;
       
 11861 
       
 11862         {
       
 11863             identifier_c param_name("IN");
       
 11864             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11865             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11866             
       
 11867             /* Get the value from a foo(<param_value>) style call */
       
 11868             if (IN_param_value == NULL)
       
 11869               IN_param_value = function_call_param_iterator.next();
       
 11870             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11871             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11872             
       
 11873             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 11874             {
       
 11875         
       
 11876                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 11877                 return return_type_symbol;
       
 11878                 
       
 11879             }
       
 11880             
       
 11881             ERROR;
       
 11882         }
       
 11883         
       
 11884     }/*function_bcd_to_uint*/
       
 11885     break;
       
 11886 
       
 11887 /****
       
 11888  *BCD_TO_UDINT
       
 11889  */
       
 11890     case function_bcd_to_udint :
       
 11891     {
       
 11892         symbol_c *last_type_symbol = NULL;
       
 11893 
       
 11894         {
       
 11895             identifier_c param_name("IN");
       
 11896             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11897             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11898             
       
 11899             /* Get the value from a foo(<param_value>) style call */
       
 11900             if (IN_param_value == NULL)
       
 11901               IN_param_value = function_call_param_iterator.next();
       
 11902             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11903             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11904             
       
 11905             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 11906             {
       
 11907         
       
 11908                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 11909                 return return_type_symbol;
       
 11910                 
       
 11911             }
       
 11912             
       
 11913             ERROR;
       
 11914         }
       
 11915         
       
 11916     }/*function_bcd_to_udint*/
       
 11917     break;
       
 11918 
       
 11919 /****
       
 11920  *BCD_TO_ULINT
       
 11921  */
       
 11922     case function_bcd_to_ulint :
       
 11923     {
       
 11924         symbol_c *last_type_symbol = NULL;
       
 11925 
       
 11926         {
       
 11927             identifier_c param_name("IN");
       
 11928             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11929             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11930             
       
 11931             /* Get the value from a foo(<param_value>) style call */
       
 11932             if (IN_param_value == NULL)
       
 11933               IN_param_value = function_call_param_iterator.next();
       
 11934             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11935             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11936             
       
 11937             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 11938             {
       
 11939         
       
 11940                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 11941                 return return_type_symbol;
       
 11942                 
       
 11943             }
       
 11944             
       
 11945             ERROR;
       
 11946         }
       
 11947         
       
 11948     }/*function_bcd_to_ulint*/
       
 11949     break;
       
 11950 
       
 11951 /****
       
 11952  *USINT_TO_BCD
       
 11953  */
       
 11954     case function_usint_to_bcd :
       
 11955     {
       
 11956         symbol_c *last_type_symbol = NULL;
       
 11957 
       
 11958         {
       
 11959             identifier_c param_name("IN");
       
 11960             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11961             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11962             
       
 11963             /* Get the value from a foo(<param_value>) style call */
       
 11964             if (IN_param_value == NULL)
       
 11965               IN_param_value = function_call_param_iterator.next();
       
 11966             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11967             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 11968             
       
 11969             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 11970             {
       
 11971         
       
 11972                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 11973                 return return_type_symbol;
       
 11974                 
       
 11975             }
       
 11976             
       
 11977             ERROR;
       
 11978         }
       
 11979         
       
 11980     }/*function_usint_to_bcd*/
       
 11981     break;
       
 11982 
       
 11983 /****
       
 11984  *UINT_TO_BCD
       
 11985  */
       
 11986     case function_uint_to_bcd :
       
 11987     {
       
 11988         symbol_c *last_type_symbol = NULL;
       
 11989 
       
 11990         {
       
 11991             identifier_c param_name("IN");
       
 11992             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 11993             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 11994             
       
 11995             /* Get the value from a foo(<param_value>) style call */
       
 11996             if (IN_param_value == NULL)
       
 11997               IN_param_value = function_call_param_iterator.next();
       
 11998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 11999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12000             
       
 12001             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 12002             {
       
 12003         
       
 12004                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 12005                 return return_type_symbol;
       
 12006                 
       
 12007             }
       
 12008             
       
 12009             ERROR;
       
 12010         }
       
 12011         
       
 12012     }/*function_uint_to_bcd*/
       
 12013     break;
       
 12014 
       
 12015 /****
       
 12016  *UDINT_TO_BCD
       
 12017  */
       
 12018     case function_udint_to_bcd :
       
 12019     {
       
 12020         symbol_c *last_type_symbol = NULL;
       
 12021 
       
 12022         {
       
 12023             identifier_c param_name("IN");
       
 12024             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12025             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12026             
       
 12027             /* Get the value from a foo(<param_value>) style call */
       
 12028             if (IN_param_value == NULL)
       
 12029               IN_param_value = function_call_param_iterator.next();
       
 12030             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12031             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12032             
       
 12033             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 12034             {
       
 12035         
       
 12036                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 12037                 return return_type_symbol;
       
 12038                 
       
 12039             }
       
 12040             
       
 12041             ERROR;
       
 12042         }
       
 12043         
       
 12044     }/*function_udint_to_bcd*/
       
 12045     break;
       
 12046 
       
 12047 /****
       
 12048  *ULINT_TO_BCD
       
 12049  */
       
 12050     case function_ulint_to_bcd :
       
 12051     {
       
 12052         symbol_c *last_type_symbol = NULL;
       
 12053 
       
 12054         {
       
 12055             identifier_c param_name("IN");
       
 12056             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12057             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12058             
       
 12059             /* Get the value from a foo(<param_value>) style call */
       
 12060             if (IN_param_value == NULL)
       
 12061               IN_param_value = function_call_param_iterator.next();
       
 12062             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12063             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12064             
       
 12065             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 12066             {
       
 12067         
       
 12068                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 12069                 return return_type_symbol;
       
 12070                 
       
 12071             }
       
 12072             
       
 12073             ERROR;
       
 12074         }
       
 12075         
       
 12076     }/*function_ulint_to_bcd*/
       
 12077     break;
       
 12078 
       
 12079 /****
       
 12080  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 12081  */
       
 12082     case function_date_and_time_to_time_of_day :
       
 12083     {
       
 12084         symbol_c *last_type_symbol = NULL;
       
 12085 
       
 12086         {
       
 12087             identifier_c param_name("IN");
       
 12088             /* Get the value from a foo(<param_name> = <param_value>) style call */
       
 12089             symbol_c *IN_param_value = function_call_param_iterator.search(&param_name);
       
 12090             
       
 12091             /* Get the value from a foo(<param_value>) style call */
       
 12092             if (IN_param_value == NULL)
       
 12093               IN_param_value = function_call_param_iterator.next();
       
 12094             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
       
 12095             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
       
 12096             
       
 12097             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 12098             {
       
 12099         
       
 12100                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 12101                 return return_type_symbol;
       
 12102                 
       
 12103             }
       
 12104             
       
 12105             ERROR;
       
 12106         }
       
 12107         
       
 12108     }/*function_date_and_time_to_time_of_day*/
 11980     }/*function_date_and_time_to_time_of_day*/
 12109     break;
 11981     break;
 12110 
 11982 
 12111 /****
 11983 /****
 12112  *DATE_AND_TIME_TO_DATE
 11984  *DATE_AND_TIME_TO_DATE
 12124             if (IN_param_value == NULL)
 11996             if (IN_param_value == NULL)
 12125               IN_param_value = function_call_param_iterator.next();
 11997               IN_param_value = function_call_param_iterator.next();
 12126             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 11998             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 12127             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 11999             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 12128             
 12000             
 12129             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 12001             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 12130             {
 12002             {
 12131         
 12003         
 12132                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 12004                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 12133                 return return_type_symbol;
 12005                 return return_type_symbol;
 12134                 
 12006                 
 12535                     ERROR;
 12407                     ERROR;
 12536                 }
 12408                 }
 12537                 
 12409                 
 12538             }
 12410             }
 12539             
 12411             
 12540             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 12412             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 12541             {
 12413             {
 12542         
 12414         
 12543                 {
 12415                 {
 12544                     identifier_c param_name("IN2");
 12416                     identifier_c param_name("IN2");
 12545                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12417                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12549                     if (IN2_param_value == NULL)
 12421                     if (IN2_param_value == NULL)
 12550                       IN2_param_value = function_call_param_iterator.next();
 12422                       IN2_param_value = function_call_param_iterator.next();
 12551                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12423                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12552                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12424                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12553                     
 12425                     
 12554                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12426                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12555                     {
 12427                     {
 12556                 
 12428                 
 12557                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 12429                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 12558                         return return_type_symbol;
 12430                         return return_type_symbol;
 12559                         
 12431                         
 12562                     ERROR;
 12434                     ERROR;
 12563                 }
 12435                 }
 12564                 
 12436                 
 12565             }
 12437             }
 12566             
 12438             
 12567             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 12439             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 12568             {
 12440             {
 12569         
 12441         
 12570                 {
 12442                 {
 12571                     identifier_c param_name("IN2");
 12443                     identifier_c param_name("IN2");
 12572                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12444                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12576                     if (IN2_param_value == NULL)
 12448                     if (IN2_param_value == NULL)
 12577                       IN2_param_value = function_call_param_iterator.next();
 12449                       IN2_param_value = function_call_param_iterator.next();
 12578                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12450                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12579                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12451                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12580                     
 12452                     
 12581                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12453                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12582                     {
 12454                     {
 12583                 
 12455                 
 12584                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 12456                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 12585                         return return_type_symbol;
 12457                         return return_type_symbol;
 12586                         
 12458                         
 12589                     ERROR;
 12461                     ERROR;
 12590                 }
 12462                 }
 12591                 
 12463                 
 12592             }
 12464             }
 12593             
 12465             
 12594             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12466             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12595             {
 12467             {
 12596         
 12468         
 12597                 {
 12469                 {
 12598                     identifier_c param_name("IN2");
 12470                     identifier_c param_name("IN2");
 12599                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12471                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12603                     if (IN2_param_value == NULL)
 12475                     if (IN2_param_value == NULL)
 12604                       IN2_param_value = function_call_param_iterator.next();
 12476                       IN2_param_value = function_call_param_iterator.next();
 12605                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12477                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12606                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12478                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12607                     
 12479                     
 12608                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12480                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12609                     {
 12481                     {
 12610                 
 12482                 
 12611                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12483                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12612                         return return_type_symbol;
 12484                         return return_type_symbol;
 12613                         
 12485                         
 12667                     ERROR;
 12539                     ERROR;
 12668                 }
 12540                 }
 12669                 
 12541                 
 12670             }
 12542             }
 12671             
 12543             
 12672             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12544             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12673             {
 12545             {
 12674         
 12546         
 12675                 {
 12547                 {
 12676                     identifier_c param_name("IN2");
 12548                     identifier_c param_name("IN2");
 12677                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12549                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12745                     ERROR;
 12617                     ERROR;
 12746                 }
 12618                 }
 12747                 
 12619                 
 12748             }
 12620             }
 12749             
 12621             
 12750             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 12622             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 12751             {
 12623             {
 12752         
 12624         
 12753                 {
 12625                 {
 12754                     identifier_c param_name("IN2");
 12626                     identifier_c param_name("IN2");
 12755                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12627                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12759                     if (IN2_param_value == NULL)
 12631                     if (IN2_param_value == NULL)
 12760                       IN2_param_value = function_call_param_iterator.next();
 12632                       IN2_param_value = function_call_param_iterator.next();
 12761                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12633                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12762                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12634                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12763                     
 12635                     
 12764                     if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 12636                     if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 12765                     {
 12637                     {
 12766                 
 12638                 
 12767                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12639                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12768                         return return_type_symbol;
 12640                         return return_type_symbol;
 12769                         
 12641                         
 12772                     ERROR;
 12644                     ERROR;
 12773                 }
 12645                 }
 12774                 
 12646                 
 12775             }
 12647             }
 12776             
 12648             
 12777             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 12649             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 12778             {
 12650             {
 12779         
 12651         
 12780                 {
 12652                 {
 12781                     identifier_c param_name("IN2");
 12653                     identifier_c param_name("IN2");
 12782                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12654                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12786                     if (IN2_param_value == NULL)
 12658                     if (IN2_param_value == NULL)
 12787                       IN2_param_value = function_call_param_iterator.next();
 12659                       IN2_param_value = function_call_param_iterator.next();
 12788                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12660                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12789                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12661                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12790                     
 12662                     
 12791                     if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 12663                     if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 12792                     {
 12664                     {
 12793                 
 12665                 
 12794                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12666                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12795                         return return_type_symbol;
 12667                         return return_type_symbol;
 12796                         
 12668                         
 12797                     }
 12669                     }
 12798                     
 12670                     
 12799                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12671                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12800                     {
 12672                     {
 12801                 
 12673                 
 12802                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 12674                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 12803                         return return_type_symbol;
 12675                         return return_type_symbol;
 12804                         
 12676                         
 12807                     ERROR;
 12679                     ERROR;
 12808                 }
 12680                 }
 12809                 
 12681                 
 12810             }
 12682             }
 12811             
 12683             
 12812             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 12684             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 12813             {
 12685             {
 12814         
 12686         
 12815                 {
 12687                 {
 12816                     identifier_c param_name("IN2");
 12688                     identifier_c param_name("IN2");
 12817                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12689                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12821                     if (IN2_param_value == NULL)
 12693                     if (IN2_param_value == NULL)
 12822                       IN2_param_value = function_call_param_iterator.next();
 12694                       IN2_param_value = function_call_param_iterator.next();
 12823                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12695                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12824                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12696                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12825                     
 12697                     
 12826                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 12698                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 12827                     {
 12699                     {
 12828                 
 12700                 
 12829                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12701                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12830                         return return_type_symbol;
 12702                         return return_type_symbol;
 12831                         
 12703                         
 12832                     }
 12704                     }
 12833                     
 12705                     
 12834                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12706                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12835                     {
 12707                     {
 12836                 
 12708                 
 12837                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 12709                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 12838                         return return_type_symbol;
 12710                         return return_type_symbol;
 12839                         
 12711                         
 12842                     ERROR;
 12714                     ERROR;
 12843                 }
 12715                 }
 12844                 
 12716                 
 12845             }
 12717             }
 12846             
 12718             
 12847             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12719             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12848             {
 12720             {
 12849         
 12721         
 12850                 {
 12722                 {
 12851                     identifier_c param_name("IN2");
 12723                     identifier_c param_name("IN2");
 12852                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12724                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12856                     if (IN2_param_value == NULL)
 12728                     if (IN2_param_value == NULL)
 12857                       IN2_param_value = function_call_param_iterator.next();
 12729                       IN2_param_value = function_call_param_iterator.next();
 12858                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12730                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 12859                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12731                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 12860                     
 12732                     
 12861                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12733                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12862                     {
 12734                     {
 12863                 
 12735                 
 12864                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12736                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 12865                         return return_type_symbol;
 12737                         return return_type_symbol;
 12866                         
 12738                         
 12920                     ERROR;
 12792                     ERROR;
 12921                 }
 12793                 }
 12922                 
 12794                 
 12923             }
 12795             }
 12924             
 12796             
 12925             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 12797             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 12926             {
 12798             {
 12927         
 12799         
 12928                 {
 12800                 {
 12929                     identifier_c param_name("IN2");
 12801                     identifier_c param_name("IN2");
 12930                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 12802                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 13494             if (G_param_value == NULL)
 13366             if (G_param_value == NULL)
 13495               G_param_value = function_call_param_iterator.next();
 13367               G_param_value = function_call_param_iterator.next();
 13496             symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
 13368             symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value);
 13497             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ;
 13369             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ;
 13498             
 13370             
 13499             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 13371             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 13500             {
 13372             {
 13501         
 13373         
 13502                 {
 13374                 {
 13503                     identifier_c param_name("IN0");
 13375                     identifier_c param_name("IN0");
 13504                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 13376                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14112             if (IN_param_value == NULL)
 13984             if (IN_param_value == NULL)
 14113               IN_param_value = function_call_param_iterator.next();
 13985               IN_param_value = function_call_param_iterator.next();
 14114             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 13986             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14115             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 13987             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14116             
 13988             
 14117             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 13989             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14118             {
 13990             {
 14119         
 13991         
 14120                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 13992                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 14121                 return return_type_symbol;
 13993                 return return_type_symbol;
 14122                 
 13994                 
 14144             if (IN_param_value == NULL)
 14016             if (IN_param_value == NULL)
 14145               IN_param_value = function_call_param_iterator.next();
 14017               IN_param_value = function_call_param_iterator.next();
 14146             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14018             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14147             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14019             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14148             
 14020             
 14149             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14021             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14150             {
 14022             {
 14151         
 14023         
 14152                 {
 14024                 {
 14153                     identifier_c param_name("L");
 14025                     identifier_c param_name("L");
 14154                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14026                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14195             if (IN_param_value == NULL)
 14067             if (IN_param_value == NULL)
 14196               IN_param_value = function_call_param_iterator.next();
 14068               IN_param_value = function_call_param_iterator.next();
 14197             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14069             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14198             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14070             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14199             
 14071             
 14200             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14072             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14201             {
 14073             {
 14202         
 14074         
 14203                 {
 14075                 {
 14204                     identifier_c param_name("L");
 14076                     identifier_c param_name("L");
 14205                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14077                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14246             if (IN_param_value == NULL)
 14118             if (IN_param_value == NULL)
 14247               IN_param_value = function_call_param_iterator.next();
 14119               IN_param_value = function_call_param_iterator.next();
 14248             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14120             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14249             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14121             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14250             
 14122             
 14251             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14123             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14252             {
 14124             {
 14253         
 14125         
 14254                 {
 14126                 {
 14255                     identifier_c param_name("L");
 14127                     identifier_c param_name("L");
 14256                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14128                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14316             if (IN1_param_value == NULL)
 14188             if (IN1_param_value == NULL)
 14317               IN1_param_value = function_call_param_iterator.next();
 14189               IN1_param_value = function_call_param_iterator.next();
 14318             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14190             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14319             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14191             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14320             
 14192             
 14321             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 14193             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 14322             {
 14194             {
 14323         
 14195         
 14324                 {
 14196                 {
 14325                     identifier_c param_name("IN2");
 14197                     identifier_c param_name("IN2");
 14326                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14198                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14330                     if (IN2_param_value == NULL)
 14202                     if (IN2_param_value == NULL)
 14331                       IN2_param_value = function_call_param_iterator.next();
 14203                       IN2_param_value = function_call_param_iterator.next();
 14332                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14204                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14333                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14205                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14334                     
 14206                     
 14335                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 14207                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 14336                     {
 14208                     {
 14337                 
 14209                 
 14338                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14210                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14339                         return return_type_symbol;
 14211                         return return_type_symbol;
 14340                         
 14212                         
 14343                     ERROR;
 14215                     ERROR;
 14344                 }
 14216                 }
 14345                 
 14217                 
 14346             }
 14218             }
 14347             
 14219             
 14348             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14220             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14349             {
 14221             {
 14350         
 14222         
 14351                 {
 14223                 {
 14352                     identifier_c param_name("IN2");
 14224                     identifier_c param_name("IN2");
 14353                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14225                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14357                     if (IN2_param_value == NULL)
 14229                     if (IN2_param_value == NULL)
 14358                       IN2_param_value = function_call_param_iterator.next();
 14230                       IN2_param_value = function_call_param_iterator.next();
 14359                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14231                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14360                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14232                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14361                     
 14233                     
 14362                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14234                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14363                     {
 14235                     {
 14364                 
 14236                 
 14365                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14237                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14366                         return return_type_symbol;
 14238                         return return_type_symbol;
 14367                         
 14239                         
 14394             if (IN1_param_value == NULL)
 14266             if (IN1_param_value == NULL)
 14395               IN1_param_value = function_call_param_iterator.next();
 14267               IN1_param_value = function_call_param_iterator.next();
 14396             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14268             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14397             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14269             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14398             
 14270             
 14399             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14271             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14400             {
 14272             {
 14401         
 14273         
 14402                 {
 14274                 {
 14403                     identifier_c param_name("IN2");
 14275                     identifier_c param_name("IN2");
 14404                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14276                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14408                     if (IN2_param_value == NULL)
 14280                     if (IN2_param_value == NULL)
 14409                       IN2_param_value = function_call_param_iterator.next();
 14281                       IN2_param_value = function_call_param_iterator.next();
 14410                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14282                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14411                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14283                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14412                     
 14284                     
 14413                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14285                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14414                     {
 14286                     {
 14415                 
 14287                 
 14416                         {
 14288                         {
 14417                             identifier_c param_name("P");
 14289                             identifier_c param_name("P");
 14418                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 14290                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 14464             if (IN_param_value == NULL)
 14336             if (IN_param_value == NULL)
 14465               IN_param_value = function_call_param_iterator.next();
 14337               IN_param_value = function_call_param_iterator.next();
 14466             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14338             symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value);
 14467             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14339             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ;
 14468             
 14340             
 14469             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14341             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14470             {
 14342             {
 14471         
 14343         
 14472                 {
 14344                 {
 14473                     identifier_c param_name("L");
 14345                     identifier_c param_name("L");
 14474                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14346                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14534             if (IN1_param_value == NULL)
 14406             if (IN1_param_value == NULL)
 14535               IN1_param_value = function_call_param_iterator.next();
 14407               IN1_param_value = function_call_param_iterator.next();
 14536             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14408             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14537             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14409             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14538             
 14410             
 14539             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14411             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14540             {
 14412             {
 14541         
 14413         
 14542                 {
 14414                 {
 14543                     identifier_c param_name("IN2");
 14415                     identifier_c param_name("IN2");
 14544                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14416                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14548                     if (IN2_param_value == NULL)
 14420                     if (IN2_param_value == NULL)
 14549                       IN2_param_value = function_call_param_iterator.next();
 14421                       IN2_param_value = function_call_param_iterator.next();
 14550                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14422                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14551                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14423                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14552                     
 14424                     
 14553                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14425                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14554                     {
 14426                     {
 14555                 
 14427                 
 14556                         {
 14428                         {
 14557                             identifier_c param_name("L");
 14429                             identifier_c param_name("L");
 14558                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 14430                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 14623             if (IN1_param_value == NULL)
 14495             if (IN1_param_value == NULL)
 14624               IN1_param_value = function_call_param_iterator.next();
 14496               IN1_param_value = function_call_param_iterator.next();
 14625             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14497             symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value);
 14626             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14498             last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ;
 14627             
 14499             
 14628             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14500             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14629             {
 14501             {
 14630         
 14502         
 14631                 {
 14503                 {
 14632                     identifier_c param_name("IN2");
 14504                     identifier_c param_name("IN2");
 14633                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14505                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 14637                     if (IN2_param_value == NULL)
 14509                     if (IN2_param_value == NULL)
 14638                       IN2_param_value = function_call_param_iterator.next();
 14510                       IN2_param_value = function_call_param_iterator.next();
 14639                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14511                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 14640                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14512                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 14641                     
 14513                     
 14642                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 14514                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 14643                     {
 14515                     {
 14644                 
 14516                 
 14645                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 14517                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 14646                         return return_type_symbol;
 14518                         return return_type_symbol;
 14647                         
 14519                         
 14681 
 14553 
 14682         {
 14554         {
 14683             symbol_c *IN_type_symbol = param_data_type;
 14555             symbol_c *IN_type_symbol = param_data_type;
 14684             last_type_symbol = param_data_type;
 14556             last_type_symbol = param_data_type;
 14685             
 14557             
 14686             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14558             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14687             {
 14559             {
 14688         
 14560         
 14689                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 14561                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 14690                 return return_type_symbol;
 14562                 return return_type_symbol;
 14691                 
 14563                 
 14706 
 14578 
 14707         {
 14579         {
 14708             symbol_c *IN_type_symbol = param_data_type;
 14580             symbol_c *IN_type_symbol = param_data_type;
 14709             last_type_symbol = param_data_type;
 14581             last_type_symbol = param_data_type;
 14710             
 14582             
 14711             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14583             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14712             {
 14584             {
 14713         
 14585         
 14714                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 14586                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 14715                 return return_type_symbol;
 14587                 return return_type_symbol;
 14716                 
 14588                 
 14731 
 14603 
 14732         {
 14604         {
 14733             symbol_c *IN_type_symbol = param_data_type;
 14605             symbol_c *IN_type_symbol = param_data_type;
 14734             last_type_symbol = param_data_type;
 14606             last_type_symbol = param_data_type;
 14735             
 14607             
 14736             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14608             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14737             {
 14609             {
 14738         
 14610         
 14739                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 14611                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 14740                 return return_type_symbol;
 14612                 return return_type_symbol;
 14741                 
 14613                 
 14756 
 14628 
 14757         {
 14629         {
 14758             symbol_c *IN_type_symbol = param_data_type;
 14630             symbol_c *IN_type_symbol = param_data_type;
 14759             last_type_symbol = param_data_type;
 14631             last_type_symbol = param_data_type;
 14760             
 14632             
 14761             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14633             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14762             {
 14634             {
 14763         
 14635         
 14764                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 14636                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 14765                 return return_type_symbol;
 14637                 return return_type_symbol;
 14766                 
 14638                 
 14781 
 14653 
 14782         {
 14654         {
 14783             symbol_c *IN_type_symbol = param_data_type;
 14655             symbol_c *IN_type_symbol = param_data_type;
 14784             last_type_symbol = param_data_type;
 14656             last_type_symbol = param_data_type;
 14785             
 14657             
 14786             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14658             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14787             {
 14659             {
 14788         
 14660         
 14789                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 14661                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 14790                 return return_type_symbol;
 14662                 return return_type_symbol;
 14791                 
 14663                 
 14806 
 14678 
 14807         {
 14679         {
 14808             symbol_c *IN_type_symbol = param_data_type;
 14680             symbol_c *IN_type_symbol = param_data_type;
 14809             last_type_symbol = param_data_type;
 14681             last_type_symbol = param_data_type;
 14810             
 14682             
 14811             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14683             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14812             {
 14684             {
 14813         
 14685         
 14814                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 14686                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 14815                 return return_type_symbol;
 14687                 return return_type_symbol;
 14816                 
 14688                 
 14831 
 14703 
 14832         {
 14704         {
 14833             symbol_c *IN_type_symbol = param_data_type;
 14705             symbol_c *IN_type_symbol = param_data_type;
 14834             last_type_symbol = param_data_type;
 14706             last_type_symbol = param_data_type;
 14835             
 14707             
 14836             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14708             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14837             {
 14709             {
 14838         
 14710         
 14839                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 14711                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 14840                 return return_type_symbol;
 14712                 return return_type_symbol;
 14841                 
 14713                 
 14856 
 14728 
 14857         {
 14729         {
 14858             symbol_c *IN_type_symbol = param_data_type;
 14730             symbol_c *IN_type_symbol = param_data_type;
 14859             last_type_symbol = param_data_type;
 14731             last_type_symbol = param_data_type;
 14860             
 14732             
 14861             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14733             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14862             {
 14734             {
 14863         
 14735         
 14864                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 14736                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 14865                 return return_type_symbol;
 14737                 return return_type_symbol;
 14866                 
 14738                 
 14881 
 14753 
 14882         {
 14754         {
 14883             symbol_c *IN_type_symbol = param_data_type;
 14755             symbol_c *IN_type_symbol = param_data_type;
 14884             last_type_symbol = param_data_type;
 14756             last_type_symbol = param_data_type;
 14885             
 14757             
 14886             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14758             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14887             {
 14759             {
 14888         
 14760         
 14889                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 14761                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 14890                 return return_type_symbol;
 14762                 return return_type_symbol;
 14891                 
 14763                 
 14906 
 14778 
 14907         {
 14779         {
 14908             symbol_c *IN_type_symbol = param_data_type;
 14780             symbol_c *IN_type_symbol = param_data_type;
 14909             last_type_symbol = param_data_type;
 14781             last_type_symbol = param_data_type;
 14910             
 14782             
 14911             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14783             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14912             {
 14784             {
 14913         
 14785         
 14914                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 14786                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 14915                 return return_type_symbol;
 14787                 return return_type_symbol;
 14916                 
 14788                 
 14931 
 14803 
 14932         {
 14804         {
 14933             symbol_c *IN_type_symbol = param_data_type;
 14805             symbol_c *IN_type_symbol = param_data_type;
 14934             last_type_symbol = param_data_type;
 14806             last_type_symbol = param_data_type;
 14935             
 14807             
 14936             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14808             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14937             {
 14809             {
 14938         
 14810         
 14939                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14811                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 14940                 return return_type_symbol;
 14812                 return return_type_symbol;
 14941                 
 14813                 
 14956 
 14828 
 14957         {
 14829         {
 14958             symbol_c *IN_type_symbol = param_data_type;
 14830             symbol_c *IN_type_symbol = param_data_type;
 14959             last_type_symbol = param_data_type;
 14831             last_type_symbol = param_data_type;
 14960             
 14832             
 14961             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14833             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14962             {
 14834             {
 14963         
 14835         
 14964                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 14836                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 14965                 return return_type_symbol;
 14837                 return return_type_symbol;
 14966                 
 14838                 
 14981 
 14853 
 14982         {
 14854         {
 14983             symbol_c *IN_type_symbol = param_data_type;
 14855             symbol_c *IN_type_symbol = param_data_type;
 14984             last_type_symbol = param_data_type;
 14856             last_type_symbol = param_data_type;
 14985             
 14857             
 14986             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14858             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 14987             {
 14859             {
 14988         
 14860         
 14989                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14861                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 14990                 return return_type_symbol;
 14862                 return return_type_symbol;
 14991                 
 14863                 
 15006 
 14878 
 15007         {
 14879         {
 15008             symbol_c *IN_type_symbol = param_data_type;
 14880             symbol_c *IN_type_symbol = param_data_type;
 15009             last_type_symbol = param_data_type;
 14881             last_type_symbol = param_data_type;
 15010             
 14882             
 15011             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14883             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 15012             {
 14884             {
 15013         
 14885         
 15014                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 14886                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 15015                 return return_type_symbol;
 14887                 return return_type_symbol;
 15016                 
 14888                 
 15031 
 14903 
 15032         {
 14904         {
 15033             symbol_c *IN_type_symbol = param_data_type;
 14905             symbol_c *IN_type_symbol = param_data_type;
 15034             last_type_symbol = param_data_type;
 14906             last_type_symbol = param_data_type;
 15035             
 14907             
 15036             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14908             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 15037             {
 14909             {
 15038         
 14910         
 15039                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 14911                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 15040                 return return_type_symbol;
 14912                 return return_type_symbol;
 15041                 
 14913                 
 15056 
 14928 
 15057         {
 14929         {
 15058             symbol_c *IN_type_symbol = param_data_type;
 14930             symbol_c *IN_type_symbol = param_data_type;
 15059             last_type_symbol = param_data_type;
 14931             last_type_symbol = param_data_type;
 15060             
 14932             
 15061             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14933             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 15062             {
 14934             {
 15063         
 14935         
 15064                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 14936                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 15065                 return return_type_symbol;
 14937                 return return_type_symbol;
 15066                 
 14938                 
 15081 
 14953 
 15082         {
 14954         {
 15083             symbol_c *IN_type_symbol = param_data_type;
 14955             symbol_c *IN_type_symbol = param_data_type;
 15084             last_type_symbol = param_data_type;
 14956             last_type_symbol = param_data_type;
 15085             
 14957             
 15086             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14958             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 15087             {
 14959             {
 15088         
 14960         
 15089                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 14961                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 15090                 return return_type_symbol;
 14962                 return return_type_symbol;
 15091                 
 14963                 
 15106 
 14978 
 15107         {
 14979         {
 15108             symbol_c *IN_type_symbol = param_data_type;
 14980             symbol_c *IN_type_symbol = param_data_type;
 15109             last_type_symbol = param_data_type;
 14981             last_type_symbol = param_data_type;
 15110             
 14982             
 15111             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 14983             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 15112             {
 14984             {
 15113         
 14985         
 15114                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 14986                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 15115                 return return_type_symbol;
 14987                 return return_type_symbol;
 15116                 
 14988                 
 15131 
 15003 
 15132         {
 15004         {
 15133             symbol_c *IN_type_symbol = param_data_type;
 15005             symbol_c *IN_type_symbol = param_data_type;
 15134             last_type_symbol = param_data_type;
 15006             last_type_symbol = param_data_type;
 15135             
 15007             
 15136             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 15008             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 15137             {
 15009             {
 15138         
 15010         
 15139                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 15011                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 15140                 return return_type_symbol;
 15012                 return return_type_symbol;
 15141                 
 15013                 
 15156 
 15028 
 15157         {
 15029         {
 15158             symbol_c *IN_type_symbol = param_data_type;
 15030             symbol_c *IN_type_symbol = param_data_type;
 15159             last_type_symbol = param_data_type;
 15031             last_type_symbol = param_data_type;
 15160             
 15032             
 15161             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15033             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15162             {
 15034             {
 15163         
 15035         
 15164                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 15036                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 15165                 return return_type_symbol;
 15037                 return return_type_symbol;
 15166                 
 15038                 
 15181 
 15053 
 15182         {
 15054         {
 15183             symbol_c *IN_type_symbol = param_data_type;
 15055             symbol_c *IN_type_symbol = param_data_type;
 15184             last_type_symbol = param_data_type;
 15056             last_type_symbol = param_data_type;
 15185             
 15057             
 15186             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15058             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15187             {
 15059             {
 15188         
 15060         
 15189                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 15061                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 15190                 return return_type_symbol;
 15062                 return return_type_symbol;
 15191                 
 15063                 
 15206 
 15078 
 15207         {
 15079         {
 15208             symbol_c *IN_type_symbol = param_data_type;
 15080             symbol_c *IN_type_symbol = param_data_type;
 15209             last_type_symbol = param_data_type;
 15081             last_type_symbol = param_data_type;
 15210             
 15082             
 15211             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15083             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15212             {
 15084             {
 15213         
 15085         
 15214                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 15086                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 15215                 return return_type_symbol;
 15087                 return return_type_symbol;
 15216                 
 15088                 
 15231 
 15103 
 15232         {
 15104         {
 15233             symbol_c *IN_type_symbol = param_data_type;
 15105             symbol_c *IN_type_symbol = param_data_type;
 15234             last_type_symbol = param_data_type;
 15106             last_type_symbol = param_data_type;
 15235             
 15107             
 15236             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15108             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15237             {
 15109             {
 15238         
 15110         
 15239                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 15111                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 15240                 return return_type_symbol;
 15112                 return return_type_symbol;
 15241                 
 15113                 
 15256 
 15128 
 15257         {
 15129         {
 15258             symbol_c *IN_type_symbol = param_data_type;
 15130             symbol_c *IN_type_symbol = param_data_type;
 15259             last_type_symbol = param_data_type;
 15131             last_type_symbol = param_data_type;
 15260             
 15132             
 15261             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15133             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15262             {
 15134             {
 15263         
 15135         
 15264                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 15136                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 15265                 return return_type_symbol;
 15137                 return return_type_symbol;
 15266                 
 15138                 
 15281 
 15153 
 15282         {
 15154         {
 15283             symbol_c *IN_type_symbol = param_data_type;
 15155             symbol_c *IN_type_symbol = param_data_type;
 15284             last_type_symbol = param_data_type;
 15156             last_type_symbol = param_data_type;
 15285             
 15157             
 15286             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15158             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15287             {
 15159             {
 15288         
 15160         
 15289                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 15161                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 15290                 return return_type_symbol;
 15162                 return return_type_symbol;
 15291                 
 15163                 
 15306 
 15178 
 15307         {
 15179         {
 15308             symbol_c *IN_type_symbol = param_data_type;
 15180             symbol_c *IN_type_symbol = param_data_type;
 15309             last_type_symbol = param_data_type;
 15181             last_type_symbol = param_data_type;
 15310             
 15182             
 15311             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15183             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15312             {
 15184             {
 15313         
 15185         
 15314                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 15186                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 15315                 return return_type_symbol;
 15187                 return return_type_symbol;
 15316                 
 15188                 
 15331 
 15203 
 15332         {
 15204         {
 15333             symbol_c *IN_type_symbol = param_data_type;
 15205             symbol_c *IN_type_symbol = param_data_type;
 15334             last_type_symbol = param_data_type;
 15206             last_type_symbol = param_data_type;
 15335             
 15207             
 15336             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15208             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15337             {
 15209             {
 15338         
 15210         
 15339                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 15211                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 15340                 return return_type_symbol;
 15212                 return return_type_symbol;
 15341                 
 15213                 
 15356 
 15228 
 15357         {
 15229         {
 15358             symbol_c *IN_type_symbol = param_data_type;
 15230             symbol_c *IN_type_symbol = param_data_type;
 15359             last_type_symbol = param_data_type;
 15231             last_type_symbol = param_data_type;
 15360             
 15232             
 15361             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15233             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15362             {
 15234             {
 15363         
 15235         
 15364                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 15236                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 15365                 return return_type_symbol;
 15237                 return return_type_symbol;
 15366                 
 15238                 
 15381 
 15253 
 15382         {
 15254         {
 15383             symbol_c *IN_type_symbol = param_data_type;
 15255             symbol_c *IN_type_symbol = param_data_type;
 15384             last_type_symbol = param_data_type;
 15256             last_type_symbol = param_data_type;
 15385             
 15257             
 15386             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15258             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15387             {
 15259             {
 15388         
 15260         
 15389                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 15261                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 15390                 return return_type_symbol;
 15262                 return return_type_symbol;
 15391                 
 15263                 
 15406 
 15278 
 15407         {
 15279         {
 15408             symbol_c *IN_type_symbol = param_data_type;
 15280             symbol_c *IN_type_symbol = param_data_type;
 15409             last_type_symbol = param_data_type;
 15281             last_type_symbol = param_data_type;
 15410             
 15282             
 15411             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15283             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15412             {
 15284             {
 15413         
 15285         
 15414                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15286                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15415                 return return_type_symbol;
 15287                 return return_type_symbol;
 15416                 
 15288                 
 15431 
 15303 
 15432         {
 15304         {
 15433             symbol_c *IN_type_symbol = param_data_type;
 15305             symbol_c *IN_type_symbol = param_data_type;
 15434             last_type_symbol = param_data_type;
 15306             last_type_symbol = param_data_type;
 15435             
 15307             
 15436             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15308             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15437             {
 15309             {
 15438         
 15310         
 15439                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 15311                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 15440                 return return_type_symbol;
 15312                 return return_type_symbol;
 15441                 
 15313                 
 15456 
 15328 
 15457         {
 15329         {
 15458             symbol_c *IN_type_symbol = param_data_type;
 15330             symbol_c *IN_type_symbol = param_data_type;
 15459             last_type_symbol = param_data_type;
 15331             last_type_symbol = param_data_type;
 15460             
 15332             
 15461             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15333             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15462             {
 15334             {
 15463         
 15335         
 15464                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 15336                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 15465                 return return_type_symbol;
 15337                 return return_type_symbol;
 15466                 
 15338                 
 15481 
 15353 
 15482         {
 15354         {
 15483             symbol_c *IN_type_symbol = param_data_type;
 15355             symbol_c *IN_type_symbol = param_data_type;
 15484             last_type_symbol = param_data_type;
 15356             last_type_symbol = param_data_type;
 15485             
 15357             
 15486             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15358             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15487             {
 15359             {
 15488         
 15360         
 15489                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 15361                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 15490                 return return_type_symbol;
 15362                 return return_type_symbol;
 15491                 
 15363                 
 15506 
 15378 
 15507         {
 15379         {
 15508             symbol_c *IN_type_symbol = param_data_type;
 15380             symbol_c *IN_type_symbol = param_data_type;
 15509             last_type_symbol = param_data_type;
 15381             last_type_symbol = param_data_type;
 15510             
 15382             
 15511             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15383             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15512             {
 15384             {
 15513         
 15385         
 15514                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 15386                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 15515                 return return_type_symbol;
 15387                 return return_type_symbol;
 15516                 
 15388                 
 15531 
 15403 
 15532         {
 15404         {
 15533             symbol_c *IN_type_symbol = param_data_type;
 15405             symbol_c *IN_type_symbol = param_data_type;
 15534             last_type_symbol = param_data_type;
 15406             last_type_symbol = param_data_type;
 15535             
 15407             
 15536             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15408             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15537             {
 15409             {
 15538         
 15410         
 15539                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 15411                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 15540                 return return_type_symbol;
 15412                 return return_type_symbol;
 15541                 
 15413                 
 15556 
 15428 
 15557         {
 15429         {
 15558             symbol_c *IN_type_symbol = param_data_type;
 15430             symbol_c *IN_type_symbol = param_data_type;
 15559             last_type_symbol = param_data_type;
 15431             last_type_symbol = param_data_type;
 15560             
 15432             
 15561             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15433             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15562             {
 15434             {
 15563         
 15435         
 15564                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 15436                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 15565                 return return_type_symbol;
 15437                 return return_type_symbol;
 15566                 
 15438                 
 15581 
 15453 
 15582         {
 15454         {
 15583             symbol_c *IN_type_symbol = param_data_type;
 15455             symbol_c *IN_type_symbol = param_data_type;
 15584             last_type_symbol = param_data_type;
 15456             last_type_symbol = param_data_type;
 15585             
 15457             
 15586             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15458             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15587             {
 15459             {
 15588         
 15460         
 15589                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 15461                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 15590                 return return_type_symbol;
 15462                 return return_type_symbol;
 15591                 
 15463                 
 15606 
 15478 
 15607         {
 15479         {
 15608             symbol_c *IN_type_symbol = param_data_type;
 15480             symbol_c *IN_type_symbol = param_data_type;
 15609             last_type_symbol = param_data_type;
 15481             last_type_symbol = param_data_type;
 15610             
 15482             
 15611             if (typeid(*last_type_symbol) == typeid(sint_type_name_c))
 15483             if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol))
 15612             {
 15484             {
 15613         
 15485         
 15614                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 15486                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 15615                 return return_type_symbol;
 15487                 return return_type_symbol;
 15616                 
 15488                 
 15631 
 15503 
 15632         {
 15504         {
 15633             symbol_c *IN_type_symbol = param_data_type;
 15505             symbol_c *IN_type_symbol = param_data_type;
 15634             last_type_symbol = param_data_type;
 15506             last_type_symbol = param_data_type;
 15635             
 15507             
 15636             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15508             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15637             {
 15509             {
 15638         
 15510         
 15639                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 15511                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 15640                 return return_type_symbol;
 15512                 return return_type_symbol;
 15641                 
 15513                 
 15656 
 15528 
 15657         {
 15529         {
 15658             symbol_c *IN_type_symbol = param_data_type;
 15530             symbol_c *IN_type_symbol = param_data_type;
 15659             last_type_symbol = param_data_type;
 15531             last_type_symbol = param_data_type;
 15660             
 15532             
 15661             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15533             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15662             {
 15534             {
 15663         
 15535         
 15664                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 15536                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 15665                 return return_type_symbol;
 15537                 return return_type_symbol;
 15666                 
 15538                 
 15681 
 15553 
 15682         {
 15554         {
 15683             symbol_c *IN_type_symbol = param_data_type;
 15555             symbol_c *IN_type_symbol = param_data_type;
 15684             last_type_symbol = param_data_type;
 15556             last_type_symbol = param_data_type;
 15685             
 15557             
 15686             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15558             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15687             {
 15559             {
 15688         
 15560         
 15689                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 15561                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 15690                 return return_type_symbol;
 15562                 return return_type_symbol;
 15691                 
 15563                 
 15706 
 15578 
 15707         {
 15579         {
 15708             symbol_c *IN_type_symbol = param_data_type;
 15580             symbol_c *IN_type_symbol = param_data_type;
 15709             last_type_symbol = param_data_type;
 15581             last_type_symbol = param_data_type;
 15710             
 15582             
 15711             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15583             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15712             {
 15584             {
 15713         
 15585         
 15714                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 15586                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 15715                 return return_type_symbol;
 15587                 return return_type_symbol;
 15716                 
 15588                 
 15731 
 15603 
 15732         {
 15604         {
 15733             symbol_c *IN_type_symbol = param_data_type;
 15605             symbol_c *IN_type_symbol = param_data_type;
 15734             last_type_symbol = param_data_type;
 15606             last_type_symbol = param_data_type;
 15735             
 15607             
 15736             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15608             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15737             {
 15609             {
 15738         
 15610         
 15739                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 15611                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 15740                 return return_type_symbol;
 15612                 return return_type_symbol;
 15741                 
 15613                 
 15756 
 15628 
 15757         {
 15629         {
 15758             symbol_c *IN_type_symbol = param_data_type;
 15630             symbol_c *IN_type_symbol = param_data_type;
 15759             last_type_symbol = param_data_type;
 15631             last_type_symbol = param_data_type;
 15760             
 15632             
 15761             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15633             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15762             {
 15634             {
 15763         
 15635         
 15764                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 15636                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 15765                 return return_type_symbol;
 15637                 return return_type_symbol;
 15766                 
 15638                 
 15781 
 15653 
 15782         {
 15654         {
 15783             symbol_c *IN_type_symbol = param_data_type;
 15655             symbol_c *IN_type_symbol = param_data_type;
 15784             last_type_symbol = param_data_type;
 15656             last_type_symbol = param_data_type;
 15785             
 15657             
 15786             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15658             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15787             {
 15659             {
 15788         
 15660         
 15789                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 15661                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 15790                 return return_type_symbol;
 15662                 return return_type_symbol;
 15791                 
 15663                 
 15806 
 15678 
 15807         {
 15679         {
 15808             symbol_c *IN_type_symbol = param_data_type;
 15680             symbol_c *IN_type_symbol = param_data_type;
 15809             last_type_symbol = param_data_type;
 15681             last_type_symbol = param_data_type;
 15810             
 15682             
 15811             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15683             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15812             {
 15684             {
 15813         
 15685         
 15814                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 15686                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 15815                 return return_type_symbol;
 15687                 return return_type_symbol;
 15816                 
 15688                 
 15831 
 15703 
 15832         {
 15704         {
 15833             symbol_c *IN_type_symbol = param_data_type;
 15705             symbol_c *IN_type_symbol = param_data_type;
 15834             last_type_symbol = param_data_type;
 15706             last_type_symbol = param_data_type;
 15835             
 15707             
 15836             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15708             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15837             {
 15709             {
 15838         
 15710         
 15839                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 15711                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 15840                 return return_type_symbol;
 15712                 return return_type_symbol;
 15841                 
 15713                 
 15856 
 15728 
 15857         {
 15729         {
 15858             symbol_c *IN_type_symbol = param_data_type;
 15730             symbol_c *IN_type_symbol = param_data_type;
 15859             last_type_symbol = param_data_type;
 15731             last_type_symbol = param_data_type;
 15860             
 15732             
 15861             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15733             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15862             {
 15734             {
 15863         
 15735         
 15864                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 15736                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 15865                 return return_type_symbol;
 15737                 return return_type_symbol;
 15866                 
 15738                 
 15881 
 15753 
 15882         {
 15754         {
 15883             symbol_c *IN_type_symbol = param_data_type;
 15755             symbol_c *IN_type_symbol = param_data_type;
 15884             last_type_symbol = param_data_type;
 15756             last_type_symbol = param_data_type;
 15885             
 15757             
 15886             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15758             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15887             {
 15759             {
 15888         
 15760         
 15889                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15761                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 15890                 return return_type_symbol;
 15762                 return return_type_symbol;
 15891                 
 15763                 
 15906 
 15778 
 15907         {
 15779         {
 15908             symbol_c *IN_type_symbol = param_data_type;
 15780             symbol_c *IN_type_symbol = param_data_type;
 15909             last_type_symbol = param_data_type;
 15781             last_type_symbol = param_data_type;
 15910             
 15782             
 15911             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15783             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15912             {
 15784             {
 15913         
 15785         
 15914                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 15786                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 15915                 return return_type_symbol;
 15787                 return return_type_symbol;
 15916                 
 15788                 
 15931 
 15803 
 15932         {
 15804         {
 15933             symbol_c *IN_type_symbol = param_data_type;
 15805             symbol_c *IN_type_symbol = param_data_type;
 15934             last_type_symbol = param_data_type;
 15806             last_type_symbol = param_data_type;
 15935             
 15807             
 15936             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15808             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15937             {
 15809             {
 15938         
 15810         
 15939                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 15811                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 15940                 return return_type_symbol;
 15812                 return return_type_symbol;
 15941                 
 15813                 
 15956 
 15828 
 15957         {
 15829         {
 15958             symbol_c *IN_type_symbol = param_data_type;
 15830             symbol_c *IN_type_symbol = param_data_type;
 15959             last_type_symbol = param_data_type;
 15831             last_type_symbol = param_data_type;
 15960             
 15832             
 15961             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15833             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15962             {
 15834             {
 15963         
 15835         
 15964                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 15836                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 15965                 return return_type_symbol;
 15837                 return return_type_symbol;
 15966                 
 15838                 
 15981 
 15853 
 15982         {
 15854         {
 15983             symbol_c *IN_type_symbol = param_data_type;
 15855             symbol_c *IN_type_symbol = param_data_type;
 15984             last_type_symbol = param_data_type;
 15856             last_type_symbol = param_data_type;
 15985             
 15857             
 15986             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15858             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 15987             {
 15859             {
 15988         
 15860         
 15989                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 15861                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 15990                 return return_type_symbol;
 15862                 return return_type_symbol;
 15991                 
 15863                 
 16006 
 15878 
 16007         {
 15879         {
 16008             symbol_c *IN_type_symbol = param_data_type;
 15880             symbol_c *IN_type_symbol = param_data_type;
 16009             last_type_symbol = param_data_type;
 15881             last_type_symbol = param_data_type;
 16010             
 15882             
 16011             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15883             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 16012             {
 15884             {
 16013         
 15885         
 16014                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 15886                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 16015                 return return_type_symbol;
 15887                 return return_type_symbol;
 16016                 
 15888                 
 16031 
 15903 
 16032         {
 15904         {
 16033             symbol_c *IN_type_symbol = param_data_type;
 15905             symbol_c *IN_type_symbol = param_data_type;
 16034             last_type_symbol = param_data_type;
 15906             last_type_symbol = param_data_type;
 16035             
 15907             
 16036             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15908             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 16037             {
 15909             {
 16038         
 15910         
 16039                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 15911                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 16040                 return return_type_symbol;
 15912                 return return_type_symbol;
 16041                 
 15913                 
 16056 
 15928 
 16057         {
 15929         {
 16058             symbol_c *IN_type_symbol = param_data_type;
 15930             symbol_c *IN_type_symbol = param_data_type;
 16059             last_type_symbol = param_data_type;
 15931             last_type_symbol = param_data_type;
 16060             
 15932             
 16061             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15933             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 16062             {
 15934             {
 16063         
 15935         
 16064                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 15936                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 16065                 return return_type_symbol;
 15937                 return return_type_symbol;
 16066                 
 15938                 
 16081 
 15953 
 16082         {
 15954         {
 16083             symbol_c *IN_type_symbol = param_data_type;
 15955             symbol_c *IN_type_symbol = param_data_type;
 16084             last_type_symbol = param_data_type;
 15956             last_type_symbol = param_data_type;
 16085             
 15957             
 16086             if (typeid(*last_type_symbol) == typeid(int_type_name_c))
 15958             if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol))
 16087             {
 15959             {
 16088         
 15960         
 16089                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 15961                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 16090                 return return_type_symbol;
 15962                 return return_type_symbol;
 16091                 
 15963                 
 16106 
 15978 
 16107         {
 15979         {
 16108             symbol_c *IN_type_symbol = param_data_type;
 15980             symbol_c *IN_type_symbol = param_data_type;
 16109             last_type_symbol = param_data_type;
 15981             last_type_symbol = param_data_type;
 16110             
 15982             
 16111             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 15983             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16112             {
 15984             {
 16113         
 15985         
 16114                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 15986                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16115                 return return_type_symbol;
 15987                 return return_type_symbol;
 16116                 
 15988                 
 16131 
 16003 
 16132         {
 16004         {
 16133             symbol_c *IN_type_symbol = param_data_type;
 16005             symbol_c *IN_type_symbol = param_data_type;
 16134             last_type_symbol = param_data_type;
 16006             last_type_symbol = param_data_type;
 16135             
 16007             
 16136             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16008             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16137             {
 16009             {
 16138         
 16010         
 16139                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 16011                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 16140                 return return_type_symbol;
 16012                 return return_type_symbol;
 16141                 
 16013                 
 16156 
 16028 
 16157         {
 16029         {
 16158             symbol_c *IN_type_symbol = param_data_type;
 16030             symbol_c *IN_type_symbol = param_data_type;
 16159             last_type_symbol = param_data_type;
 16031             last_type_symbol = param_data_type;
 16160             
 16032             
 16161             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16033             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16162             {
 16034             {
 16163         
 16035         
 16164                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16036                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16165                 return return_type_symbol;
 16037                 return return_type_symbol;
 16166                 
 16038                 
 16181 
 16053 
 16182         {
 16054         {
 16183             symbol_c *IN_type_symbol = param_data_type;
 16055             symbol_c *IN_type_symbol = param_data_type;
 16184             last_type_symbol = param_data_type;
 16056             last_type_symbol = param_data_type;
 16185             
 16057             
 16186             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16058             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16187             {
 16059             {
 16188         
 16060         
 16189                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 16061                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 16190                 return return_type_symbol;
 16062                 return return_type_symbol;
 16191                 
 16063                 
 16206 
 16078 
 16207         {
 16079         {
 16208             symbol_c *IN_type_symbol = param_data_type;
 16080             symbol_c *IN_type_symbol = param_data_type;
 16209             last_type_symbol = param_data_type;
 16081             last_type_symbol = param_data_type;
 16210             
 16082             
 16211             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16083             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16212             {
 16084             {
 16213         
 16085         
 16214                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 16086                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 16215                 return return_type_symbol;
 16087                 return return_type_symbol;
 16216                 
 16088                 
 16231 
 16103 
 16232         {
 16104         {
 16233             symbol_c *IN_type_symbol = param_data_type;
 16105             symbol_c *IN_type_symbol = param_data_type;
 16234             last_type_symbol = param_data_type;
 16106             last_type_symbol = param_data_type;
 16235             
 16107             
 16236             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16108             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16237             {
 16109             {
 16238         
 16110         
 16239                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 16111                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 16240                 return return_type_symbol;
 16112                 return return_type_symbol;
 16241                 
 16113                 
 16256 
 16128 
 16257         {
 16129         {
 16258             symbol_c *IN_type_symbol = param_data_type;
 16130             symbol_c *IN_type_symbol = param_data_type;
 16259             last_type_symbol = param_data_type;
 16131             last_type_symbol = param_data_type;
 16260             
 16132             
 16261             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16133             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16262             {
 16134             {
 16263         
 16135         
 16264                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 16136                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 16265                 return return_type_symbol;
 16137                 return return_type_symbol;
 16266                 
 16138                 
 16281 
 16153 
 16282         {
 16154         {
 16283             symbol_c *IN_type_symbol = param_data_type;
 16155             symbol_c *IN_type_symbol = param_data_type;
 16284             last_type_symbol = param_data_type;
 16156             last_type_symbol = param_data_type;
 16285             
 16157             
 16286             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16158             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16287             {
 16159             {
 16288         
 16160         
 16289                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 16161                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 16290                 return return_type_symbol;
 16162                 return return_type_symbol;
 16291                 
 16163                 
 16306 
 16178 
 16307         {
 16179         {
 16308             symbol_c *IN_type_symbol = param_data_type;
 16180             symbol_c *IN_type_symbol = param_data_type;
 16309             last_type_symbol = param_data_type;
 16181             last_type_symbol = param_data_type;
 16310             
 16182             
 16311             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16183             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16312             {
 16184             {
 16313         
 16185         
 16314                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 16186                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 16315                 return return_type_symbol;
 16187                 return return_type_symbol;
 16316                 
 16188                 
 16331 
 16203 
 16332         {
 16204         {
 16333             symbol_c *IN_type_symbol = param_data_type;
 16205             symbol_c *IN_type_symbol = param_data_type;
 16334             last_type_symbol = param_data_type;
 16206             last_type_symbol = param_data_type;
 16335             
 16207             
 16336             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16208             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16337             {
 16209             {
 16338         
 16210         
 16339                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 16211                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 16340                 return return_type_symbol;
 16212                 return return_type_symbol;
 16341                 
 16213                 
 16356 
 16228 
 16357         {
 16229         {
 16358             symbol_c *IN_type_symbol = param_data_type;
 16230             symbol_c *IN_type_symbol = param_data_type;
 16359             last_type_symbol = param_data_type;
 16231             last_type_symbol = param_data_type;
 16360             
 16232             
 16361             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16233             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16362             {
 16234             {
 16363         
 16235         
 16364                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16236                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16365                 return return_type_symbol;
 16237                 return return_type_symbol;
 16366                 
 16238                 
 16381 
 16253 
 16382         {
 16254         {
 16383             symbol_c *IN_type_symbol = param_data_type;
 16255             symbol_c *IN_type_symbol = param_data_type;
 16384             last_type_symbol = param_data_type;
 16256             last_type_symbol = param_data_type;
 16385             
 16257             
 16386             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16258             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16387             {
 16259             {
 16388         
 16260         
 16389                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 16261                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 16390                 return return_type_symbol;
 16262                 return return_type_symbol;
 16391                 
 16263                 
 16406 
 16278 
 16407         {
 16279         {
 16408             symbol_c *IN_type_symbol = param_data_type;
 16280             symbol_c *IN_type_symbol = param_data_type;
 16409             last_type_symbol = param_data_type;
 16281             last_type_symbol = param_data_type;
 16410             
 16282             
 16411             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16283             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16412             {
 16284             {
 16413         
 16285         
 16414                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 16286                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 16415                 return return_type_symbol;
 16287                 return return_type_symbol;
 16416                 
 16288                 
 16431 
 16303 
 16432         {
 16304         {
 16433             symbol_c *IN_type_symbol = param_data_type;
 16305             symbol_c *IN_type_symbol = param_data_type;
 16434             last_type_symbol = param_data_type;
 16306             last_type_symbol = param_data_type;
 16435             
 16307             
 16436             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16308             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16437             {
 16309             {
 16438         
 16310         
 16439                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16311                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16440                 return return_type_symbol;
 16312                 return return_type_symbol;
 16441                 
 16313                 
 16456 
 16328 
 16457         {
 16329         {
 16458             symbol_c *IN_type_symbol = param_data_type;
 16330             symbol_c *IN_type_symbol = param_data_type;
 16459             last_type_symbol = param_data_type;
 16331             last_type_symbol = param_data_type;
 16460             
 16332             
 16461             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16333             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16462             {
 16334             {
 16463         
 16335         
 16464                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16336                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16465                 return return_type_symbol;
 16337                 return return_type_symbol;
 16466                 
 16338                 
 16481 
 16353 
 16482         {
 16354         {
 16483             symbol_c *IN_type_symbol = param_data_type;
 16355             symbol_c *IN_type_symbol = param_data_type;
 16484             last_type_symbol = param_data_type;
 16356             last_type_symbol = param_data_type;
 16485             
 16357             
 16486             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16358             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16487             {
 16359             {
 16488         
 16360         
 16489                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 16361                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 16490                 return return_type_symbol;
 16362                 return return_type_symbol;
 16491                 
 16363                 
 16506 
 16378 
 16507         {
 16379         {
 16508             symbol_c *IN_type_symbol = param_data_type;
 16380             symbol_c *IN_type_symbol = param_data_type;
 16509             last_type_symbol = param_data_type;
 16381             last_type_symbol = param_data_type;
 16510             
 16382             
 16511             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16383             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16512             {
 16384             {
 16513         
 16385         
 16514                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 16386                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 16515                 return return_type_symbol;
 16387                 return return_type_symbol;
 16516                 
 16388                 
 16531 
 16403 
 16532         {
 16404         {
 16533             symbol_c *IN_type_symbol = param_data_type;
 16405             symbol_c *IN_type_symbol = param_data_type;
 16534             last_type_symbol = param_data_type;
 16406             last_type_symbol = param_data_type;
 16535             
 16407             
 16536             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16408             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16537             {
 16409             {
 16538         
 16410         
 16539                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 16411                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 16540                 return return_type_symbol;
 16412                 return return_type_symbol;
 16541                 
 16413                 
 16556 
 16428 
 16557         {
 16429         {
 16558             symbol_c *IN_type_symbol = param_data_type;
 16430             symbol_c *IN_type_symbol = param_data_type;
 16559             last_type_symbol = param_data_type;
 16431             last_type_symbol = param_data_type;
 16560             
 16432             
 16561             if (typeid(*last_type_symbol) == typeid(dint_type_name_c))
 16433             if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol))
 16562             {
 16434             {
 16563         
 16435         
 16564                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 16436                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 16565                 return return_type_symbol;
 16437                 return return_type_symbol;
 16566                 
 16438                 
 16581 
 16453 
 16582         {
 16454         {
 16583             symbol_c *IN_type_symbol = param_data_type;
 16455             symbol_c *IN_type_symbol = param_data_type;
 16584             last_type_symbol = param_data_type;
 16456             last_type_symbol = param_data_type;
 16585             
 16457             
 16586             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16458             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16587             {
 16459             {
 16588         
 16460         
 16589                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16461                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16590                 return return_type_symbol;
 16462                 return return_type_symbol;
 16591                 
 16463                 
 16606 
 16478 
 16607         {
 16479         {
 16608             symbol_c *IN_type_symbol = param_data_type;
 16480             symbol_c *IN_type_symbol = param_data_type;
 16609             last_type_symbol = param_data_type;
 16481             last_type_symbol = param_data_type;
 16610             
 16482             
 16611             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16483             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16612             {
 16484             {
 16613         
 16485         
 16614                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 16486                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 16615                 return return_type_symbol;
 16487                 return return_type_symbol;
 16616                 
 16488                 
 16631 
 16503 
 16632         {
 16504         {
 16633             symbol_c *IN_type_symbol = param_data_type;
 16505             symbol_c *IN_type_symbol = param_data_type;
 16634             last_type_symbol = param_data_type;
 16506             last_type_symbol = param_data_type;
 16635             
 16507             
 16636             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16508             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16637             {
 16509             {
 16638         
 16510         
 16639                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16511                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16640                 return return_type_symbol;
 16512                 return return_type_symbol;
 16641                 
 16513                 
 16656 
 16528 
 16657         {
 16529         {
 16658             symbol_c *IN_type_symbol = param_data_type;
 16530             symbol_c *IN_type_symbol = param_data_type;
 16659             last_type_symbol = param_data_type;
 16531             last_type_symbol = param_data_type;
 16660             
 16532             
 16661             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16533             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16662             {
 16534             {
 16663         
 16535         
 16664                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 16536                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 16665                 return return_type_symbol;
 16537                 return return_type_symbol;
 16666                 
 16538                 
 16681 
 16553 
 16682         {
 16554         {
 16683             symbol_c *IN_type_symbol = param_data_type;
 16555             symbol_c *IN_type_symbol = param_data_type;
 16684             last_type_symbol = param_data_type;
 16556             last_type_symbol = param_data_type;
 16685             
 16557             
 16686             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16558             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16687             {
 16559             {
 16688         
 16560         
 16689                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 16561                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 16690                 return return_type_symbol;
 16562                 return return_type_symbol;
 16691                 
 16563                 
 16706 
 16578 
 16707         {
 16579         {
 16708             symbol_c *IN_type_symbol = param_data_type;
 16580             symbol_c *IN_type_symbol = param_data_type;
 16709             last_type_symbol = param_data_type;
 16581             last_type_symbol = param_data_type;
 16710             
 16582             
 16711             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16583             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16712             {
 16584             {
 16713         
 16585         
 16714                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 16586                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 16715                 return return_type_symbol;
 16587                 return return_type_symbol;
 16716                 
 16588                 
 16731 
 16603 
 16732         {
 16604         {
 16733             symbol_c *IN_type_symbol = param_data_type;
 16605             symbol_c *IN_type_symbol = param_data_type;
 16734             last_type_symbol = param_data_type;
 16606             last_type_symbol = param_data_type;
 16735             
 16607             
 16736             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16608             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16737             {
 16609             {
 16738         
 16610         
 16739                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 16611                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 16740                 return return_type_symbol;
 16612                 return return_type_symbol;
 16741                 
 16613                 
 16756 
 16628 
 16757         {
 16629         {
 16758             symbol_c *IN_type_symbol = param_data_type;
 16630             symbol_c *IN_type_symbol = param_data_type;
 16759             last_type_symbol = param_data_type;
 16631             last_type_symbol = param_data_type;
 16760             
 16632             
 16761             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16633             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16762             {
 16634             {
 16763         
 16635         
 16764                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 16636                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 16765                 return return_type_symbol;
 16637                 return return_type_symbol;
 16766                 
 16638                 
 16781 
 16653 
 16782         {
 16654         {
 16783             symbol_c *IN_type_symbol = param_data_type;
 16655             symbol_c *IN_type_symbol = param_data_type;
 16784             last_type_symbol = param_data_type;
 16656             last_type_symbol = param_data_type;
 16785             
 16657             
 16786             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16658             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16787             {
 16659             {
 16788         
 16660         
 16789                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 16661                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 16790                 return return_type_symbol;
 16662                 return return_type_symbol;
 16791                 
 16663                 
 16806 
 16678 
 16807         {
 16679         {
 16808             symbol_c *IN_type_symbol = param_data_type;
 16680             symbol_c *IN_type_symbol = param_data_type;
 16809             last_type_symbol = param_data_type;
 16681             last_type_symbol = param_data_type;
 16810             
 16682             
 16811             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16683             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16812             {
 16684             {
 16813         
 16685         
 16814                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 16686                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 16815                 return return_type_symbol;
 16687                 return return_type_symbol;
 16816                 
 16688                 
 16831 
 16703 
 16832         {
 16704         {
 16833             symbol_c *IN_type_symbol = param_data_type;
 16705             symbol_c *IN_type_symbol = param_data_type;
 16834             last_type_symbol = param_data_type;
 16706             last_type_symbol = param_data_type;
 16835             
 16707             
 16836             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16708             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16837             {
 16709             {
 16838         
 16710         
 16839                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16711                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 16840                 return return_type_symbol;
 16712                 return return_type_symbol;
 16841                 
 16713                 
 16856 
 16728 
 16857         {
 16729         {
 16858             symbol_c *IN_type_symbol = param_data_type;
 16730             symbol_c *IN_type_symbol = param_data_type;
 16859             last_type_symbol = param_data_type;
 16731             last_type_symbol = param_data_type;
 16860             
 16732             
 16861             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16733             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16862             {
 16734             {
 16863         
 16735         
 16864                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 16736                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 16865                 return return_type_symbol;
 16737                 return return_type_symbol;
 16866                 
 16738                 
 16881 
 16753 
 16882         {
 16754         {
 16883             symbol_c *IN_type_symbol = param_data_type;
 16755             symbol_c *IN_type_symbol = param_data_type;
 16884             last_type_symbol = param_data_type;
 16756             last_type_symbol = param_data_type;
 16885             
 16757             
 16886             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16758             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16887             {
 16759             {
 16888         
 16760         
 16889                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 16761                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 16890                 return return_type_symbol;
 16762                 return return_type_symbol;
 16891                 
 16763                 
 16906 
 16778 
 16907         {
 16779         {
 16908             symbol_c *IN_type_symbol = param_data_type;
 16780             symbol_c *IN_type_symbol = param_data_type;
 16909             last_type_symbol = param_data_type;
 16781             last_type_symbol = param_data_type;
 16910             
 16782             
 16911             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16783             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16912             {
 16784             {
 16913         
 16785         
 16914                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16786                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 16915                 return return_type_symbol;
 16787                 return return_type_symbol;
 16916                 
 16788                 
 16931 
 16803 
 16932         {
 16804         {
 16933             symbol_c *IN_type_symbol = param_data_type;
 16805             symbol_c *IN_type_symbol = param_data_type;
 16934             last_type_symbol = param_data_type;
 16806             last_type_symbol = param_data_type;
 16935             
 16807             
 16936             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16808             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16937             {
 16809             {
 16938         
 16810         
 16939                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16811                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 16940                 return return_type_symbol;
 16812                 return return_type_symbol;
 16941                 
 16813                 
 16956 
 16828 
 16957         {
 16829         {
 16958             symbol_c *IN_type_symbol = param_data_type;
 16830             symbol_c *IN_type_symbol = param_data_type;
 16959             last_type_symbol = param_data_type;
 16831             last_type_symbol = param_data_type;
 16960             
 16832             
 16961             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16833             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16962             {
 16834             {
 16963         
 16835         
 16964                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 16836                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 16965                 return return_type_symbol;
 16837                 return return_type_symbol;
 16966                 
 16838                 
 16981 
 16853 
 16982         {
 16854         {
 16983             symbol_c *IN_type_symbol = param_data_type;
 16855             symbol_c *IN_type_symbol = param_data_type;
 16984             last_type_symbol = param_data_type;
 16856             last_type_symbol = param_data_type;
 16985             
 16857             
 16986             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16858             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 16987             {
 16859             {
 16988         
 16860         
 16989                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 16861                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 16990                 return return_type_symbol;
 16862                 return return_type_symbol;
 16991                 
 16863                 
 17006 
 16878 
 17007         {
 16879         {
 17008             symbol_c *IN_type_symbol = param_data_type;
 16880             symbol_c *IN_type_symbol = param_data_type;
 17009             last_type_symbol = param_data_type;
 16881             last_type_symbol = param_data_type;
 17010             
 16882             
 17011             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16883             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 17012             {
 16884             {
 17013         
 16885         
 17014                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 16886                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 17015                 return return_type_symbol;
 16887                 return return_type_symbol;
 17016                 
 16888                 
 17031 
 16903 
 17032         {
 16904         {
 17033             symbol_c *IN_type_symbol = param_data_type;
 16905             symbol_c *IN_type_symbol = param_data_type;
 17034             last_type_symbol = param_data_type;
 16906             last_type_symbol = param_data_type;
 17035             
 16907             
 17036             if (typeid(*last_type_symbol) == typeid(lint_type_name_c))
 16908             if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol))
 17037             {
 16909             {
 17038         
 16910         
 17039                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 16911                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 17040                 return return_type_symbol;
 16912                 return return_type_symbol;
 17041                 
 16913                 
 17056 
 16928 
 17057         {
 16929         {
 17058             symbol_c *IN_type_symbol = param_data_type;
 16930             symbol_c *IN_type_symbol = param_data_type;
 17059             last_type_symbol = param_data_type;
 16931             last_type_symbol = param_data_type;
 17060             
 16932             
 17061             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 16933             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17062             {
 16934             {
 17063         
 16935         
 17064                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 16936                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17065                 return return_type_symbol;
 16937                 return return_type_symbol;
 17066                 
 16938                 
 17081 
 16953 
 17082         {
 16954         {
 17083             symbol_c *IN_type_symbol = param_data_type;
 16955             symbol_c *IN_type_symbol = param_data_type;
 17084             last_type_symbol = param_data_type;
 16956             last_type_symbol = param_data_type;
 17085             
 16957             
 17086             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 16958             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17087             {
 16959             {
 17088         
 16960         
 17089                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 16961                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 17090                 return return_type_symbol;
 16962                 return return_type_symbol;
 17091                 
 16963                 
 17106 
 16978 
 17107         {
 16979         {
 17108             symbol_c *IN_type_symbol = param_data_type;
 16980             symbol_c *IN_type_symbol = param_data_type;
 17109             last_type_symbol = param_data_type;
 16981             last_type_symbol = param_data_type;
 17110             
 16982             
 17111             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 16983             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17112             {
 16984             {
 17113         
 16985         
 17114                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 16986                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 17115                 return return_type_symbol;
 16987                 return return_type_symbol;
 17116                 
 16988                 
 17131 
 17003 
 17132         {
 17004         {
 17133             symbol_c *IN_type_symbol = param_data_type;
 17005             symbol_c *IN_type_symbol = param_data_type;
 17134             last_type_symbol = param_data_type;
 17006             last_type_symbol = param_data_type;
 17135             
 17007             
 17136             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17008             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17137             {
 17009             {
 17138         
 17010         
 17139                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 17011                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 17140                 return return_type_symbol;
 17012                 return return_type_symbol;
 17141                 
 17013                 
 17156 
 17028 
 17157         {
 17029         {
 17158             symbol_c *IN_type_symbol = param_data_type;
 17030             symbol_c *IN_type_symbol = param_data_type;
 17159             last_type_symbol = param_data_type;
 17031             last_type_symbol = param_data_type;
 17160             
 17032             
 17161             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17033             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17162             {
 17034             {
 17163         
 17035         
 17164                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 17036                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 17165                 return return_type_symbol;
 17037                 return return_type_symbol;
 17166                 
 17038                 
 17181 
 17053 
 17182         {
 17054         {
 17183             symbol_c *IN_type_symbol = param_data_type;
 17055             symbol_c *IN_type_symbol = param_data_type;
 17184             last_type_symbol = param_data_type;
 17056             last_type_symbol = param_data_type;
 17185             
 17057             
 17186             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17058             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17187             {
 17059             {
 17188         
 17060         
 17189                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 17061                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 17190                 return return_type_symbol;
 17062                 return return_type_symbol;
 17191                 
 17063                 
 17206 
 17078 
 17207         {
 17079         {
 17208             symbol_c *IN_type_symbol = param_data_type;
 17080             symbol_c *IN_type_symbol = param_data_type;
 17209             last_type_symbol = param_data_type;
 17081             last_type_symbol = param_data_type;
 17210             
 17082             
 17211             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17083             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17212             {
 17084             {
 17213         
 17085         
 17214                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 17086                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 17215                 return return_type_symbol;
 17087                 return return_type_symbol;
 17216                 
 17088                 
 17231 
 17103 
 17232         {
 17104         {
 17233             symbol_c *IN_type_symbol = param_data_type;
 17105             symbol_c *IN_type_symbol = param_data_type;
 17234             last_type_symbol = param_data_type;
 17106             last_type_symbol = param_data_type;
 17235             
 17107             
 17236             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17108             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17237             {
 17109             {
 17238         
 17110         
 17239                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 17111                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 17240                 return return_type_symbol;
 17112                 return return_type_symbol;
 17241                 
 17113                 
 17256 
 17128 
 17257         {
 17129         {
 17258             symbol_c *IN_type_symbol = param_data_type;
 17130             symbol_c *IN_type_symbol = param_data_type;
 17259             last_type_symbol = param_data_type;
 17131             last_type_symbol = param_data_type;
 17260             
 17132             
 17261             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17133             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17262             {
 17134             {
 17263         
 17135         
 17264                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 17136                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 17265                 return return_type_symbol;
 17137                 return return_type_symbol;
 17266                 
 17138                 
 17281 
 17153 
 17282         {
 17154         {
 17283             symbol_c *IN_type_symbol = param_data_type;
 17155             symbol_c *IN_type_symbol = param_data_type;
 17284             last_type_symbol = param_data_type;
 17156             last_type_symbol = param_data_type;
 17285             
 17157             
 17286             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17158             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17287             {
 17159             {
 17288         
 17160         
 17289                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 17161                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 17290                 return return_type_symbol;
 17162                 return return_type_symbol;
 17291                 
 17163                 
 17306 
 17178 
 17307         {
 17179         {
 17308             symbol_c *IN_type_symbol = param_data_type;
 17180             symbol_c *IN_type_symbol = param_data_type;
 17309             last_type_symbol = param_data_type;
 17181             last_type_symbol = param_data_type;
 17310             
 17182             
 17311             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17183             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17312             {
 17184             {
 17313         
 17185         
 17314                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17186                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17315                 return return_type_symbol;
 17187                 return return_type_symbol;
 17316                 
 17188                 
 17331 
 17203 
 17332         {
 17204         {
 17333             symbol_c *IN_type_symbol = param_data_type;
 17205             symbol_c *IN_type_symbol = param_data_type;
 17334             last_type_symbol = param_data_type;
 17206             last_type_symbol = param_data_type;
 17335             
 17207             
 17336             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17208             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17337             {
 17209             {
 17338         
 17210         
 17339                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 17211                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 17340                 return return_type_symbol;
 17212                 return return_type_symbol;
 17341                 
 17213                 
 17356 
 17228 
 17357         {
 17229         {
 17358             symbol_c *IN_type_symbol = param_data_type;
 17230             symbol_c *IN_type_symbol = param_data_type;
 17359             last_type_symbol = param_data_type;
 17231             last_type_symbol = param_data_type;
 17360             
 17232             
 17361             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17233             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17362             {
 17234             {
 17363         
 17235         
 17364                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 17236                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 17365                 return return_type_symbol;
 17237                 return return_type_symbol;
 17366                 
 17238                 
 17381 
 17253 
 17382         {
 17254         {
 17383             symbol_c *IN_type_symbol = param_data_type;
 17255             symbol_c *IN_type_symbol = param_data_type;
 17384             last_type_symbol = param_data_type;
 17256             last_type_symbol = param_data_type;
 17385             
 17257             
 17386             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17258             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17387             {
 17259             {
 17388         
 17260         
 17389                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 17261                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 17390                 return return_type_symbol;
 17262                 return return_type_symbol;
 17391                 
 17263                 
 17406 
 17278 
 17407         {
 17279         {
 17408             symbol_c *IN_type_symbol = param_data_type;
 17280             symbol_c *IN_type_symbol = param_data_type;
 17409             last_type_symbol = param_data_type;
 17281             last_type_symbol = param_data_type;
 17410             
 17282             
 17411             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17283             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17412             {
 17284             {
 17413         
 17285         
 17414                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17286                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17415                 return return_type_symbol;
 17287                 return return_type_symbol;
 17416                 
 17288                 
 17431 
 17303 
 17432         {
 17304         {
 17433             symbol_c *IN_type_symbol = param_data_type;
 17305             symbol_c *IN_type_symbol = param_data_type;
 17434             last_type_symbol = param_data_type;
 17306             last_type_symbol = param_data_type;
 17435             
 17307             
 17436             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17308             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17437             {
 17309             {
 17438         
 17310         
 17439                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 17311                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 17440                 return return_type_symbol;
 17312                 return return_type_symbol;
 17441                 
 17313                 
 17456 
 17328 
 17457         {
 17329         {
 17458             symbol_c *IN_type_symbol = param_data_type;
 17330             symbol_c *IN_type_symbol = param_data_type;
 17459             last_type_symbol = param_data_type;
 17331             last_type_symbol = param_data_type;
 17460             
 17332             
 17461             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17333             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17462             {
 17334             {
 17463         
 17335         
 17464                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 17336                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 17465                 return return_type_symbol;
 17337                 return return_type_symbol;
 17466                 
 17338                 
 17481 
 17353 
 17482         {
 17354         {
 17483             symbol_c *IN_type_symbol = param_data_type;
 17355             symbol_c *IN_type_symbol = param_data_type;
 17484             last_type_symbol = param_data_type;
 17356             last_type_symbol = param_data_type;
 17485             
 17357             
 17486             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17358             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17487             {
 17359             {
 17488         
 17360         
 17489                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 17361                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 17490                 return return_type_symbol;
 17362                 return return_type_symbol;
 17491                 
 17363                 
 17506 
 17378 
 17507         {
 17379         {
 17508             symbol_c *IN_type_symbol = param_data_type;
 17380             symbol_c *IN_type_symbol = param_data_type;
 17509             last_type_symbol = param_data_type;
 17381             last_type_symbol = param_data_type;
 17510             
 17382             
 17511             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
 17383             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 17512             {
 17384             {
 17513         
 17385         
 17514                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 17386                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 17515                 return return_type_symbol;
 17387                 return return_type_symbol;
 17516                 
 17388                 
 17531 
 17403 
 17532         {
 17404         {
 17533             symbol_c *IN_type_symbol = param_data_type;
 17405             symbol_c *IN_type_symbol = param_data_type;
 17534             last_type_symbol = param_data_type;
 17406             last_type_symbol = param_data_type;
 17535             
 17407             
 17536             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17408             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17537             {
 17409             {
 17538         
 17410         
 17539                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17411                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17540                 return return_type_symbol;
 17412                 return return_type_symbol;
 17541                 
 17413                 
 17556 
 17428 
 17557         {
 17429         {
 17558             symbol_c *IN_type_symbol = param_data_type;
 17430             symbol_c *IN_type_symbol = param_data_type;
 17559             last_type_symbol = param_data_type;
 17431             last_type_symbol = param_data_type;
 17560             
 17432             
 17561             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17433             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17562             {
 17434             {
 17563         
 17435         
 17564                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 17436                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 17565                 return return_type_symbol;
 17437                 return return_type_symbol;
 17566                 
 17438                 
 17581 
 17453 
 17582         {
 17454         {
 17583             symbol_c *IN_type_symbol = param_data_type;
 17455             symbol_c *IN_type_symbol = param_data_type;
 17584             last_type_symbol = param_data_type;
 17456             last_type_symbol = param_data_type;
 17585             
 17457             
 17586             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17458             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17587             {
 17459             {
 17588         
 17460         
 17589                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 17461                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 17590                 return return_type_symbol;
 17462                 return return_type_symbol;
 17591                 
 17463                 
 17606 
 17478 
 17607         {
 17479         {
 17608             symbol_c *IN_type_symbol = param_data_type;
 17480             symbol_c *IN_type_symbol = param_data_type;
 17609             last_type_symbol = param_data_type;
 17481             last_type_symbol = param_data_type;
 17610             
 17482             
 17611             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17483             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17612             {
 17484             {
 17613         
 17485         
 17614                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 17486                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 17615                 return return_type_symbol;
 17487                 return return_type_symbol;
 17616                 
 17488                 
 17631 
 17503 
 17632         {
 17504         {
 17633             symbol_c *IN_type_symbol = param_data_type;
 17505             symbol_c *IN_type_symbol = param_data_type;
 17634             last_type_symbol = param_data_type;
 17506             last_type_symbol = param_data_type;
 17635             
 17507             
 17636             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17508             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17637             {
 17509             {
 17638         
 17510         
 17639                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 17511                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 17640                 return return_type_symbol;
 17512                 return return_type_symbol;
 17641                 
 17513                 
 17656 
 17528 
 17657         {
 17529         {
 17658             symbol_c *IN_type_symbol = param_data_type;
 17530             symbol_c *IN_type_symbol = param_data_type;
 17659             last_type_symbol = param_data_type;
 17531             last_type_symbol = param_data_type;
 17660             
 17532             
 17661             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17533             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17662             {
 17534             {
 17663         
 17535         
 17664                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 17536                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 17665                 return return_type_symbol;
 17537                 return return_type_symbol;
 17666                 
 17538                 
 17681 
 17553 
 17682         {
 17554         {
 17683             symbol_c *IN_type_symbol = param_data_type;
 17555             symbol_c *IN_type_symbol = param_data_type;
 17684             last_type_symbol = param_data_type;
 17556             last_type_symbol = param_data_type;
 17685             
 17557             
 17686             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17558             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17687             {
 17559             {
 17688         
 17560         
 17689                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 17561                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 17690                 return return_type_symbol;
 17562                 return return_type_symbol;
 17691                 
 17563                 
 17706 
 17578 
 17707         {
 17579         {
 17708             symbol_c *IN_type_symbol = param_data_type;
 17580             symbol_c *IN_type_symbol = param_data_type;
 17709             last_type_symbol = param_data_type;
 17581             last_type_symbol = param_data_type;
 17710             
 17582             
 17711             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17583             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17712             {
 17584             {
 17713         
 17585         
 17714                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 17586                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 17715                 return return_type_symbol;
 17587                 return return_type_symbol;
 17716                 
 17588                 
 17731 
 17603 
 17732         {
 17604         {
 17733             symbol_c *IN_type_symbol = param_data_type;
 17605             symbol_c *IN_type_symbol = param_data_type;
 17734             last_type_symbol = param_data_type;
 17606             last_type_symbol = param_data_type;
 17735             
 17607             
 17736             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17608             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17737             {
 17609             {
 17738         
 17610         
 17739                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 17611                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 17740                 return return_type_symbol;
 17612                 return return_type_symbol;
 17741                 
 17613                 
 17756 
 17628 
 17757         {
 17629         {
 17758             symbol_c *IN_type_symbol = param_data_type;
 17630             symbol_c *IN_type_symbol = param_data_type;
 17759             last_type_symbol = param_data_type;
 17631             last_type_symbol = param_data_type;
 17760             
 17632             
 17761             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17633             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17762             {
 17634             {
 17763         
 17635         
 17764                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 17636                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 17765                 return return_type_symbol;
 17637                 return return_type_symbol;
 17766                 
 17638                 
 17781 
 17653 
 17782         {
 17654         {
 17783             symbol_c *IN_type_symbol = param_data_type;
 17655             symbol_c *IN_type_symbol = param_data_type;
 17784             last_type_symbol = param_data_type;
 17656             last_type_symbol = param_data_type;
 17785             
 17657             
 17786             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17658             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17787             {
 17659             {
 17788         
 17660         
 17789                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17661                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 17790                 return return_type_symbol;
 17662                 return return_type_symbol;
 17791                 
 17663                 
 17806 
 17678 
 17807         {
 17679         {
 17808             symbol_c *IN_type_symbol = param_data_type;
 17680             symbol_c *IN_type_symbol = param_data_type;
 17809             last_type_symbol = param_data_type;
 17681             last_type_symbol = param_data_type;
 17810             
 17682             
 17811             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17683             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17812             {
 17684             {
 17813         
 17685         
 17814                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 17686                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 17815                 return return_type_symbol;
 17687                 return return_type_symbol;
 17816                 
 17688                 
 17831 
 17703 
 17832         {
 17704         {
 17833             symbol_c *IN_type_symbol = param_data_type;
 17705             symbol_c *IN_type_symbol = param_data_type;
 17834             last_type_symbol = param_data_type;
 17706             last_type_symbol = param_data_type;
 17835             
 17707             
 17836             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17708             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17837             {
 17709             {
 17838         
 17710         
 17839                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 17711                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 17840                 return return_type_symbol;
 17712                 return return_type_symbol;
 17841                 
 17713                 
 17856 
 17728 
 17857         {
 17729         {
 17858             symbol_c *IN_type_symbol = param_data_type;
 17730             symbol_c *IN_type_symbol = param_data_type;
 17859             last_type_symbol = param_data_type;
 17731             last_type_symbol = param_data_type;
 17860             
 17732             
 17861             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17733             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17862             {
 17734             {
 17863         
 17735         
 17864                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 17736                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 17865                 return return_type_symbol;
 17737                 return return_type_symbol;
 17866                 
 17738                 
 17881 
 17753 
 17882         {
 17754         {
 17883             symbol_c *IN_type_symbol = param_data_type;
 17755             symbol_c *IN_type_symbol = param_data_type;
 17884             last_type_symbol = param_data_type;
 17756             last_type_symbol = param_data_type;
 17885             
 17757             
 17886             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17758             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17887             {
 17759             {
 17888         
 17760         
 17889                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17761                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 17890                 return return_type_symbol;
 17762                 return return_type_symbol;
 17891                 
 17763                 
 17906 
 17778 
 17907         {
 17779         {
 17908             symbol_c *IN_type_symbol = param_data_type;
 17780             symbol_c *IN_type_symbol = param_data_type;
 17909             last_type_symbol = param_data_type;
 17781             last_type_symbol = param_data_type;
 17910             
 17782             
 17911             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17783             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17912             {
 17784             {
 17913         
 17785         
 17914                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 17786                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 17915                 return return_type_symbol;
 17787                 return return_type_symbol;
 17916                 
 17788                 
 17931 
 17803 
 17932         {
 17804         {
 17933             symbol_c *IN_type_symbol = param_data_type;
 17805             symbol_c *IN_type_symbol = param_data_type;
 17934             last_type_symbol = param_data_type;
 17806             last_type_symbol = param_data_type;
 17935             
 17807             
 17936             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17808             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17937             {
 17809             {
 17938         
 17810         
 17939                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 17811                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 17940                 return return_type_symbol;
 17812                 return return_type_symbol;
 17941                 
 17813                 
 17956 
 17828 
 17957         {
 17829         {
 17958             symbol_c *IN_type_symbol = param_data_type;
 17830             symbol_c *IN_type_symbol = param_data_type;
 17959             last_type_symbol = param_data_type;
 17831             last_type_symbol = param_data_type;
 17960             
 17832             
 17961             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17833             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17962             {
 17834             {
 17963         
 17835         
 17964                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 17836                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 17965                 return return_type_symbol;
 17837                 return return_type_symbol;
 17966                 
 17838                 
 17981 
 17853 
 17982         {
 17854         {
 17983             symbol_c *IN_type_symbol = param_data_type;
 17855             symbol_c *IN_type_symbol = param_data_type;
 17984             last_type_symbol = param_data_type;
 17856             last_type_symbol = param_data_type;
 17985             
 17857             
 17986             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
 17858             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 17987             {
 17859             {
 17988         
 17860         
 17989                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 17861                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 17990                 return return_type_symbol;
 17862                 return return_type_symbol;
 17991                 
 17863                 
 18006 
 17878 
 18007         {
 17879         {
 18008             symbol_c *IN_type_symbol = param_data_type;
 17880             symbol_c *IN_type_symbol = param_data_type;
 18009             last_type_symbol = param_data_type;
 17881             last_type_symbol = param_data_type;
 18010             
 17882             
 18011             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 17883             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18012             {
 17884             {
 18013         
 17885         
 18014                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 17886                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 18015                 return return_type_symbol;
 17887                 return return_type_symbol;
 18016                 
 17888                 
 18031 
 17903 
 18032         {
 17904         {
 18033             symbol_c *IN_type_symbol = param_data_type;
 17905             symbol_c *IN_type_symbol = param_data_type;
 18034             last_type_symbol = param_data_type;
 17906             last_type_symbol = param_data_type;
 18035             
 17907             
 18036             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 17908             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18037             {
 17909             {
 18038         
 17910         
 18039                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 17911                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 18040                 return return_type_symbol;
 17912                 return return_type_symbol;
 18041                 
 17913                 
 18056 
 17928 
 18057         {
 17929         {
 18058             symbol_c *IN_type_symbol = param_data_type;
 17930             symbol_c *IN_type_symbol = param_data_type;
 18059             last_type_symbol = param_data_type;
 17931             last_type_symbol = param_data_type;
 18060             
 17932             
 18061             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 17933             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18062             {
 17934             {
 18063         
 17935         
 18064                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 17936                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 18065                 return return_type_symbol;
 17937                 return return_type_symbol;
 18066                 
 17938                 
 18081 
 17953 
 18082         {
 17954         {
 18083             symbol_c *IN_type_symbol = param_data_type;
 17955             symbol_c *IN_type_symbol = param_data_type;
 18084             last_type_symbol = param_data_type;
 17956             last_type_symbol = param_data_type;
 18085             
 17957             
 18086             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 17958             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18087             {
 17959             {
 18088         
 17960         
 18089                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 17961                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 18090                 return return_type_symbol;
 17962                 return return_type_symbol;
 18091                 
 17963                 
 18106 
 17978 
 18107         {
 17979         {
 18108             symbol_c *IN_type_symbol = param_data_type;
 17980             symbol_c *IN_type_symbol = param_data_type;
 18109             last_type_symbol = param_data_type;
 17981             last_type_symbol = param_data_type;
 18110             
 17982             
 18111             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 17983             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18112             {
 17984             {
 18113         
 17985         
 18114                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 17986                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 18115                 return return_type_symbol;
 17987                 return return_type_symbol;
 18116                 
 17988                 
 18131 
 18003 
 18132         {
 18004         {
 18133             symbol_c *IN_type_symbol = param_data_type;
 18005             symbol_c *IN_type_symbol = param_data_type;
 18134             last_type_symbol = param_data_type;
 18006             last_type_symbol = param_data_type;
 18135             
 18007             
 18136             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18008             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18137             {
 18009             {
 18138         
 18010         
 18139                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 18011                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 18140                 return return_type_symbol;
 18012                 return return_type_symbol;
 18141                 
 18013                 
 18156 
 18028 
 18157         {
 18029         {
 18158             symbol_c *IN_type_symbol = param_data_type;
 18030             symbol_c *IN_type_symbol = param_data_type;
 18159             last_type_symbol = param_data_type;
 18031             last_type_symbol = param_data_type;
 18160             
 18032             
 18161             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18033             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18162             {
 18034             {
 18163         
 18035         
 18164                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 18036                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 18165                 return return_type_symbol;
 18037                 return return_type_symbol;
 18166                 
 18038                 
 18181 
 18053 
 18182         {
 18054         {
 18183             symbol_c *IN_type_symbol = param_data_type;
 18055             symbol_c *IN_type_symbol = param_data_type;
 18184             last_type_symbol = param_data_type;
 18056             last_type_symbol = param_data_type;
 18185             
 18057             
 18186             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18058             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18187             {
 18059             {
 18188         
 18060         
 18189                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 18061                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 18190                 return return_type_symbol;
 18062                 return return_type_symbol;
 18191                 
 18063                 
 18206 
 18078 
 18207         {
 18079         {
 18208             symbol_c *IN_type_symbol = param_data_type;
 18080             symbol_c *IN_type_symbol = param_data_type;
 18209             last_type_symbol = param_data_type;
 18081             last_type_symbol = param_data_type;
 18210             
 18082             
 18211             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18083             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18212             {
 18084             {
 18213         
 18085         
 18214                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 18086                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 18215                 return return_type_symbol;
 18087                 return return_type_symbol;
 18216                 
 18088                 
 18231 
 18103 
 18232         {
 18104         {
 18233             symbol_c *IN_type_symbol = param_data_type;
 18105             symbol_c *IN_type_symbol = param_data_type;
 18234             last_type_symbol = param_data_type;
 18106             last_type_symbol = param_data_type;
 18235             
 18107             
 18236             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18108             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18237             {
 18109             {
 18238         
 18110         
 18239                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 18111                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 18240                 return return_type_symbol;
 18112                 return return_type_symbol;
 18241                 
 18113                 
 18256 
 18128 
 18257         {
 18129         {
 18258             symbol_c *IN_type_symbol = param_data_type;
 18130             symbol_c *IN_type_symbol = param_data_type;
 18259             last_type_symbol = param_data_type;
 18131             last_type_symbol = param_data_type;
 18260             
 18132             
 18261             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18133             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18262             {
 18134             {
 18263         
 18135         
 18264                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 18136                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 18265                 return return_type_symbol;
 18137                 return return_type_symbol;
 18266                 
 18138                 
 18281 
 18153 
 18282         {
 18154         {
 18283             symbol_c *IN_type_symbol = param_data_type;
 18155             symbol_c *IN_type_symbol = param_data_type;
 18284             last_type_symbol = param_data_type;
 18156             last_type_symbol = param_data_type;
 18285             
 18157             
 18286             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18158             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18287             {
 18159             {
 18288         
 18160         
 18289                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 18161                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 18290                 return return_type_symbol;
 18162                 return return_type_symbol;
 18291                 
 18163                 
 18306 
 18178 
 18307         {
 18179         {
 18308             symbol_c *IN_type_symbol = param_data_type;
 18180             symbol_c *IN_type_symbol = param_data_type;
 18309             last_type_symbol = param_data_type;
 18181             last_type_symbol = param_data_type;
 18310             
 18182             
 18311             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18183             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18312             {
 18184             {
 18313         
 18185         
 18314                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 18186                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 18315                 return return_type_symbol;
 18187                 return return_type_symbol;
 18316                 
 18188                 
 18331 
 18203 
 18332         {
 18204         {
 18333             symbol_c *IN_type_symbol = param_data_type;
 18205             symbol_c *IN_type_symbol = param_data_type;
 18334             last_type_symbol = param_data_type;
 18206             last_type_symbol = param_data_type;
 18335             
 18207             
 18336             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18208             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18337             {
 18209             {
 18338         
 18210         
 18339                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 18211                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 18340                 return return_type_symbol;
 18212                 return return_type_symbol;
 18341                 
 18213                 
 18356 
 18228 
 18357         {
 18229         {
 18358             symbol_c *IN_type_symbol = param_data_type;
 18230             symbol_c *IN_type_symbol = param_data_type;
 18359             last_type_symbol = param_data_type;
 18231             last_type_symbol = param_data_type;
 18360             
 18232             
 18361             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18233             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18362             {
 18234             {
 18363         
 18235         
 18364                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18236                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18365                 return return_type_symbol;
 18237                 return return_type_symbol;
 18366                 
 18238                 
 18381 
 18253 
 18382         {
 18254         {
 18383             symbol_c *IN_type_symbol = param_data_type;
 18255             symbol_c *IN_type_symbol = param_data_type;
 18384             last_type_symbol = param_data_type;
 18256             last_type_symbol = param_data_type;
 18385             
 18257             
 18386             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18258             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18387             {
 18259             {
 18388         
 18260         
 18389                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 18261                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 18390                 return return_type_symbol;
 18262                 return return_type_symbol;
 18391                 
 18263                 
 18406 
 18278 
 18407         {
 18279         {
 18408             symbol_c *IN_type_symbol = param_data_type;
 18280             symbol_c *IN_type_symbol = param_data_type;
 18409             last_type_symbol = param_data_type;
 18281             last_type_symbol = param_data_type;
 18410             
 18282             
 18411             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18283             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18412             {
 18284             {
 18413         
 18285         
 18414                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 18286                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 18415                 return return_type_symbol;
 18287                 return return_type_symbol;
 18416                 
 18288                 
 18431 
 18303 
 18432         {
 18304         {
 18433             symbol_c *IN_type_symbol = param_data_type;
 18305             symbol_c *IN_type_symbol = param_data_type;
 18434             last_type_symbol = param_data_type;
 18306             last_type_symbol = param_data_type;
 18435             
 18307             
 18436             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18308             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18437             {
 18309             {
 18438         
 18310         
 18439                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 18311                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 18440                 return return_type_symbol;
 18312                 return return_type_symbol;
 18441                 
 18313                 
 18456 
 18328 
 18457         {
 18329         {
 18458             symbol_c *IN_type_symbol = param_data_type;
 18330             symbol_c *IN_type_symbol = param_data_type;
 18459             last_type_symbol = param_data_type;
 18331             last_type_symbol = param_data_type;
 18460             
 18332             
 18461             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
 18333             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 18462             {
 18334             {
 18463         
 18335         
 18464                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 18336                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 18465                 return return_type_symbol;
 18337                 return return_type_symbol;
 18466                 
 18338                 
 18481 
 18353 
 18482         {
 18354         {
 18483             symbol_c *IN_type_symbol = param_data_type;
 18355             symbol_c *IN_type_symbol = param_data_type;
 18484             last_type_symbol = param_data_type;
 18356             last_type_symbol = param_data_type;
 18485             
 18357             
 18486             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18358             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18487             {
 18359             {
 18488         
 18360         
 18489                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 18361                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 18490                 return return_type_symbol;
 18362                 return return_type_symbol;
 18491                 
 18363                 
 18506 
 18378 
 18507         {
 18379         {
 18508             symbol_c *IN_type_symbol = param_data_type;
 18380             symbol_c *IN_type_symbol = param_data_type;
 18509             last_type_symbol = param_data_type;
 18381             last_type_symbol = param_data_type;
 18510             
 18382             
 18511             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18383             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18512             {
 18384             {
 18513         
 18385         
 18514                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 18386                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 18515                 return return_type_symbol;
 18387                 return return_type_symbol;
 18516                 
 18388                 
 18531 
 18403 
 18532         {
 18404         {
 18533             symbol_c *IN_type_symbol = param_data_type;
 18405             symbol_c *IN_type_symbol = param_data_type;
 18534             last_type_symbol = param_data_type;
 18406             last_type_symbol = param_data_type;
 18535             
 18407             
 18536             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18408             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18537             {
 18409             {
 18538         
 18410         
 18539                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 18411                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 18540                 return return_type_symbol;
 18412                 return return_type_symbol;
 18541                 
 18413                 
 18556 
 18428 
 18557         {
 18429         {
 18558             symbol_c *IN_type_symbol = param_data_type;
 18430             symbol_c *IN_type_symbol = param_data_type;
 18559             last_type_symbol = param_data_type;
 18431             last_type_symbol = param_data_type;
 18560             
 18432             
 18561             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18433             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18562             {
 18434             {
 18563         
 18435         
 18564                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 18436                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 18565                 return return_type_symbol;
 18437                 return return_type_symbol;
 18566                 
 18438                 
 18581 
 18453 
 18582         {
 18454         {
 18583             symbol_c *IN_type_symbol = param_data_type;
 18455             symbol_c *IN_type_symbol = param_data_type;
 18584             last_type_symbol = param_data_type;
 18456             last_type_symbol = param_data_type;
 18585             
 18457             
 18586             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18458             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18587             {
 18459             {
 18588         
 18460         
 18589                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 18461                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 18590                 return return_type_symbol;
 18462                 return return_type_symbol;
 18591                 
 18463                 
 18606 
 18478 
 18607         {
 18479         {
 18608             symbol_c *IN_type_symbol = param_data_type;
 18480             symbol_c *IN_type_symbol = param_data_type;
 18609             last_type_symbol = param_data_type;
 18481             last_type_symbol = param_data_type;
 18610             
 18482             
 18611             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18483             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18612             {
 18484             {
 18613         
 18485         
 18614                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 18486                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 18615                 return return_type_symbol;
 18487                 return return_type_symbol;
 18616                 
 18488                 
 18631 
 18503 
 18632         {
 18504         {
 18633             symbol_c *IN_type_symbol = param_data_type;
 18505             symbol_c *IN_type_symbol = param_data_type;
 18634             last_type_symbol = param_data_type;
 18506             last_type_symbol = param_data_type;
 18635             
 18507             
 18636             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18508             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18637             {
 18509             {
 18638         
 18510         
 18639                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 18511                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 18640                 return return_type_symbol;
 18512                 return return_type_symbol;
 18641                 
 18513                 
 18656 
 18528 
 18657         {
 18529         {
 18658             symbol_c *IN_type_symbol = param_data_type;
 18530             symbol_c *IN_type_symbol = param_data_type;
 18659             last_type_symbol = param_data_type;
 18531             last_type_symbol = param_data_type;
 18660             
 18532             
 18661             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18533             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18662             {
 18534             {
 18663         
 18535         
 18664                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 18536                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 18665                 return return_type_symbol;
 18537                 return return_type_symbol;
 18666                 
 18538                 
 18681 
 18553 
 18682         {
 18554         {
 18683             symbol_c *IN_type_symbol = param_data_type;
 18555             symbol_c *IN_type_symbol = param_data_type;
 18684             last_type_symbol = param_data_type;
 18556             last_type_symbol = param_data_type;
 18685             
 18557             
 18686             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18558             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18687             {
 18559             {
 18688         
 18560         
 18689                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 18561                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 18690                 return return_type_symbol;
 18562                 return return_type_symbol;
 18691                 
 18563                 
 18706 
 18578 
 18707         {
 18579         {
 18708             symbol_c *IN_type_symbol = param_data_type;
 18580             symbol_c *IN_type_symbol = param_data_type;
 18709             last_type_symbol = param_data_type;
 18581             last_type_symbol = param_data_type;
 18710             
 18582             
 18711             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18583             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18712             {
 18584             {
 18713         
 18585         
 18714                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 18586                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 18715                 return return_type_symbol;
 18587                 return return_type_symbol;
 18716                 
 18588                 
 18731 
 18603 
 18732         {
 18604         {
 18733             symbol_c *IN_type_symbol = param_data_type;
 18605             symbol_c *IN_type_symbol = param_data_type;
 18734             last_type_symbol = param_data_type;
 18606             last_type_symbol = param_data_type;
 18735             
 18607             
 18736             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18608             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18737             {
 18609             {
 18738         
 18610         
 18739                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 18611                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 18740                 return return_type_symbol;
 18612                 return return_type_symbol;
 18741                 
 18613                 
 18756 
 18628 
 18757         {
 18629         {
 18758             symbol_c *IN_type_symbol = param_data_type;
 18630             symbol_c *IN_type_symbol = param_data_type;
 18759             last_type_symbol = param_data_type;
 18631             last_type_symbol = param_data_type;
 18760             
 18632             
 18761             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18633             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18762             {
 18634             {
 18763         
 18635         
 18764                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 18636                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 18765                 return return_type_symbol;
 18637                 return return_type_symbol;
 18766                 
 18638                 
 18781 
 18653 
 18782         {
 18654         {
 18783             symbol_c *IN_type_symbol = param_data_type;
 18655             symbol_c *IN_type_symbol = param_data_type;
 18784             last_type_symbol = param_data_type;
 18656             last_type_symbol = param_data_type;
 18785             
 18657             
 18786             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18658             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18787             {
 18659             {
 18788         
 18660         
 18789                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 18661                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 18790                 return return_type_symbol;
 18662                 return return_type_symbol;
 18791                 
 18663                 
 18806 
 18678 
 18807         {
 18679         {
 18808             symbol_c *IN_type_symbol = param_data_type;
 18680             symbol_c *IN_type_symbol = param_data_type;
 18809             last_type_symbol = param_data_type;
 18681             last_type_symbol = param_data_type;
 18810             
 18682             
 18811             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18683             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18812             {
 18684             {
 18813         
 18685         
 18814                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 18686                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 18815                 return return_type_symbol;
 18687                 return return_type_symbol;
 18816                 
 18688                 
 18831 
 18703 
 18832         {
 18704         {
 18833             symbol_c *IN_type_symbol = param_data_type;
 18705             symbol_c *IN_type_symbol = param_data_type;
 18834             last_type_symbol = param_data_type;
 18706             last_type_symbol = param_data_type;
 18835             
 18707             
 18836             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18708             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18837             {
 18709             {
 18838         
 18710         
 18839                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18711                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 18840                 return return_type_symbol;
 18712                 return return_type_symbol;
 18841                 
 18713                 
 18856 
 18728 
 18857         {
 18729         {
 18858             symbol_c *IN_type_symbol = param_data_type;
 18730             symbol_c *IN_type_symbol = param_data_type;
 18859             last_type_symbol = param_data_type;
 18731             last_type_symbol = param_data_type;
 18860             
 18732             
 18861             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18733             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18862             {
 18734             {
 18863         
 18735         
 18864                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 18736                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 18865                 return return_type_symbol;
 18737                 return return_type_symbol;
 18866                 
 18738                 
 18881 
 18753 
 18882         {
 18754         {
 18883             symbol_c *IN_type_symbol = param_data_type;
 18755             symbol_c *IN_type_symbol = param_data_type;
 18884             last_type_symbol = param_data_type;
 18756             last_type_symbol = param_data_type;
 18885             
 18757             
 18886             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18758             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18887             {
 18759             {
 18888         
 18760         
 18889                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 18761                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 18890                 return return_type_symbol;
 18762                 return return_type_symbol;
 18891                 
 18763                 
 18906 
 18778 
 18907         {
 18779         {
 18908             symbol_c *IN_type_symbol = param_data_type;
 18780             symbol_c *IN_type_symbol = param_data_type;
 18909             last_type_symbol = param_data_type;
 18781             last_type_symbol = param_data_type;
 18910             
 18782             
 18911             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18783             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18912             {
 18784             {
 18913         
 18785         
 18914                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 18786                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 18915                 return return_type_symbol;
 18787                 return return_type_symbol;
 18916                 
 18788                 
 18931 
 18803 
 18932         {
 18804         {
 18933             symbol_c *IN_type_symbol = param_data_type;
 18805             symbol_c *IN_type_symbol = param_data_type;
 18934             last_type_symbol = param_data_type;
 18806             last_type_symbol = param_data_type;
 18935             
 18807             
 18936             if (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
 18808             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 18937             {
 18809             {
 18938         
 18810         
 18939                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 18811                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 18940                 return return_type_symbol;
 18812                 return return_type_symbol;
 18941                 
 18813                 
 18956 
 18828 
 18957         {
 18829         {
 18958             symbol_c *IN_type_symbol = param_data_type;
 18830             symbol_c *IN_type_symbol = param_data_type;
 18959             last_type_symbol = param_data_type;
 18831             last_type_symbol = param_data_type;
 18960             
 18832             
 18961             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 18833             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 18962             {
 18834             {
 18963         
 18835         
 18964                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 18836                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 18965                 return return_type_symbol;
 18837                 return return_type_symbol;
 18966                 
 18838                 
 18981 
 18853 
 18982         {
 18854         {
 18983             symbol_c *IN_type_symbol = param_data_type;
 18855             symbol_c *IN_type_symbol = param_data_type;
 18984             last_type_symbol = param_data_type;
 18856             last_type_symbol = param_data_type;
 18985             
 18857             
 18986             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 18858             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 18987             {
 18859             {
 18988         
 18860         
 18989                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 18861                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 18990                 return return_type_symbol;
 18862                 return return_type_symbol;
 18991                 
 18863                 
 19006 
 18878 
 19007         {
 18879         {
 19008             symbol_c *IN_type_symbol = param_data_type;
 18880             symbol_c *IN_type_symbol = param_data_type;
 19009             last_type_symbol = param_data_type;
 18881             last_type_symbol = param_data_type;
 19010             
 18882             
 19011             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 18883             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19012             {
 18884             {
 19013         
 18885         
 19014                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 18886                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 19015                 return return_type_symbol;
 18887                 return return_type_symbol;
 19016                 
 18888                 
 19031 
 18903 
 19032         {
 18904         {
 19033             symbol_c *IN_type_symbol = param_data_type;
 18905             symbol_c *IN_type_symbol = param_data_type;
 19034             last_type_symbol = param_data_type;
 18906             last_type_symbol = param_data_type;
 19035             
 18907             
 19036             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 18908             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19037             {
 18909             {
 19038         
 18910         
 19039                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 18911                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 19040                 return return_type_symbol;
 18912                 return return_type_symbol;
 19041                 
 18913                 
 19056 
 18928 
 19057         {
 18929         {
 19058             symbol_c *IN_type_symbol = param_data_type;
 18930             symbol_c *IN_type_symbol = param_data_type;
 19059             last_type_symbol = param_data_type;
 18931             last_type_symbol = param_data_type;
 19060             
 18932             
 19061             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 18933             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19062             {
 18934             {
 19063         
 18935         
 19064                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 18936                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 19065                 return return_type_symbol;
 18937                 return return_type_symbol;
 19066                 
 18938                 
 19081 
 18953 
 19082         {
 18954         {
 19083             symbol_c *IN_type_symbol = param_data_type;
 18955             symbol_c *IN_type_symbol = param_data_type;
 19084             last_type_symbol = param_data_type;
 18956             last_type_symbol = param_data_type;
 19085             
 18957             
 19086             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 18958             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19087             {
 18959             {
 19088         
 18960         
 19089                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 18961                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 19090                 return return_type_symbol;
 18962                 return return_type_symbol;
 19091                 
 18963                 
 19106 
 18978 
 19107         {
 18979         {
 19108             symbol_c *IN_type_symbol = param_data_type;
 18980             symbol_c *IN_type_symbol = param_data_type;
 19109             last_type_symbol = param_data_type;
 18981             last_type_symbol = param_data_type;
 19110             
 18982             
 19111             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 18983             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19112             {
 18984             {
 19113         
 18985         
 19114                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 18986                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 19115                 return return_type_symbol;
 18987                 return return_type_symbol;
 19116                 
 18988                 
 19131 
 19003 
 19132         {
 19004         {
 19133             symbol_c *IN_type_symbol = param_data_type;
 19005             symbol_c *IN_type_symbol = param_data_type;
 19134             last_type_symbol = param_data_type;
 19006             last_type_symbol = param_data_type;
 19135             
 19007             
 19136             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19008             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19137             {
 19009             {
 19138         
 19010         
 19139                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 19011                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 19140                 return return_type_symbol;
 19012                 return return_type_symbol;
 19141                 
 19013                 
 19156 
 19028 
 19157         {
 19029         {
 19158             symbol_c *IN_type_symbol = param_data_type;
 19030             symbol_c *IN_type_symbol = param_data_type;
 19159             last_type_symbol = param_data_type;
 19031             last_type_symbol = param_data_type;
 19160             
 19032             
 19161             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19033             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19162             {
 19034             {
 19163         
 19035         
 19164                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 19036                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 19165                 return return_type_symbol;
 19037                 return return_type_symbol;
 19166                 
 19038                 
 19181 
 19053 
 19182         {
 19054         {
 19183             symbol_c *IN_type_symbol = param_data_type;
 19055             symbol_c *IN_type_symbol = param_data_type;
 19184             last_type_symbol = param_data_type;
 19056             last_type_symbol = param_data_type;
 19185             
 19057             
 19186             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19058             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19187             {
 19059             {
 19188         
 19060         
 19189                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 19061                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 19190                 return return_type_symbol;
 19062                 return return_type_symbol;
 19191                 
 19063                 
 19206 
 19078 
 19207         {
 19079         {
 19208             symbol_c *IN_type_symbol = param_data_type;
 19080             symbol_c *IN_type_symbol = param_data_type;
 19209             last_type_symbol = param_data_type;
 19081             last_type_symbol = param_data_type;
 19210             
 19082             
 19211             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19083             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19212             {
 19084             {
 19213         
 19085         
 19214                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 19086                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 19215                 return return_type_symbol;
 19087                 return return_type_symbol;
 19216                 
 19088                 
 19231 
 19103 
 19232         {
 19104         {
 19233             symbol_c *IN_type_symbol = param_data_type;
 19105             symbol_c *IN_type_symbol = param_data_type;
 19234             last_type_symbol = param_data_type;
 19106             last_type_symbol = param_data_type;
 19235             
 19107             
 19236             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19108             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19237             {
 19109             {
 19238         
 19110         
 19239                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 19111                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 19240                 return return_type_symbol;
 19112                 return return_type_symbol;
 19241                 
 19113                 
 19256 
 19128 
 19257         {
 19129         {
 19258             symbol_c *IN_type_symbol = param_data_type;
 19130             symbol_c *IN_type_symbol = param_data_type;
 19259             last_type_symbol = param_data_type;
 19131             last_type_symbol = param_data_type;
 19260             
 19132             
 19261             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19133             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19262             {
 19134             {
 19263         
 19135         
 19264                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 19136                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 19265                 return return_type_symbol;
 19137                 return return_type_symbol;
 19266                 
 19138                 
 19281 
 19153 
 19282         {
 19154         {
 19283             symbol_c *IN_type_symbol = param_data_type;
 19155             symbol_c *IN_type_symbol = param_data_type;
 19284             last_type_symbol = param_data_type;
 19156             last_type_symbol = param_data_type;
 19285             
 19157             
 19286             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19158             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19287             {
 19159             {
 19288         
 19160         
 19289                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 19161                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 19290                 return return_type_symbol;
 19162                 return return_type_symbol;
 19291                 
 19163                 
 19306 
 19178 
 19307         {
 19179         {
 19308             symbol_c *IN_type_symbol = param_data_type;
 19180             symbol_c *IN_type_symbol = param_data_type;
 19309             last_type_symbol = param_data_type;
 19181             last_type_symbol = param_data_type;
 19310             
 19182             
 19311             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19183             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19312             {
 19184             {
 19313         
 19185         
 19314                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19186                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19315                 return return_type_symbol;
 19187                 return return_type_symbol;
 19316                 
 19188                 
 19331 
 19203 
 19332         {
 19204         {
 19333             symbol_c *IN_type_symbol = param_data_type;
 19205             symbol_c *IN_type_symbol = param_data_type;
 19334             last_type_symbol = param_data_type;
 19206             last_type_symbol = param_data_type;
 19335             
 19207             
 19336             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19208             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19337             {
 19209             {
 19338         
 19210         
 19339                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 19211                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 19340                 return return_type_symbol;
 19212                 return return_type_symbol;
 19341                 
 19213                 
 19356 
 19228 
 19357         {
 19229         {
 19358             symbol_c *IN_type_symbol = param_data_type;
 19230             symbol_c *IN_type_symbol = param_data_type;
 19359             last_type_symbol = param_data_type;
 19231             last_type_symbol = param_data_type;
 19360             
 19232             
 19361             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19233             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19362             {
 19234             {
 19363         
 19235         
 19364                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 19236                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 19365                 return return_type_symbol;
 19237                 return return_type_symbol;
 19366                 
 19238                 
 19381 
 19253 
 19382         {
 19254         {
 19383             symbol_c *IN_type_symbol = param_data_type;
 19255             symbol_c *IN_type_symbol = param_data_type;
 19384             last_type_symbol = param_data_type;
 19256             last_type_symbol = param_data_type;
 19385             
 19257             
 19386             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19258             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19387             {
 19259             {
 19388         
 19260         
 19389                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 19261                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 19390                 return return_type_symbol;
 19262                 return return_type_symbol;
 19391                 
 19263                 
 19406 
 19278 
 19407         {
 19279         {
 19408             symbol_c *IN_type_symbol = param_data_type;
 19280             symbol_c *IN_type_symbol = param_data_type;
 19409             last_type_symbol = param_data_type;
 19281             last_type_symbol = param_data_type;
 19410             
 19282             
 19411             if (typeid(*last_type_symbol) == typeid(real_type_name_c))
 19283             if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol))
 19412             {
 19284             {
 19413         
 19285         
 19414                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 19286                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 19415                 return return_type_symbol;
 19287                 return return_type_symbol;
 19416                 
 19288                 
 19431 
 19303 
 19432         {
 19304         {
 19433             symbol_c *IN_type_symbol = param_data_type;
 19305             symbol_c *IN_type_symbol = param_data_type;
 19434             last_type_symbol = param_data_type;
 19306             last_type_symbol = param_data_type;
 19435             
 19307             
 19436             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19308             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19437             {
 19309             {
 19438         
 19310         
 19439                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 19311                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 19440                 return return_type_symbol;
 19312                 return return_type_symbol;
 19441                 
 19313                 
 19456 
 19328 
 19457         {
 19329         {
 19458             symbol_c *IN_type_symbol = param_data_type;
 19330             symbol_c *IN_type_symbol = param_data_type;
 19459             last_type_symbol = param_data_type;
 19331             last_type_symbol = param_data_type;
 19460             
 19332             
 19461             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19333             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19462             {
 19334             {
 19463         
 19335         
 19464                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 19336                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 19465                 return return_type_symbol;
 19337                 return return_type_symbol;
 19466                 
 19338                 
 19481 
 19353 
 19482         {
 19354         {
 19483             symbol_c *IN_type_symbol = param_data_type;
 19355             symbol_c *IN_type_symbol = param_data_type;
 19484             last_type_symbol = param_data_type;
 19356             last_type_symbol = param_data_type;
 19485             
 19357             
 19486             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19358             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19487             {
 19359             {
 19488         
 19360         
 19489                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 19361                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 19490                 return return_type_symbol;
 19362                 return return_type_symbol;
 19491                 
 19363                 
 19506 
 19378 
 19507         {
 19379         {
 19508             symbol_c *IN_type_symbol = param_data_type;
 19380             symbol_c *IN_type_symbol = param_data_type;
 19509             last_type_symbol = param_data_type;
 19381             last_type_symbol = param_data_type;
 19510             
 19382             
 19511             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19383             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19512             {
 19384             {
 19513         
 19385         
 19514                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 19386                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 19515                 return return_type_symbol;
 19387                 return return_type_symbol;
 19516                 
 19388                 
 19531 
 19403 
 19532         {
 19404         {
 19533             symbol_c *IN_type_symbol = param_data_type;
 19405             symbol_c *IN_type_symbol = param_data_type;
 19534             last_type_symbol = param_data_type;
 19406             last_type_symbol = param_data_type;
 19535             
 19407             
 19536             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19408             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19537             {
 19409             {
 19538         
 19410         
 19539                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 19411                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 19540                 return return_type_symbol;
 19412                 return return_type_symbol;
 19541                 
 19413                 
 19556 
 19428 
 19557         {
 19429         {
 19558             symbol_c *IN_type_symbol = param_data_type;
 19430             symbol_c *IN_type_symbol = param_data_type;
 19559             last_type_symbol = param_data_type;
 19431             last_type_symbol = param_data_type;
 19560             
 19432             
 19561             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19433             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19562             {
 19434             {
 19563         
 19435         
 19564                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 19436                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 19565                 return return_type_symbol;
 19437                 return return_type_symbol;
 19566                 
 19438                 
 19581 
 19453 
 19582         {
 19454         {
 19583             symbol_c *IN_type_symbol = param_data_type;
 19455             symbol_c *IN_type_symbol = param_data_type;
 19584             last_type_symbol = param_data_type;
 19456             last_type_symbol = param_data_type;
 19585             
 19457             
 19586             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19458             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19587             {
 19459             {
 19588         
 19460         
 19589                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 19461                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 19590                 return return_type_symbol;
 19462                 return return_type_symbol;
 19591                 
 19463                 
 19606 
 19478 
 19607         {
 19479         {
 19608             symbol_c *IN_type_symbol = param_data_type;
 19480             symbol_c *IN_type_symbol = param_data_type;
 19609             last_type_symbol = param_data_type;
 19481             last_type_symbol = param_data_type;
 19610             
 19482             
 19611             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19483             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19612             {
 19484             {
 19613         
 19485         
 19614                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 19486                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 19615                 return return_type_symbol;
 19487                 return return_type_symbol;
 19616                 
 19488                 
 19631 
 19503 
 19632         {
 19504         {
 19633             symbol_c *IN_type_symbol = param_data_type;
 19505             symbol_c *IN_type_symbol = param_data_type;
 19634             last_type_symbol = param_data_type;
 19506             last_type_symbol = param_data_type;
 19635             
 19507             
 19636             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19508             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19637             {
 19509             {
 19638         
 19510         
 19639                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 19511                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 19640                 return return_type_symbol;
 19512                 return return_type_symbol;
 19641                 
 19513                 
 19656 
 19528 
 19657         {
 19529         {
 19658             symbol_c *IN_type_symbol = param_data_type;
 19530             symbol_c *IN_type_symbol = param_data_type;
 19659             last_type_symbol = param_data_type;
 19531             last_type_symbol = param_data_type;
 19660             
 19532             
 19661             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19533             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19662             {
 19534             {
 19663         
 19535         
 19664                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 19536                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 19665                 return return_type_symbol;
 19537                 return return_type_symbol;
 19666                 
 19538                 
 19681 
 19553 
 19682         {
 19554         {
 19683             symbol_c *IN_type_symbol = param_data_type;
 19555             symbol_c *IN_type_symbol = param_data_type;
 19684             last_type_symbol = param_data_type;
 19556             last_type_symbol = param_data_type;
 19685             
 19557             
 19686             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19558             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19687             {
 19559             {
 19688         
 19560         
 19689                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 19561                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 19690                 return return_type_symbol;
 19562                 return return_type_symbol;
 19691                 
 19563                 
 19706 
 19578 
 19707         {
 19579         {
 19708             symbol_c *IN_type_symbol = param_data_type;
 19580             symbol_c *IN_type_symbol = param_data_type;
 19709             last_type_symbol = param_data_type;
 19581             last_type_symbol = param_data_type;
 19710             
 19582             
 19711             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19583             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19712             {
 19584             {
 19713         
 19585         
 19714                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 19586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 19715                 return return_type_symbol;
 19587                 return return_type_symbol;
 19716                 
 19588                 
 19731 
 19603 
 19732         {
 19604         {
 19733             symbol_c *IN_type_symbol = param_data_type;
 19605             symbol_c *IN_type_symbol = param_data_type;
 19734             last_type_symbol = param_data_type;
 19606             last_type_symbol = param_data_type;
 19735             
 19607             
 19736             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19608             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19737             {
 19609             {
 19738         
 19610         
 19739                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 19611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 19740                 return return_type_symbol;
 19612                 return return_type_symbol;
 19741                 
 19613                 
 19756 
 19628 
 19757         {
 19629         {
 19758             symbol_c *IN_type_symbol = param_data_type;
 19630             symbol_c *IN_type_symbol = param_data_type;
 19759             last_type_symbol = param_data_type;
 19631             last_type_symbol = param_data_type;
 19760             
 19632             
 19761             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19633             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19762             {
 19634             {
 19763         
 19635         
 19764                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 19636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 19765                 return return_type_symbol;
 19637                 return return_type_symbol;
 19766                 
 19638                 
 19781 
 19653 
 19782         {
 19654         {
 19783             symbol_c *IN_type_symbol = param_data_type;
 19655             symbol_c *IN_type_symbol = param_data_type;
 19784             last_type_symbol = param_data_type;
 19656             last_type_symbol = param_data_type;
 19785             
 19657             
 19786             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19658             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19787             {
 19659             {
 19788         
 19660         
 19789                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19661                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 19790                 return return_type_symbol;
 19662                 return return_type_symbol;
 19791                 
 19663                 
 19806 
 19678 
 19807         {
 19679         {
 19808             symbol_c *IN_type_symbol = param_data_type;
 19680             symbol_c *IN_type_symbol = param_data_type;
 19809             last_type_symbol = param_data_type;
 19681             last_type_symbol = param_data_type;
 19810             
 19682             
 19811             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19683             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19812             {
 19684             {
 19813         
 19685         
 19814                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 19686                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 19815                 return return_type_symbol;
 19687                 return return_type_symbol;
 19816                 
 19688                 
 19831 
 19703 
 19832         {
 19704         {
 19833             symbol_c *IN_type_symbol = param_data_type;
 19705             symbol_c *IN_type_symbol = param_data_type;
 19834             last_type_symbol = param_data_type;
 19706             last_type_symbol = param_data_type;
 19835             
 19707             
 19836             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19708             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19837             {
 19709             {
 19838         
 19710         
 19839                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 19711                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 19840                 return return_type_symbol;
 19712                 return return_type_symbol;
 19841                 
 19713                 
 19856 
 19728 
 19857         {
 19729         {
 19858             symbol_c *IN_type_symbol = param_data_type;
 19730             symbol_c *IN_type_symbol = param_data_type;
 19859             last_type_symbol = param_data_type;
 19731             last_type_symbol = param_data_type;
 19860             
 19732             
 19861             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19733             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19862             {
 19734             {
 19863         
 19735         
 19864                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 19736                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 19865                 return return_type_symbol;
 19737                 return return_type_symbol;
 19866                 
 19738                 
 19881 
 19753 
 19882         {
 19754         {
 19883             symbol_c *IN_type_symbol = param_data_type;
 19755             symbol_c *IN_type_symbol = param_data_type;
 19884             last_type_symbol = param_data_type;
 19756             last_type_symbol = param_data_type;
 19885             
 19757             
 19886             if (typeid(*last_type_symbol) == typeid(lreal_type_name_c))
 19758             if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol))
 19887             {
 19759             {
 19888         
 19760         
 19889                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 19761                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 19890                 return return_type_symbol;
 19762                 return return_type_symbol;
 19891                 
 19763                 
 19896         
 19768         
 19897     }/*function_lreal_to_lword*/
 19769     }/*function_lreal_to_lword*/
 19898     break;
 19770     break;
 19899 
 19771 
 19900 /****
 19772 /****
 19901  *TIME_TO_BOOL
 19773  *TIME_TO_SINT
 19902  */
 19774  */
 19903     case function_time_to_bool :
 19775     case function_time_to_sint :
 19904     {
 19776     {
 19905         symbol_c *last_type_symbol = NULL;
 19777         symbol_c *last_type_symbol = NULL;
 19906 
 19778 
 19907         {
 19779         {
 19908             symbol_c *IN_type_symbol = param_data_type;
 19780             symbol_c *IN_type_symbol = param_data_type;
 19909             last_type_symbol = param_data_type;
 19781             last_type_symbol = param_data_type;
 19910             
 19782             
 19911             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 19783             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19784             {
       
 19785         
       
 19786                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 19787                 return return_type_symbol;
       
 19788                 
       
 19789             }
       
 19790             
       
 19791             ERROR;
       
 19792         }
       
 19793         
       
 19794     }/*function_time_to_sint*/
       
 19795     break;
       
 19796 
       
 19797 /****
       
 19798  *TIME_TO_INT
       
 19799  */
       
 19800     case function_time_to_int :
       
 19801     {
       
 19802         symbol_c *last_type_symbol = NULL;
       
 19803 
       
 19804         {
       
 19805             symbol_c *IN_type_symbol = param_data_type;
       
 19806             last_type_symbol = param_data_type;
       
 19807             
       
 19808             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19809             {
       
 19810         
       
 19811                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 19812                 return return_type_symbol;
       
 19813                 
       
 19814             }
       
 19815             
       
 19816             ERROR;
       
 19817         }
       
 19818         
       
 19819     }/*function_time_to_int*/
       
 19820     break;
       
 19821 
       
 19822 /****
       
 19823  *TIME_TO_DINT
       
 19824  */
       
 19825     case function_time_to_dint :
       
 19826     {
       
 19827         symbol_c *last_type_symbol = NULL;
       
 19828 
       
 19829         {
       
 19830             symbol_c *IN_type_symbol = param_data_type;
       
 19831             last_type_symbol = param_data_type;
       
 19832             
       
 19833             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19834             {
       
 19835         
       
 19836                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 19837                 return return_type_symbol;
       
 19838                 
       
 19839             }
       
 19840             
       
 19841             ERROR;
       
 19842         }
       
 19843         
       
 19844     }/*function_time_to_dint*/
       
 19845     break;
       
 19846 
       
 19847 /****
       
 19848  *TIME_TO_LINT
       
 19849  */
       
 19850     case function_time_to_lint :
       
 19851     {
       
 19852         symbol_c *last_type_symbol = NULL;
       
 19853 
       
 19854         {
       
 19855             symbol_c *IN_type_symbol = param_data_type;
       
 19856             last_type_symbol = param_data_type;
       
 19857             
       
 19858             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19859             {
       
 19860         
       
 19861                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 19862                 return return_type_symbol;
       
 19863                 
       
 19864             }
       
 19865             
       
 19866             ERROR;
       
 19867         }
       
 19868         
       
 19869     }/*function_time_to_lint*/
       
 19870     break;
       
 19871 
       
 19872 /****
       
 19873  *TIME_TO_USINT
       
 19874  */
       
 19875     case function_time_to_usint :
       
 19876     {
       
 19877         symbol_c *last_type_symbol = NULL;
       
 19878 
       
 19879         {
       
 19880             symbol_c *IN_type_symbol = param_data_type;
       
 19881             last_type_symbol = param_data_type;
       
 19882             
       
 19883             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19884             {
       
 19885         
       
 19886                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 19887                 return return_type_symbol;
       
 19888                 
       
 19889             }
       
 19890             
       
 19891             ERROR;
       
 19892         }
       
 19893         
       
 19894     }/*function_time_to_usint*/
       
 19895     break;
       
 19896 
       
 19897 /****
       
 19898  *TIME_TO_UINT
       
 19899  */
       
 19900     case function_time_to_uint :
       
 19901     {
       
 19902         symbol_c *last_type_symbol = NULL;
       
 19903 
       
 19904         {
       
 19905             symbol_c *IN_type_symbol = param_data_type;
       
 19906             last_type_symbol = param_data_type;
       
 19907             
       
 19908             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19909             {
       
 19910         
       
 19911                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 19912                 return return_type_symbol;
       
 19913                 
       
 19914             }
       
 19915             
       
 19916             ERROR;
       
 19917         }
       
 19918         
       
 19919     }/*function_time_to_uint*/
       
 19920     break;
       
 19921 
       
 19922 /****
       
 19923  *TIME_TO_UDINT
       
 19924  */
       
 19925     case function_time_to_udint :
       
 19926     {
       
 19927         symbol_c *last_type_symbol = NULL;
       
 19928 
       
 19929         {
       
 19930             symbol_c *IN_type_symbol = param_data_type;
       
 19931             last_type_symbol = param_data_type;
       
 19932             
       
 19933             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19934             {
       
 19935         
       
 19936                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 19937                 return return_type_symbol;
       
 19938                 
       
 19939             }
       
 19940             
       
 19941             ERROR;
       
 19942         }
       
 19943         
       
 19944     }/*function_time_to_udint*/
       
 19945     break;
       
 19946 
       
 19947 /****
       
 19948  *TIME_TO_ULINT
       
 19949  */
       
 19950     case function_time_to_ulint :
       
 19951     {
       
 19952         symbol_c *last_type_symbol = NULL;
       
 19953 
       
 19954         {
       
 19955             symbol_c *IN_type_symbol = param_data_type;
       
 19956             last_type_symbol = param_data_type;
       
 19957             
       
 19958             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19959             {
       
 19960         
       
 19961                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 19962                 return return_type_symbol;
       
 19963                 
       
 19964             }
       
 19965             
       
 19966             ERROR;
       
 19967         }
       
 19968         
       
 19969     }/*function_time_to_ulint*/
       
 19970     break;
       
 19971 
       
 19972 /****
       
 19973  *TIME_TO_REAL
       
 19974  */
       
 19975     case function_time_to_real :
       
 19976     {
       
 19977         symbol_c *last_type_symbol = NULL;
       
 19978 
       
 19979         {
       
 19980             symbol_c *IN_type_symbol = param_data_type;
       
 19981             last_type_symbol = param_data_type;
       
 19982             
       
 19983             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 19984             {
       
 19985         
       
 19986                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 19987                 return return_type_symbol;
       
 19988                 
       
 19989             }
       
 19990             
       
 19991             ERROR;
       
 19992         }
       
 19993         
       
 19994     }/*function_time_to_real*/
       
 19995     break;
       
 19996 
       
 19997 /****
       
 19998  *TIME_TO_LREAL
       
 19999  */
       
 20000     case function_time_to_lreal :
       
 20001     {
       
 20002         symbol_c *last_type_symbol = NULL;
       
 20003 
       
 20004         {
       
 20005             symbol_c *IN_type_symbol = param_data_type;
       
 20006             last_type_symbol = param_data_type;
       
 20007             
       
 20008             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20009             {
       
 20010         
       
 20011                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20012                 return return_type_symbol;
       
 20013                 
       
 20014             }
       
 20015             
       
 20016             ERROR;
       
 20017         }
       
 20018         
       
 20019     }/*function_time_to_lreal*/
       
 20020     break;
       
 20021 
       
 20022 /****
       
 20023  *TIME_TO_STRING
       
 20024  */
       
 20025     case function_time_to_string :
       
 20026     {
       
 20027         symbol_c *last_type_symbol = NULL;
       
 20028 
       
 20029         {
       
 20030             symbol_c *IN_type_symbol = param_data_type;
       
 20031             last_type_symbol = param_data_type;
       
 20032             
       
 20033             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20034             {
       
 20035         
       
 20036                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20037                 return return_type_symbol;
       
 20038                 
       
 20039             }
       
 20040             
       
 20041             ERROR;
       
 20042         }
       
 20043         
       
 20044     }/*function_time_to_string*/
       
 20045     break;
       
 20046 
       
 20047 /****
       
 20048  *TIME_TO_BYTE
       
 20049  */
       
 20050     case function_time_to_byte :
       
 20051     {
       
 20052         symbol_c *last_type_symbol = NULL;
       
 20053 
       
 20054         {
       
 20055             symbol_c *IN_type_symbol = param_data_type;
       
 20056             last_type_symbol = param_data_type;
       
 20057             
       
 20058             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20059             {
       
 20060         
       
 20061                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20062                 return return_type_symbol;
       
 20063                 
       
 20064             }
       
 20065             
       
 20066             ERROR;
       
 20067         }
       
 20068         
       
 20069     }/*function_time_to_byte*/
       
 20070     break;
       
 20071 
       
 20072 /****
       
 20073  *TIME_TO_WORD
       
 20074  */
       
 20075     case function_time_to_word :
       
 20076     {
       
 20077         symbol_c *last_type_symbol = NULL;
       
 20078 
       
 20079         {
       
 20080             symbol_c *IN_type_symbol = param_data_type;
       
 20081             last_type_symbol = param_data_type;
       
 20082             
       
 20083             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20084             {
       
 20085         
       
 20086                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20087                 return return_type_symbol;
       
 20088                 
       
 20089             }
       
 20090             
       
 20091             ERROR;
       
 20092         }
       
 20093         
       
 20094     }/*function_time_to_word*/
       
 20095     break;
       
 20096 
       
 20097 /****
       
 20098  *TIME_TO_DWORD
       
 20099  */
       
 20100     case function_time_to_dword :
       
 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::time_type_name, last_type_symbol))
       
 20109             {
       
 20110         
       
 20111                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20112                 return return_type_symbol;
       
 20113                 
       
 20114             }
       
 20115             
       
 20116             ERROR;
       
 20117         }
       
 20118         
       
 20119     }/*function_time_to_dword*/
       
 20120     break;
       
 20121 
       
 20122 /****
       
 20123  *TIME_TO_LWORD
       
 20124  */
       
 20125     case function_time_to_lword :
       
 20126     {
       
 20127         symbol_c *last_type_symbol = NULL;
       
 20128 
       
 20129         {
       
 20130             symbol_c *IN_type_symbol = param_data_type;
       
 20131             last_type_symbol = param_data_type;
       
 20132             
       
 20133             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
       
 20134             {
       
 20135         
       
 20136                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20137                 return return_type_symbol;
       
 20138                 
       
 20139             }
       
 20140             
       
 20141             ERROR;
       
 20142         }
       
 20143         
       
 20144     }/*function_time_to_lword*/
       
 20145     break;
       
 20146 
       
 20147 /****
       
 20148  *DATE_TO_SINT
       
 20149  */
       
 20150     case function_date_to_sint :
       
 20151     {
       
 20152         symbol_c *last_type_symbol = NULL;
       
 20153 
       
 20154         {
       
 20155             symbol_c *IN_type_symbol = param_data_type;
       
 20156             last_type_symbol = param_data_type;
       
 20157             
       
 20158             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20159             {
       
 20160         
       
 20161                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20162                 return return_type_symbol;
       
 20163                 
       
 20164             }
       
 20165             
       
 20166             ERROR;
       
 20167         }
       
 20168         
       
 20169     }/*function_date_to_sint*/
       
 20170     break;
       
 20171 
       
 20172 /****
       
 20173  *DATE_TO_INT
       
 20174  */
       
 20175     case function_date_to_int :
       
 20176     {
       
 20177         symbol_c *last_type_symbol = NULL;
       
 20178 
       
 20179         {
       
 20180             symbol_c *IN_type_symbol = param_data_type;
       
 20181             last_type_symbol = param_data_type;
       
 20182             
       
 20183             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20184             {
       
 20185         
       
 20186                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20187                 return return_type_symbol;
       
 20188                 
       
 20189             }
       
 20190             
       
 20191             ERROR;
       
 20192         }
       
 20193         
       
 20194     }/*function_date_to_int*/
       
 20195     break;
       
 20196 
       
 20197 /****
       
 20198  *DATE_TO_DINT
       
 20199  */
       
 20200     case function_date_to_dint :
       
 20201     {
       
 20202         symbol_c *last_type_symbol = NULL;
       
 20203 
       
 20204         {
       
 20205             symbol_c *IN_type_symbol = param_data_type;
       
 20206             last_type_symbol = param_data_type;
       
 20207             
       
 20208             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20209             {
       
 20210         
       
 20211                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20212                 return return_type_symbol;
       
 20213                 
       
 20214             }
       
 20215             
       
 20216             ERROR;
       
 20217         }
       
 20218         
       
 20219     }/*function_date_to_dint*/
       
 20220     break;
       
 20221 
       
 20222 /****
       
 20223  *DATE_TO_LINT
       
 20224  */
       
 20225     case function_date_to_lint :
       
 20226     {
       
 20227         symbol_c *last_type_symbol = NULL;
       
 20228 
       
 20229         {
       
 20230             symbol_c *IN_type_symbol = param_data_type;
       
 20231             last_type_symbol = param_data_type;
       
 20232             
       
 20233             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20234             {
       
 20235         
       
 20236                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20237                 return return_type_symbol;
       
 20238                 
       
 20239             }
       
 20240             
       
 20241             ERROR;
       
 20242         }
       
 20243         
       
 20244     }/*function_date_to_lint*/
       
 20245     break;
       
 20246 
       
 20247 /****
       
 20248  *DATE_TO_USINT
       
 20249  */
       
 20250     case function_date_to_usint :
       
 20251     {
       
 20252         symbol_c *last_type_symbol = NULL;
       
 20253 
       
 20254         {
       
 20255             symbol_c *IN_type_symbol = param_data_type;
       
 20256             last_type_symbol = param_data_type;
       
 20257             
       
 20258             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20259             {
       
 20260         
       
 20261                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20262                 return return_type_symbol;
       
 20263                 
       
 20264             }
       
 20265             
       
 20266             ERROR;
       
 20267         }
       
 20268         
       
 20269     }/*function_date_to_usint*/
       
 20270     break;
       
 20271 
       
 20272 /****
       
 20273  *DATE_TO_UINT
       
 20274  */
       
 20275     case function_date_to_uint :
       
 20276     {
       
 20277         symbol_c *last_type_symbol = NULL;
       
 20278 
       
 20279         {
       
 20280             symbol_c *IN_type_symbol = param_data_type;
       
 20281             last_type_symbol = param_data_type;
       
 20282             
       
 20283             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20284             {
       
 20285         
       
 20286                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20287                 return return_type_symbol;
       
 20288                 
       
 20289             }
       
 20290             
       
 20291             ERROR;
       
 20292         }
       
 20293         
       
 20294     }/*function_date_to_uint*/
       
 20295     break;
       
 20296 
       
 20297 /****
       
 20298  *DATE_TO_UDINT
       
 20299  */
       
 20300     case function_date_to_udint :
       
 20301     {
       
 20302         symbol_c *last_type_symbol = NULL;
       
 20303 
       
 20304         {
       
 20305             symbol_c *IN_type_symbol = param_data_type;
       
 20306             last_type_symbol = param_data_type;
       
 20307             
       
 20308             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20309             {
       
 20310         
       
 20311                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20312                 return return_type_symbol;
       
 20313                 
       
 20314             }
       
 20315             
       
 20316             ERROR;
       
 20317         }
       
 20318         
       
 20319     }/*function_date_to_udint*/
       
 20320     break;
       
 20321 
       
 20322 /****
       
 20323  *DATE_TO_ULINT
       
 20324  */
       
 20325     case function_date_to_ulint :
       
 20326     {
       
 20327         symbol_c *last_type_symbol = NULL;
       
 20328 
       
 20329         {
       
 20330             symbol_c *IN_type_symbol = param_data_type;
       
 20331             last_type_symbol = param_data_type;
       
 20332             
       
 20333             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20334             {
       
 20335         
       
 20336                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20337                 return return_type_symbol;
       
 20338                 
       
 20339             }
       
 20340             
       
 20341             ERROR;
       
 20342         }
       
 20343         
       
 20344     }/*function_date_to_ulint*/
       
 20345     break;
       
 20346 
       
 20347 /****
       
 20348  *DATE_TO_REAL
       
 20349  */
       
 20350     case function_date_to_real :
       
 20351     {
       
 20352         symbol_c *last_type_symbol = NULL;
       
 20353 
       
 20354         {
       
 20355             symbol_c *IN_type_symbol = param_data_type;
       
 20356             last_type_symbol = param_data_type;
       
 20357             
       
 20358             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20359             {
       
 20360         
       
 20361                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20362                 return return_type_symbol;
       
 20363                 
       
 20364             }
       
 20365             
       
 20366             ERROR;
       
 20367         }
       
 20368         
       
 20369     }/*function_date_to_real*/
       
 20370     break;
       
 20371 
       
 20372 /****
       
 20373  *DATE_TO_LREAL
       
 20374  */
       
 20375     case function_date_to_lreal :
       
 20376     {
       
 20377         symbol_c *last_type_symbol = NULL;
       
 20378 
       
 20379         {
       
 20380             symbol_c *IN_type_symbol = param_data_type;
       
 20381             last_type_symbol = param_data_type;
       
 20382             
       
 20383             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20384             {
       
 20385         
       
 20386                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20387                 return return_type_symbol;
       
 20388                 
       
 20389             }
       
 20390             
       
 20391             ERROR;
       
 20392         }
       
 20393         
       
 20394     }/*function_date_to_lreal*/
       
 20395     break;
       
 20396 
       
 20397 /****
       
 20398  *DATE_TO_STRING
       
 20399  */
       
 20400     case function_date_to_string :
       
 20401     {
       
 20402         symbol_c *last_type_symbol = NULL;
       
 20403 
       
 20404         {
       
 20405             symbol_c *IN_type_symbol = param_data_type;
       
 20406             last_type_symbol = param_data_type;
       
 20407             
       
 20408             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20409             {
       
 20410         
       
 20411                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20412                 return return_type_symbol;
       
 20413                 
       
 20414             }
       
 20415             
       
 20416             ERROR;
       
 20417         }
       
 20418         
       
 20419     }/*function_date_to_string*/
       
 20420     break;
       
 20421 
       
 20422 /****
       
 20423  *DATE_TO_BYTE
       
 20424  */
       
 20425     case function_date_to_byte :
       
 20426     {
       
 20427         symbol_c *last_type_symbol = NULL;
       
 20428 
       
 20429         {
       
 20430             symbol_c *IN_type_symbol = param_data_type;
       
 20431             last_type_symbol = param_data_type;
       
 20432             
       
 20433             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20434             {
       
 20435         
       
 20436                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20437                 return return_type_symbol;
       
 20438                 
       
 20439             }
       
 20440             
       
 20441             ERROR;
       
 20442         }
       
 20443         
       
 20444     }/*function_date_to_byte*/
       
 20445     break;
       
 20446 
       
 20447 /****
       
 20448  *DATE_TO_WORD
       
 20449  */
       
 20450     case function_date_to_word :
       
 20451     {
       
 20452         symbol_c *last_type_symbol = NULL;
       
 20453 
       
 20454         {
       
 20455             symbol_c *IN_type_symbol = param_data_type;
       
 20456             last_type_symbol = param_data_type;
       
 20457             
       
 20458             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20459             {
       
 20460         
       
 20461                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20462                 return return_type_symbol;
       
 20463                 
       
 20464             }
       
 20465             
       
 20466             ERROR;
       
 20467         }
       
 20468         
       
 20469     }/*function_date_to_word*/
       
 20470     break;
       
 20471 
       
 20472 /****
       
 20473  *DATE_TO_DWORD
       
 20474  */
       
 20475     case function_date_to_dword :
       
 20476     {
       
 20477         symbol_c *last_type_symbol = NULL;
       
 20478 
       
 20479         {
       
 20480             symbol_c *IN_type_symbol = param_data_type;
       
 20481             last_type_symbol = param_data_type;
       
 20482             
       
 20483             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20484             {
       
 20485         
       
 20486                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20487                 return return_type_symbol;
       
 20488                 
       
 20489             }
       
 20490             
       
 20491             ERROR;
       
 20492         }
       
 20493         
       
 20494     }/*function_date_to_dword*/
       
 20495     break;
       
 20496 
       
 20497 /****
       
 20498  *DATE_TO_LWORD
       
 20499  */
       
 20500     case function_date_to_lword :
       
 20501     {
       
 20502         symbol_c *last_type_symbol = NULL;
       
 20503 
       
 20504         {
       
 20505             symbol_c *IN_type_symbol = param_data_type;
       
 20506             last_type_symbol = param_data_type;
       
 20507             
       
 20508             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
       
 20509             {
       
 20510         
       
 20511                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20512                 return return_type_symbol;
       
 20513                 
       
 20514             }
       
 20515             
       
 20516             ERROR;
       
 20517         }
       
 20518         
       
 20519     }/*function_date_to_lword*/
       
 20520     break;
       
 20521 
       
 20522 /****
       
 20523  *TOD_TO_SINT
       
 20524  */
       
 20525     case function_tod_to_sint :
       
 20526     {
       
 20527         symbol_c *last_type_symbol = NULL;
       
 20528 
       
 20529         {
       
 20530             symbol_c *IN_type_symbol = param_data_type;
       
 20531             last_type_symbol = param_data_type;
       
 20532             
       
 20533             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20534             {
       
 20535         
       
 20536                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20537                 return return_type_symbol;
       
 20538                 
       
 20539             }
       
 20540             
       
 20541             ERROR;
       
 20542         }
       
 20543         
       
 20544     }/*function_tod_to_sint*/
       
 20545     break;
       
 20546 
       
 20547 /****
       
 20548  *TOD_TO_INT
       
 20549  */
       
 20550     case function_tod_to_int :
       
 20551     {
       
 20552         symbol_c *last_type_symbol = NULL;
       
 20553 
       
 20554         {
       
 20555             symbol_c *IN_type_symbol = param_data_type;
       
 20556             last_type_symbol = param_data_type;
       
 20557             
       
 20558             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20559             {
       
 20560         
       
 20561                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20562                 return return_type_symbol;
       
 20563                 
       
 20564             }
       
 20565             
       
 20566             ERROR;
       
 20567         }
       
 20568         
       
 20569     }/*function_tod_to_int*/
       
 20570     break;
       
 20571 
       
 20572 /****
       
 20573  *TOD_TO_DINT
       
 20574  */
       
 20575     case function_tod_to_dint :
       
 20576     {
       
 20577         symbol_c *last_type_symbol = NULL;
       
 20578 
       
 20579         {
       
 20580             symbol_c *IN_type_symbol = param_data_type;
       
 20581             last_type_symbol = param_data_type;
       
 20582             
       
 20583             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20584             {
       
 20585         
       
 20586                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20587                 return return_type_symbol;
       
 20588                 
       
 20589             }
       
 20590             
       
 20591             ERROR;
       
 20592         }
       
 20593         
       
 20594     }/*function_tod_to_dint*/
       
 20595     break;
       
 20596 
       
 20597 /****
       
 20598  *TOD_TO_LINT
       
 20599  */
       
 20600     case function_tod_to_lint :
       
 20601     {
       
 20602         symbol_c *last_type_symbol = NULL;
       
 20603 
       
 20604         {
       
 20605             symbol_c *IN_type_symbol = param_data_type;
       
 20606             last_type_symbol = param_data_type;
       
 20607             
       
 20608             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20609             {
       
 20610         
       
 20611                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20612                 return return_type_symbol;
       
 20613                 
       
 20614             }
       
 20615             
       
 20616             ERROR;
       
 20617         }
       
 20618         
       
 20619     }/*function_tod_to_lint*/
       
 20620     break;
       
 20621 
       
 20622 /****
       
 20623  *TOD_TO_USINT
       
 20624  */
       
 20625     case function_tod_to_usint :
       
 20626     {
       
 20627         symbol_c *last_type_symbol = NULL;
       
 20628 
       
 20629         {
       
 20630             symbol_c *IN_type_symbol = param_data_type;
       
 20631             last_type_symbol = param_data_type;
       
 20632             
       
 20633             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20634             {
       
 20635         
       
 20636                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20637                 return return_type_symbol;
       
 20638                 
       
 20639             }
       
 20640             
       
 20641             ERROR;
       
 20642         }
       
 20643         
       
 20644     }/*function_tod_to_usint*/
       
 20645     break;
       
 20646 
       
 20647 /****
       
 20648  *TOD_TO_UINT
       
 20649  */
       
 20650     case function_tod_to_uint :
       
 20651     {
       
 20652         symbol_c *last_type_symbol = NULL;
       
 20653 
       
 20654         {
       
 20655             symbol_c *IN_type_symbol = param_data_type;
       
 20656             last_type_symbol = param_data_type;
       
 20657             
       
 20658             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20659             {
       
 20660         
       
 20661                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20662                 return return_type_symbol;
       
 20663                 
       
 20664             }
       
 20665             
       
 20666             ERROR;
       
 20667         }
       
 20668         
       
 20669     }/*function_tod_to_uint*/
       
 20670     break;
       
 20671 
       
 20672 /****
       
 20673  *TOD_TO_UDINT
       
 20674  */
       
 20675     case function_tod_to_udint :
       
 20676     {
       
 20677         symbol_c *last_type_symbol = NULL;
       
 20678 
       
 20679         {
       
 20680             symbol_c *IN_type_symbol = param_data_type;
       
 20681             last_type_symbol = param_data_type;
       
 20682             
       
 20683             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20684             {
       
 20685         
       
 20686                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20687                 return return_type_symbol;
       
 20688                 
       
 20689             }
       
 20690             
       
 20691             ERROR;
       
 20692         }
       
 20693         
       
 20694     }/*function_tod_to_udint*/
       
 20695     break;
       
 20696 
       
 20697 /****
       
 20698  *TOD_TO_ULINT
       
 20699  */
       
 20700     case function_tod_to_ulint :
       
 20701     {
       
 20702         symbol_c *last_type_symbol = NULL;
       
 20703 
       
 20704         {
       
 20705             symbol_c *IN_type_symbol = param_data_type;
       
 20706             last_type_symbol = param_data_type;
       
 20707             
       
 20708             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20709             {
       
 20710         
       
 20711                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20712                 return return_type_symbol;
       
 20713                 
       
 20714             }
       
 20715             
       
 20716             ERROR;
       
 20717         }
       
 20718         
       
 20719     }/*function_tod_to_ulint*/
       
 20720     break;
       
 20721 
       
 20722 /****
       
 20723  *TOD_TO_REAL
       
 20724  */
       
 20725     case function_tod_to_real :
       
 20726     {
       
 20727         symbol_c *last_type_symbol = NULL;
       
 20728 
       
 20729         {
       
 20730             symbol_c *IN_type_symbol = param_data_type;
       
 20731             last_type_symbol = param_data_type;
       
 20732             
       
 20733             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20734             {
       
 20735         
       
 20736                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20737                 return return_type_symbol;
       
 20738                 
       
 20739             }
       
 20740             
       
 20741             ERROR;
       
 20742         }
       
 20743         
       
 20744     }/*function_tod_to_real*/
       
 20745     break;
       
 20746 
       
 20747 /****
       
 20748  *TOD_TO_LREAL
       
 20749  */
       
 20750     case function_tod_to_lreal :
       
 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::tod_type_name, last_type_symbol))
       
 20759             {
       
 20760         
       
 20761                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20762                 return return_type_symbol;
       
 20763                 
       
 20764             }
       
 20765             
       
 20766             ERROR;
       
 20767         }
       
 20768         
       
 20769     }/*function_tod_to_lreal*/
       
 20770     break;
       
 20771 
       
 20772 /****
       
 20773  *TOD_TO_STRING
       
 20774  */
       
 20775     case function_tod_to_string :
       
 20776     {
       
 20777         symbol_c *last_type_symbol = NULL;
       
 20778 
       
 20779         {
       
 20780             symbol_c *IN_type_symbol = param_data_type;
       
 20781             last_type_symbol = param_data_type;
       
 20782             
       
 20783             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20784             {
       
 20785         
       
 20786                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20787                 return return_type_symbol;
       
 20788                 
       
 20789             }
       
 20790             
       
 20791             ERROR;
       
 20792         }
       
 20793         
       
 20794     }/*function_tod_to_string*/
       
 20795     break;
       
 20796 
       
 20797 /****
       
 20798  *TOD_TO_BYTE
       
 20799  */
       
 20800     case function_tod_to_byte :
       
 20801     {
       
 20802         symbol_c *last_type_symbol = NULL;
       
 20803 
       
 20804         {
       
 20805             symbol_c *IN_type_symbol = param_data_type;
       
 20806             last_type_symbol = param_data_type;
       
 20807             
       
 20808             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20809             {
       
 20810         
       
 20811                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 20812                 return return_type_symbol;
       
 20813                 
       
 20814             }
       
 20815             
       
 20816             ERROR;
       
 20817         }
       
 20818         
       
 20819     }/*function_tod_to_byte*/
       
 20820     break;
       
 20821 
       
 20822 /****
       
 20823  *TOD_TO_WORD
       
 20824  */
       
 20825     case function_tod_to_word :
       
 20826     {
       
 20827         symbol_c *last_type_symbol = NULL;
       
 20828 
       
 20829         {
       
 20830             symbol_c *IN_type_symbol = param_data_type;
       
 20831             last_type_symbol = param_data_type;
       
 20832             
       
 20833             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20834             {
       
 20835         
       
 20836                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20837                 return return_type_symbol;
       
 20838                 
       
 20839             }
       
 20840             
       
 20841             ERROR;
       
 20842         }
       
 20843         
       
 20844     }/*function_tod_to_word*/
       
 20845     break;
       
 20846 
       
 20847 /****
       
 20848  *TOD_TO_DWORD
       
 20849  */
       
 20850     case function_tod_to_dword :
       
 20851     {
       
 20852         symbol_c *last_type_symbol = NULL;
       
 20853 
       
 20854         {
       
 20855             symbol_c *IN_type_symbol = param_data_type;
       
 20856             last_type_symbol = param_data_type;
       
 20857             
       
 20858             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20859             {
       
 20860         
       
 20861                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20862                 return return_type_symbol;
       
 20863                 
       
 20864             }
       
 20865             
       
 20866             ERROR;
       
 20867         }
       
 20868         
       
 20869     }/*function_tod_to_dword*/
       
 20870     break;
       
 20871 
       
 20872 /****
       
 20873  *TOD_TO_LWORD
       
 20874  */
       
 20875     case function_tod_to_lword :
       
 20876     {
       
 20877         symbol_c *last_type_symbol = NULL;
       
 20878 
       
 20879         {
       
 20880             symbol_c *IN_type_symbol = param_data_type;
       
 20881             last_type_symbol = param_data_type;
       
 20882             
       
 20883             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
       
 20884             {
       
 20885         
       
 20886                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20887                 return return_type_symbol;
       
 20888                 
       
 20889             }
       
 20890             
       
 20891             ERROR;
       
 20892         }
       
 20893         
       
 20894     }/*function_tod_to_lword*/
       
 20895     break;
       
 20896 
       
 20897 /****
       
 20898  *DT_TO_SINT
       
 20899  */
       
 20900     case function_dt_to_sint :
       
 20901     {
       
 20902         symbol_c *last_type_symbol = NULL;
       
 20903 
       
 20904         {
       
 20905             symbol_c *IN_type_symbol = param_data_type;
       
 20906             last_type_symbol = param_data_type;
       
 20907             
       
 20908             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 20909             {
       
 20910         
       
 20911                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20912                 return return_type_symbol;
       
 20913                 
       
 20914             }
       
 20915             
       
 20916             ERROR;
       
 20917         }
       
 20918         
       
 20919     }/*function_dt_to_sint*/
       
 20920     break;
       
 20921 
       
 20922 /****
       
 20923  *DT_TO_INT
       
 20924  */
       
 20925     case function_dt_to_int :
       
 20926     {
       
 20927         symbol_c *last_type_symbol = NULL;
       
 20928 
       
 20929         {
       
 20930             symbol_c *IN_type_symbol = param_data_type;
       
 20931             last_type_symbol = param_data_type;
       
 20932             
       
 20933             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 20934             {
       
 20935         
       
 20936                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20937                 return return_type_symbol;
       
 20938                 
       
 20939             }
       
 20940             
       
 20941             ERROR;
       
 20942         }
       
 20943         
       
 20944     }/*function_dt_to_int*/
       
 20945     break;
       
 20946 
       
 20947 /****
       
 20948  *DT_TO_DINT
       
 20949  */
       
 20950     case function_dt_to_dint :
       
 20951     {
       
 20952         symbol_c *last_type_symbol = NULL;
       
 20953 
       
 20954         {
       
 20955             symbol_c *IN_type_symbol = param_data_type;
       
 20956             last_type_symbol = param_data_type;
       
 20957             
       
 20958             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 20959             {
       
 20960         
       
 20961                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20962                 return return_type_symbol;
       
 20963                 
       
 20964             }
       
 20965             
       
 20966             ERROR;
       
 20967         }
       
 20968         
       
 20969     }/*function_dt_to_dint*/
       
 20970     break;
       
 20971 
       
 20972 /****
       
 20973  *DT_TO_LINT
       
 20974  */
       
 20975     case function_dt_to_lint :
       
 20976     {
       
 20977         symbol_c *last_type_symbol = NULL;
       
 20978 
       
 20979         {
       
 20980             symbol_c *IN_type_symbol = param_data_type;
       
 20981             last_type_symbol = param_data_type;
       
 20982             
       
 20983             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 20984             {
       
 20985         
       
 20986                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20987                 return return_type_symbol;
       
 20988                 
       
 20989             }
       
 20990             
       
 20991             ERROR;
       
 20992         }
       
 20993         
       
 20994     }/*function_dt_to_lint*/
       
 20995     break;
       
 20996 
       
 20997 /****
       
 20998  *DT_TO_USINT
       
 20999  */
       
 21000     case function_dt_to_usint :
       
 21001     {
       
 21002         symbol_c *last_type_symbol = NULL;
       
 21003 
       
 21004         {
       
 21005             symbol_c *IN_type_symbol = param_data_type;
       
 21006             last_type_symbol = param_data_type;
       
 21007             
       
 21008             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21009             {
       
 21010         
       
 21011                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21012                 return return_type_symbol;
       
 21013                 
       
 21014             }
       
 21015             
       
 21016             ERROR;
       
 21017         }
       
 21018         
       
 21019     }/*function_dt_to_usint*/
       
 21020     break;
       
 21021 
       
 21022 /****
       
 21023  *DT_TO_UINT
       
 21024  */
       
 21025     case function_dt_to_uint :
       
 21026     {
       
 21027         symbol_c *last_type_symbol = NULL;
       
 21028 
       
 21029         {
       
 21030             symbol_c *IN_type_symbol = param_data_type;
       
 21031             last_type_symbol = param_data_type;
       
 21032             
       
 21033             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21034             {
       
 21035         
       
 21036                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21037                 return return_type_symbol;
       
 21038                 
       
 21039             }
       
 21040             
       
 21041             ERROR;
       
 21042         }
       
 21043         
       
 21044     }/*function_dt_to_uint*/
       
 21045     break;
       
 21046 
       
 21047 /****
       
 21048  *DT_TO_UDINT
       
 21049  */
       
 21050     case function_dt_to_udint :
       
 21051     {
       
 21052         symbol_c *last_type_symbol = NULL;
       
 21053 
       
 21054         {
       
 21055             symbol_c *IN_type_symbol = param_data_type;
       
 21056             last_type_symbol = param_data_type;
       
 21057             
       
 21058             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21059             {
       
 21060         
       
 21061                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21062                 return return_type_symbol;
       
 21063                 
       
 21064             }
       
 21065             
       
 21066             ERROR;
       
 21067         }
       
 21068         
       
 21069     }/*function_dt_to_udint*/
       
 21070     break;
       
 21071 
       
 21072 /****
       
 21073  *DT_TO_ULINT
       
 21074  */
       
 21075     case function_dt_to_ulint :
       
 21076     {
       
 21077         symbol_c *last_type_symbol = NULL;
       
 21078 
       
 21079         {
       
 21080             symbol_c *IN_type_symbol = param_data_type;
       
 21081             last_type_symbol = param_data_type;
       
 21082             
       
 21083             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21084             {
       
 21085         
       
 21086                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21087                 return return_type_symbol;
       
 21088                 
       
 21089             }
       
 21090             
       
 21091             ERROR;
       
 21092         }
       
 21093         
       
 21094     }/*function_dt_to_ulint*/
       
 21095     break;
       
 21096 
       
 21097 /****
       
 21098  *DT_TO_REAL
       
 21099  */
       
 21100     case function_dt_to_real :
       
 21101     {
       
 21102         symbol_c *last_type_symbol = NULL;
       
 21103 
       
 21104         {
       
 21105             symbol_c *IN_type_symbol = param_data_type;
       
 21106             last_type_symbol = param_data_type;
       
 21107             
       
 21108             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21109             {
       
 21110         
       
 21111                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21112                 return return_type_symbol;
       
 21113                 
       
 21114             }
       
 21115             
       
 21116             ERROR;
       
 21117         }
       
 21118         
       
 21119     }/*function_dt_to_real*/
       
 21120     break;
       
 21121 
       
 21122 /****
       
 21123  *DT_TO_LREAL
       
 21124  */
       
 21125     case function_dt_to_lreal :
       
 21126     {
       
 21127         symbol_c *last_type_symbol = NULL;
       
 21128 
       
 21129         {
       
 21130             symbol_c *IN_type_symbol = param_data_type;
       
 21131             last_type_symbol = param_data_type;
       
 21132             
       
 21133             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21134             {
       
 21135         
       
 21136                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21137                 return return_type_symbol;
       
 21138                 
       
 21139             }
       
 21140             
       
 21141             ERROR;
       
 21142         }
       
 21143         
       
 21144     }/*function_dt_to_lreal*/
       
 21145     break;
       
 21146 
       
 21147 /****
       
 21148  *DT_TO_STRING
       
 21149  */
       
 21150     case function_dt_to_string :
       
 21151     {
       
 21152         symbol_c *last_type_symbol = NULL;
       
 21153 
       
 21154         {
       
 21155             symbol_c *IN_type_symbol = param_data_type;
       
 21156             last_type_symbol = param_data_type;
       
 21157             
       
 21158             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21159             {
       
 21160         
       
 21161                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21162                 return return_type_symbol;
       
 21163                 
       
 21164             }
       
 21165             
       
 21166             ERROR;
       
 21167         }
       
 21168         
       
 21169     }/*function_dt_to_string*/
       
 21170     break;
       
 21171 
       
 21172 /****
       
 21173  *DT_TO_BYTE
       
 21174  */
       
 21175     case function_dt_to_byte :
       
 21176     {
       
 21177         symbol_c *last_type_symbol = NULL;
       
 21178 
       
 21179         {
       
 21180             symbol_c *IN_type_symbol = param_data_type;
       
 21181             last_type_symbol = param_data_type;
       
 21182             
       
 21183             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21184             {
       
 21185         
       
 21186                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21187                 return return_type_symbol;
       
 21188                 
       
 21189             }
       
 21190             
       
 21191             ERROR;
       
 21192         }
       
 21193         
       
 21194     }/*function_dt_to_byte*/
       
 21195     break;
       
 21196 
       
 21197 /****
       
 21198  *DT_TO_WORD
       
 21199  */
       
 21200     case function_dt_to_word :
       
 21201     {
       
 21202         symbol_c *last_type_symbol = NULL;
       
 21203 
       
 21204         {
       
 21205             symbol_c *IN_type_symbol = param_data_type;
       
 21206             last_type_symbol = param_data_type;
       
 21207             
       
 21208             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21209             {
       
 21210         
       
 21211                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21212                 return return_type_symbol;
       
 21213                 
       
 21214             }
       
 21215             
       
 21216             ERROR;
       
 21217         }
       
 21218         
       
 21219     }/*function_dt_to_word*/
       
 21220     break;
       
 21221 
       
 21222 /****
       
 21223  *DT_TO_DWORD
       
 21224  */
       
 21225     case function_dt_to_dword :
       
 21226     {
       
 21227         symbol_c *last_type_symbol = NULL;
       
 21228 
       
 21229         {
       
 21230             symbol_c *IN_type_symbol = param_data_type;
       
 21231             last_type_symbol = param_data_type;
       
 21232             
       
 21233             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21234             {
       
 21235         
       
 21236                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21237                 return return_type_symbol;
       
 21238                 
       
 21239             }
       
 21240             
       
 21241             ERROR;
       
 21242         }
       
 21243         
       
 21244     }/*function_dt_to_dword*/
       
 21245     break;
       
 21246 
       
 21247 /****
       
 21248  *DT_TO_LWORD
       
 21249  */
       
 21250     case function_dt_to_lword :
       
 21251     {
       
 21252         symbol_c *last_type_symbol = NULL;
       
 21253 
       
 21254         {
       
 21255             symbol_c *IN_type_symbol = param_data_type;
       
 21256             last_type_symbol = param_data_type;
       
 21257             
       
 21258             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
       
 21259             {
       
 21260         
       
 21261                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21262                 return return_type_symbol;
       
 21263                 
       
 21264             }
       
 21265             
       
 21266             ERROR;
       
 21267         }
       
 21268         
       
 21269     }/*function_dt_to_lword*/
       
 21270     break;
       
 21271 
       
 21272 /****
       
 21273  *STRING_TO_BOOL
       
 21274  */
       
 21275     case function_string_to_bool :
       
 21276     {
       
 21277         symbol_c *last_type_symbol = NULL;
       
 21278 
       
 21279         {
       
 21280             symbol_c *IN_type_symbol = param_data_type;
       
 21281             last_type_symbol = param_data_type;
       
 21282             
       
 21283             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 19912             {
 21284             {
 19913         
 21285         
 19914                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 21286                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
 19915                 return return_type_symbol;
 21287                 return return_type_symbol;
 19916                 
 21288                 
 19917             }
 21289             }
 19918             
 21290             
 19919             ERROR;
 21291             ERROR;
 19920         }
 21292         }
 19921         
 21293         
 19922     }/*function_time_to_bool*/
 21294     }/*function_string_to_bool*/
 19923     break;
 21295     break;
 19924 
 21296 
 19925 /****
 21297 /****
 19926  *TIME_TO_SINT
 21298  *STRING_TO_SINT
 19927  */
 21299  */
 19928     case function_time_to_sint :
 21300     case function_string_to_sint :
 19929     {
 21301     {
 19930         symbol_c *last_type_symbol = NULL;
 21302         symbol_c *last_type_symbol = NULL;
 19931 
 21303 
 19932         {
 21304         {
 19933             symbol_c *IN_type_symbol = param_data_type;
 21305             symbol_c *IN_type_symbol = param_data_type;
 19934             last_type_symbol = param_data_type;
 21306             last_type_symbol = param_data_type;
 19935             
 21307             
 19936             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21308             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 19937             {
 21309             {
 19938         
 21310         
 19939                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 21311                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
 19940                 return return_type_symbol;
 21312                 return return_type_symbol;
 19941                 
 21313                 
 19942             }
 21314             }
 19943             
 21315             
 19944             ERROR;
 21316             ERROR;
 19945         }
 21317         }
 19946         
 21318         
 19947     }/*function_time_to_sint*/
 21319     }/*function_string_to_sint*/
 19948     break;
 21320     break;
 19949 
 21321 
 19950 /****
 21322 /****
 19951  *TIME_TO_INT
 21323  *STRING_TO_INT
 19952  */
 21324  */
 19953     case function_time_to_int :
 21325     case function_string_to_int :
 19954     {
 21326     {
 19955         symbol_c *last_type_symbol = NULL;
 21327         symbol_c *last_type_symbol = NULL;
 19956 
 21328 
 19957         {
 21329         {
 19958             symbol_c *IN_type_symbol = param_data_type;
 21330             symbol_c *IN_type_symbol = param_data_type;
 19959             last_type_symbol = param_data_type;
 21331             last_type_symbol = param_data_type;
 19960             
 21332             
 19961             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21333             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 19962             {
 21334             {
 19963         
 21335         
 19964                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 21336                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 19965                 return return_type_symbol;
 21337                 return return_type_symbol;
 19966                 
 21338                 
 19967             }
 21339             }
 19968             
 21340             
 19969             ERROR;
 21341             ERROR;
 19970         }
 21342         }
 19971         
 21343         
 19972     }/*function_time_to_int*/
 21344     }/*function_string_to_int*/
 19973     break;
 21345     break;
 19974 
 21346 
 19975 /****
 21347 /****
 19976  *TIME_TO_DINT
 21348  *STRING_TO_DINT
 19977  */
 21349  */
 19978     case function_time_to_dint :
 21350     case function_string_to_dint :
 19979     {
 21351     {
 19980         symbol_c *last_type_symbol = NULL;
 21352         symbol_c *last_type_symbol = NULL;
 19981 
 21353 
 19982         {
 21354         {
 19983             symbol_c *IN_type_symbol = param_data_type;
 21355             symbol_c *IN_type_symbol = param_data_type;
 19984             last_type_symbol = param_data_type;
 21356             last_type_symbol = param_data_type;
 19985             
 21357             
 19986             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21358             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 19987             {
 21359             {
 19988         
 21360         
 19989                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 21361                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
 19990                 return return_type_symbol;
 21362                 return return_type_symbol;
 19991                 
 21363                 
 19992             }
 21364             }
 19993             
 21365             
 19994             ERROR;
 21366             ERROR;
 19995         }
 21367         }
 19996         
 21368         
 19997     }/*function_time_to_dint*/
 21369     }/*function_string_to_dint*/
 19998     break;
 21370     break;
 19999 
 21371 
 20000 /****
 21372 /****
 20001  *TIME_TO_LINT
 21373  *STRING_TO_LINT
 20002  */
 21374  */
 20003     case function_time_to_lint :
 21375     case function_string_to_lint :
 20004     {
 21376     {
 20005         symbol_c *last_type_symbol = NULL;
 21377         symbol_c *last_type_symbol = NULL;
 20006 
 21378 
 20007         {
 21379         {
 20008             symbol_c *IN_type_symbol = param_data_type;
 21380             symbol_c *IN_type_symbol = param_data_type;
 20009             last_type_symbol = param_data_type;
 21381             last_type_symbol = param_data_type;
 20010             
 21382             
 20011             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21383             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 20012             {
 21384             {
 20013         
 21385         
 20014                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 21386                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
 20015                 return return_type_symbol;
 21387                 return return_type_symbol;
 20016                 
 21388                 
 20017             }
 21389             }
 20018             
 21390             
 20019             ERROR;
 21391             ERROR;
 20020         }
 21392         }
 20021         
 21393         
 20022     }/*function_time_to_lint*/
 21394     }/*function_string_to_lint*/
 20023     break;
 21395     break;
 20024 
 21396 
 20025 /****
 21397 /****
 20026  *TIME_TO_USINT
 21398  *STRING_TO_USINT
 20027  */
 21399  */
 20028     case function_time_to_usint :
 21400     case function_string_to_usint :
 20029     {
 21401     {
 20030         symbol_c *last_type_symbol = NULL;
 21402         symbol_c *last_type_symbol = NULL;
 20031 
 21403 
 20032         {
 21404         {
 20033             symbol_c *IN_type_symbol = param_data_type;
 21405             symbol_c *IN_type_symbol = param_data_type;
 20034             last_type_symbol = param_data_type;
 21406             last_type_symbol = param_data_type;
 20035             
 21407             
 20036             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21408             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 20037             {
 21409             {
 20038         
 21410         
 20039                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 21411                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 20040                 return return_type_symbol;
 21412                 return return_type_symbol;
 20041                 
 21413                 
 20042             }
 21414             }
 20043             
 21415             
 20044             ERROR;
 21416             ERROR;
 20045         }
 21417         }
 20046         
 21418         
 20047     }/*function_time_to_usint*/
 21419     }/*function_string_to_usint*/
 20048     break;
 21420     break;
 20049 
 21421 
 20050 /****
 21422 /****
 20051  *TIME_TO_UINT
 21423  *STRING_TO_UINT
 20052  */
 21424  */
 20053     case function_time_to_uint :
 21425     case function_string_to_uint :
 20054     {
 21426     {
 20055         symbol_c *last_type_symbol = NULL;
 21427         symbol_c *last_type_symbol = NULL;
 20056 
 21428 
 20057         {
 21429         {
 20058             symbol_c *IN_type_symbol = param_data_type;
 21430             symbol_c *IN_type_symbol = param_data_type;
 20059             last_type_symbol = param_data_type;
 21431             last_type_symbol = param_data_type;
 20060             
 21432             
 20061             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21433             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 20062             {
 21434             {
 20063         
 21435         
 20064                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 21436                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 20065                 return return_type_symbol;
 21437                 return return_type_symbol;
 20066                 
 21438                 
 20067             }
 21439             }
 20068             
 21440             
 20069             ERROR;
 21441             ERROR;
 20070         }
 21442         }
 20071         
 21443         
 20072     }/*function_time_to_uint*/
 21444     }/*function_string_to_uint*/
 20073     break;
 21445     break;
 20074 
 21446 
 20075 /****
 21447 /****
 20076  *TIME_TO_UDINT
 21448  *STRING_TO_UDINT
 20077  */
 21449  */
 20078     case function_time_to_udint :
 21450     case function_string_to_udint :
 20079     {
 21451     {
 20080         symbol_c *last_type_symbol = NULL;
 21452         symbol_c *last_type_symbol = NULL;
 20081 
 21453 
 20082         {
 21454         {
 20083             symbol_c *IN_type_symbol = param_data_type;
 21455             symbol_c *IN_type_symbol = param_data_type;
 20084             last_type_symbol = param_data_type;
 21456             last_type_symbol = param_data_type;
 20085             
 21457             
 20086             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21458             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 20087             {
 21459             {
 20088         
 21460         
 20089                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 21461                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 20090                 return return_type_symbol;
 21462                 return return_type_symbol;
 20091                 
 21463                 
 20092             }
 21464             }
 20093             
 21465             
 20094             ERROR;
 21466             ERROR;
 20095         }
 21467         }
 20096         
 21468         
 20097     }/*function_time_to_udint*/
 21469     }/*function_string_to_udint*/
 20098     break;
 21470     break;
 20099 
 21471 
 20100 /****
 21472 /****
 20101  *TIME_TO_ULINT
 21473  *STRING_TO_ULINT
 20102  */
 21474  */
 20103     case function_time_to_ulint :
 21475     case function_string_to_ulint :
 20104     {
 21476     {
 20105         symbol_c *last_type_symbol = NULL;
 21477         symbol_c *last_type_symbol = NULL;
 20106 
 21478 
 20107         {
 21479         {
 20108             symbol_c *IN_type_symbol = param_data_type;
 21480             symbol_c *IN_type_symbol = param_data_type;
 20109             last_type_symbol = param_data_type;
 21481             last_type_symbol = param_data_type;
 20110             
 21482             
 20111             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21483             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 20112             {
 21484             {
 20113         
 21485         
 20114                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 21486                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 20115                 return return_type_symbol;
 21487                 return return_type_symbol;
 20116                 
 21488                 
 20117             }
 21489             }
 20118             
 21490             
 20119             ERROR;
 21491             ERROR;
 20120         }
 21492         }
 20121         
 21493         
 20122     }/*function_time_to_ulint*/
 21494     }/*function_string_to_ulint*/
 20123     break;
 21495     break;
 20124 
 21496 
 20125 /****
 21497 /****
 20126  *TIME_TO_REAL
 21498  *STRING_TO_REAL
 20127  */
 21499  */
 20128     case function_time_to_real :
 21500     case function_string_to_real :
 20129     {
 21501     {
 20130         symbol_c *last_type_symbol = NULL;
 21502         symbol_c *last_type_symbol = NULL;
 20131 
 21503 
 20132         {
 21504         {
 20133             symbol_c *IN_type_symbol = param_data_type;
 21505             symbol_c *IN_type_symbol = param_data_type;
 20134             last_type_symbol = param_data_type;
 21506             last_type_symbol = param_data_type;
 20135             
 21507             
 20136             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21508             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 20137             {
 21509             {
 20138         
 21510         
 20139                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 21511                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 20140                 return return_type_symbol;
 21512                 return return_type_symbol;
 20141                 
 21513                 
 20142             }
 21514             }
 20143             
 21515             
 20144             ERROR;
 21516             ERROR;
 20145         }
 21517         }
 20146         
 21518         
 20147     }/*function_time_to_real*/
 21519     }/*function_string_to_real*/
 20148     break;
 21520     break;
 20149 
 21521 
 20150 /****
 21522 /****
 20151  *TIME_TO_LREAL
 21523  *STRING_TO_LREAL
 20152  */
 21524  */
 20153     case function_time_to_lreal :
 21525     case function_string_to_lreal :
 20154     {
 21526     {
 20155         symbol_c *last_type_symbol = NULL;
 21527         symbol_c *last_type_symbol = NULL;
 20156 
 21528 
 20157         {
 21529         {
 20158             symbol_c *IN_type_symbol = param_data_type;
 21530             symbol_c *IN_type_symbol = param_data_type;
 20159             last_type_symbol = param_data_type;
 21531             last_type_symbol = param_data_type;
 20160             
 21532             
 20161             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21533             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 20162             {
 21534             {
 20163         
 21535         
 20164                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 21536                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 20165                 return return_type_symbol;
 21537                 return return_type_symbol;
 20166                 
 21538                 
 20167             }
 21539             }
 20168             
 21540             
 20169             ERROR;
 21541             ERROR;
 20170         }
 21542         }
 20171         
 21543         
 20172     }/*function_time_to_lreal*/
 21544     }/*function_string_to_lreal*/
 20173     break;
 21545     break;
 20174 
 21546 
 20175 /****
 21547 /****
 20176  *TIME_TO_STRING
 21548  *STRING_TO_TIME
 20177  */
 21549  */
 20178     case function_time_to_string :
 21550     case function_string_to_time :
 20179     {
 21551     {
 20180         symbol_c *last_type_symbol = NULL;
 21552         symbol_c *last_type_symbol = NULL;
 20181 
 21553 
 20182         {
 21554         {
 20183             symbol_c *IN_type_symbol = param_data_type;
 21555             symbol_c *IN_type_symbol = param_data_type;
 20184             last_type_symbol = param_data_type;
 21556             last_type_symbol = param_data_type;
 20185             
 21557             
 20186             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 21558             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21559             {
       
 21560         
       
 21561                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21562                 return return_type_symbol;
       
 21563                 
       
 21564             }
       
 21565             
       
 21566             ERROR;
       
 21567         }
       
 21568         
       
 21569     }/*function_string_to_time*/
       
 21570     break;
       
 21571 
       
 21572 /****
       
 21573  *STRING_TO_DATE
       
 21574  */
       
 21575     case function_string_to_date :
       
 21576     {
       
 21577         symbol_c *last_type_symbol = NULL;
       
 21578 
       
 21579         {
       
 21580             symbol_c *IN_type_symbol = param_data_type;
       
 21581             last_type_symbol = param_data_type;
       
 21582             
       
 21583             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21584             {
       
 21585         
       
 21586                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21587                 return return_type_symbol;
       
 21588                 
       
 21589             }
       
 21590             
       
 21591             ERROR;
       
 21592         }
       
 21593         
       
 21594     }/*function_string_to_date*/
       
 21595     break;
       
 21596 
       
 21597 /****
       
 21598  *STRING_TO_TOD
       
 21599  */
       
 21600     case function_string_to_tod :
       
 21601     {
       
 21602         symbol_c *last_type_symbol = NULL;
       
 21603 
       
 21604         {
       
 21605             symbol_c *IN_type_symbol = param_data_type;
       
 21606             last_type_symbol = param_data_type;
       
 21607             
       
 21608             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21609             {
       
 21610         
       
 21611                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 21612                 return return_type_symbol;
       
 21613                 
       
 21614             }
       
 21615             
       
 21616             ERROR;
       
 21617         }
       
 21618         
       
 21619     }/*function_string_to_tod*/
       
 21620     break;
       
 21621 
       
 21622 /****
       
 21623  *STRING_TO_DT
       
 21624  */
       
 21625     case function_string_to_dt :
       
 21626     {
       
 21627         symbol_c *last_type_symbol = NULL;
       
 21628 
       
 21629         {
       
 21630             symbol_c *IN_type_symbol = param_data_type;
       
 21631             last_type_symbol = param_data_type;
       
 21632             
       
 21633             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21634             {
       
 21635         
       
 21636                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21637                 return return_type_symbol;
       
 21638                 
       
 21639             }
       
 21640             
       
 21641             ERROR;
       
 21642         }
       
 21643         
       
 21644     }/*function_string_to_dt*/
       
 21645     break;
       
 21646 
       
 21647 /****
       
 21648  *STRING_TO_BYTE
       
 21649  */
       
 21650     case function_string_to_byte :
       
 21651     {
       
 21652         symbol_c *last_type_symbol = NULL;
       
 21653 
       
 21654         {
       
 21655             symbol_c *IN_type_symbol = param_data_type;
       
 21656             last_type_symbol = param_data_type;
       
 21657             
       
 21658             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21659             {
       
 21660         
       
 21661                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21662                 return return_type_symbol;
       
 21663                 
       
 21664             }
       
 21665             
       
 21666             ERROR;
       
 21667         }
       
 21668         
       
 21669     }/*function_string_to_byte*/
       
 21670     break;
       
 21671 
       
 21672 /****
       
 21673  *STRING_TO_WORD
       
 21674  */
       
 21675     case function_string_to_word :
       
 21676     {
       
 21677         symbol_c *last_type_symbol = NULL;
       
 21678 
       
 21679         {
       
 21680             symbol_c *IN_type_symbol = param_data_type;
       
 21681             last_type_symbol = param_data_type;
       
 21682             
       
 21683             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21684             {
       
 21685         
       
 21686                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21687                 return return_type_symbol;
       
 21688                 
       
 21689             }
       
 21690             
       
 21691             ERROR;
       
 21692         }
       
 21693         
       
 21694     }/*function_string_to_word*/
       
 21695     break;
       
 21696 
       
 21697 /****
       
 21698  *STRING_TO_DWORD
       
 21699  */
       
 21700     case function_string_to_dword :
       
 21701     {
       
 21702         symbol_c *last_type_symbol = NULL;
       
 21703 
       
 21704         {
       
 21705             symbol_c *IN_type_symbol = param_data_type;
       
 21706             last_type_symbol = param_data_type;
       
 21707             
       
 21708             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21709             {
       
 21710         
       
 21711                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21712                 return return_type_symbol;
       
 21713                 
       
 21714             }
       
 21715             
       
 21716             ERROR;
       
 21717         }
       
 21718         
       
 21719     }/*function_string_to_dword*/
       
 21720     break;
       
 21721 
       
 21722 /****
       
 21723  *STRING_TO_LWORD
       
 21724  */
       
 21725     case function_string_to_lword :
       
 21726     {
       
 21727         symbol_c *last_type_symbol = NULL;
       
 21728 
       
 21729         {
       
 21730             symbol_c *IN_type_symbol = param_data_type;
       
 21731             last_type_symbol = param_data_type;
       
 21732             
       
 21733             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
       
 21734             {
       
 21735         
       
 21736                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21737                 return return_type_symbol;
       
 21738                 
       
 21739             }
       
 21740             
       
 21741             ERROR;
       
 21742         }
       
 21743         
       
 21744     }/*function_string_to_lword*/
       
 21745     break;
       
 21746 
       
 21747 /****
       
 21748  *BYTE_TO_BOOL
       
 21749  */
       
 21750     case function_byte_to_bool :
       
 21751     {
       
 21752         symbol_c *last_type_symbol = NULL;
       
 21753 
       
 21754         {
       
 21755             symbol_c *IN_type_symbol = param_data_type;
       
 21756             last_type_symbol = param_data_type;
       
 21757             
       
 21758             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21759             {
       
 21760         
       
 21761                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21762                 return return_type_symbol;
       
 21763                 
       
 21764             }
       
 21765             
       
 21766             ERROR;
       
 21767         }
       
 21768         
       
 21769     }/*function_byte_to_bool*/
       
 21770     break;
       
 21771 
       
 21772 /****
       
 21773  *BYTE_TO_SINT
       
 21774  */
       
 21775     case function_byte_to_sint :
       
 21776     {
       
 21777         symbol_c *last_type_symbol = NULL;
       
 21778 
       
 21779         {
       
 21780             symbol_c *IN_type_symbol = param_data_type;
       
 21781             last_type_symbol = param_data_type;
       
 21782             
       
 21783             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21784             {
       
 21785         
       
 21786                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21787                 return return_type_symbol;
       
 21788                 
       
 21789             }
       
 21790             
       
 21791             ERROR;
       
 21792         }
       
 21793         
       
 21794     }/*function_byte_to_sint*/
       
 21795     break;
       
 21796 
       
 21797 /****
       
 21798  *BYTE_TO_INT
       
 21799  */
       
 21800     case function_byte_to_int :
       
 21801     {
       
 21802         symbol_c *last_type_symbol = NULL;
       
 21803 
       
 21804         {
       
 21805             symbol_c *IN_type_symbol = param_data_type;
       
 21806             last_type_symbol = param_data_type;
       
 21807             
       
 21808             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21809             {
       
 21810         
       
 21811                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21812                 return return_type_symbol;
       
 21813                 
       
 21814             }
       
 21815             
       
 21816             ERROR;
       
 21817         }
       
 21818         
       
 21819     }/*function_byte_to_int*/
       
 21820     break;
       
 21821 
       
 21822 /****
       
 21823  *BYTE_TO_DINT
       
 21824  */
       
 21825     case function_byte_to_dint :
       
 21826     {
       
 21827         symbol_c *last_type_symbol = NULL;
       
 21828 
       
 21829         {
       
 21830             symbol_c *IN_type_symbol = param_data_type;
       
 21831             last_type_symbol = param_data_type;
       
 21832             
       
 21833             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21834             {
       
 21835         
       
 21836                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21837                 return return_type_symbol;
       
 21838                 
       
 21839             }
       
 21840             
       
 21841             ERROR;
       
 21842         }
       
 21843         
       
 21844     }/*function_byte_to_dint*/
       
 21845     break;
       
 21846 
       
 21847 /****
       
 21848  *BYTE_TO_LINT
       
 21849  */
       
 21850     case function_byte_to_lint :
       
 21851     {
       
 21852         symbol_c *last_type_symbol = NULL;
       
 21853 
       
 21854         {
       
 21855             symbol_c *IN_type_symbol = param_data_type;
       
 21856             last_type_symbol = param_data_type;
       
 21857             
       
 21858             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21859             {
       
 21860         
       
 21861                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21862                 return return_type_symbol;
       
 21863                 
       
 21864             }
       
 21865             
       
 21866             ERROR;
       
 21867         }
       
 21868         
       
 21869     }/*function_byte_to_lint*/
       
 21870     break;
       
 21871 
       
 21872 /****
       
 21873  *BYTE_TO_USINT
       
 21874  */
       
 21875     case function_byte_to_usint :
       
 21876     {
       
 21877         symbol_c *last_type_symbol = NULL;
       
 21878 
       
 21879         {
       
 21880             symbol_c *IN_type_symbol = param_data_type;
       
 21881             last_type_symbol = param_data_type;
       
 21882             
       
 21883             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21884             {
       
 21885         
       
 21886                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21887                 return return_type_symbol;
       
 21888                 
       
 21889             }
       
 21890             
       
 21891             ERROR;
       
 21892         }
       
 21893         
       
 21894     }/*function_byte_to_usint*/
       
 21895     break;
       
 21896 
       
 21897 /****
       
 21898  *BYTE_TO_UINT
       
 21899  */
       
 21900     case function_byte_to_uint :
       
 21901     {
       
 21902         symbol_c *last_type_symbol = NULL;
       
 21903 
       
 21904         {
       
 21905             symbol_c *IN_type_symbol = param_data_type;
       
 21906             last_type_symbol = param_data_type;
       
 21907             
       
 21908             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21909             {
       
 21910         
       
 21911                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21912                 return return_type_symbol;
       
 21913                 
       
 21914             }
       
 21915             
       
 21916             ERROR;
       
 21917         }
       
 21918         
       
 21919     }/*function_byte_to_uint*/
       
 21920     break;
       
 21921 
       
 21922 /****
       
 21923  *BYTE_TO_UDINT
       
 21924  */
       
 21925     case function_byte_to_udint :
       
 21926     {
       
 21927         symbol_c *last_type_symbol = NULL;
       
 21928 
       
 21929         {
       
 21930             symbol_c *IN_type_symbol = param_data_type;
       
 21931             last_type_symbol = param_data_type;
       
 21932             
       
 21933             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21934             {
       
 21935         
       
 21936                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21937                 return return_type_symbol;
       
 21938                 
       
 21939             }
       
 21940             
       
 21941             ERROR;
       
 21942         }
       
 21943         
       
 21944     }/*function_byte_to_udint*/
       
 21945     break;
       
 21946 
       
 21947 /****
       
 21948  *BYTE_TO_ULINT
       
 21949  */
       
 21950     case function_byte_to_ulint :
       
 21951     {
       
 21952         symbol_c *last_type_symbol = NULL;
       
 21953 
       
 21954         {
       
 21955             symbol_c *IN_type_symbol = param_data_type;
       
 21956             last_type_symbol = param_data_type;
       
 21957             
       
 21958             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21959             {
       
 21960         
       
 21961                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21962                 return return_type_symbol;
       
 21963                 
       
 21964             }
       
 21965             
       
 21966             ERROR;
       
 21967         }
       
 21968         
       
 21969     }/*function_byte_to_ulint*/
       
 21970     break;
       
 21971 
       
 21972 /****
       
 21973  *BYTE_TO_REAL
       
 21974  */
       
 21975     case function_byte_to_real :
       
 21976     {
       
 21977         symbol_c *last_type_symbol = NULL;
       
 21978 
       
 21979         {
       
 21980             symbol_c *IN_type_symbol = param_data_type;
       
 21981             last_type_symbol = param_data_type;
       
 21982             
       
 21983             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 21984             {
       
 21985         
       
 21986                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21987                 return return_type_symbol;
       
 21988                 
       
 21989             }
       
 21990             
       
 21991             ERROR;
       
 21992         }
       
 21993         
       
 21994     }/*function_byte_to_real*/
       
 21995     break;
       
 21996 
       
 21997 /****
       
 21998  *BYTE_TO_LREAL
       
 21999  */
       
 22000     case function_byte_to_lreal :
       
 22001     {
       
 22002         symbol_c *last_type_symbol = NULL;
       
 22003 
       
 22004         {
       
 22005             symbol_c *IN_type_symbol = param_data_type;
       
 22006             last_type_symbol = param_data_type;
       
 22007             
       
 22008             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22009             {
       
 22010         
       
 22011                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22012                 return return_type_symbol;
       
 22013                 
       
 22014             }
       
 22015             
       
 22016             ERROR;
       
 22017         }
       
 22018         
       
 22019     }/*function_byte_to_lreal*/
       
 22020     break;
       
 22021 
       
 22022 /****
       
 22023  *BYTE_TO_TIME
       
 22024  */
       
 22025     case function_byte_to_time :
       
 22026     {
       
 22027         symbol_c *last_type_symbol = NULL;
       
 22028 
       
 22029         {
       
 22030             symbol_c *IN_type_symbol = param_data_type;
       
 22031             last_type_symbol = param_data_type;
       
 22032             
       
 22033             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22034             {
       
 22035         
       
 22036                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22037                 return return_type_symbol;
       
 22038                 
       
 22039             }
       
 22040             
       
 22041             ERROR;
       
 22042         }
       
 22043         
       
 22044     }/*function_byte_to_time*/
       
 22045     break;
       
 22046 
       
 22047 /****
       
 22048  *BYTE_TO_DATE
       
 22049  */
       
 22050     case function_byte_to_date :
       
 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::date_type_name;
       
 22062                 return return_type_symbol;
       
 22063                 
       
 22064             }
       
 22065             
       
 22066             ERROR;
       
 22067         }
       
 22068         
       
 22069     }/*function_byte_to_date*/
       
 22070     break;
       
 22071 
       
 22072 /****
       
 22073  *BYTE_TO_TOD
       
 22074  */
       
 22075     case function_byte_to_tod :
       
 22076     {
       
 22077         symbol_c *last_type_symbol = NULL;
       
 22078 
       
 22079         {
       
 22080             symbol_c *IN_type_symbol = param_data_type;
       
 22081             last_type_symbol = param_data_type;
       
 22082             
       
 22083             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22084             {
       
 22085         
       
 22086                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22087                 return return_type_symbol;
       
 22088                 
       
 22089             }
       
 22090             
       
 22091             ERROR;
       
 22092         }
       
 22093         
       
 22094     }/*function_byte_to_tod*/
       
 22095     break;
       
 22096 
       
 22097 /****
       
 22098  *BYTE_TO_DT
       
 22099  */
       
 22100     case function_byte_to_dt :
       
 22101     {
       
 22102         symbol_c *last_type_symbol = NULL;
       
 22103 
       
 22104         {
       
 22105             symbol_c *IN_type_symbol = param_data_type;
       
 22106             last_type_symbol = param_data_type;
       
 22107             
       
 22108             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22109             {
       
 22110         
       
 22111                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22112                 return return_type_symbol;
       
 22113                 
       
 22114             }
       
 22115             
       
 22116             ERROR;
       
 22117         }
       
 22118         
       
 22119     }/*function_byte_to_dt*/
       
 22120     break;
       
 22121 
       
 22122 /****
       
 22123  *BYTE_TO_STRING
       
 22124  */
       
 22125     case function_byte_to_string :
       
 22126     {
       
 22127         symbol_c *last_type_symbol = NULL;
       
 22128 
       
 22129         {
       
 22130             symbol_c *IN_type_symbol = param_data_type;
       
 22131             last_type_symbol = param_data_type;
       
 22132             
       
 22133             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
 20187             {
 22134             {
 20188         
 22135         
 20189                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 22136                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 20190                 return return_type_symbol;
 22137                 return return_type_symbol;
 20191                 
 22138                 
 20192             }
 22139             }
 20193             
 22140             
 20194             ERROR;
 22141             ERROR;
 20195         }
 22142         }
 20196         
 22143         
 20197     }/*function_time_to_string*/
 22144     }/*function_byte_to_string*/
 20198     break;
 22145     break;
 20199 
 22146 
 20200 /****
 22147 /****
 20201  *TIME_TO_BYTE
 22148  *BYTE_TO_WORD
 20202  */
 22149  */
 20203     case function_time_to_byte :
 22150     case function_byte_to_word :
 20204     {
 22151     {
 20205         symbol_c *last_type_symbol = NULL;
 22152         symbol_c *last_type_symbol = NULL;
 20206 
 22153 
 20207         {
 22154         {
 20208             symbol_c *IN_type_symbol = param_data_type;
 22155             symbol_c *IN_type_symbol = param_data_type;
 20209             last_type_symbol = param_data_type;
 22156             last_type_symbol = param_data_type;
 20210             
 22157             
 20211             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 22158             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22159             {
       
 22160         
       
 22161                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22162                 return return_type_symbol;
       
 22163                 
       
 22164             }
       
 22165             
       
 22166             ERROR;
       
 22167         }
       
 22168         
       
 22169     }/*function_byte_to_word*/
       
 22170     break;
       
 22171 
       
 22172 /****
       
 22173  *BYTE_TO_DWORD
       
 22174  */
       
 22175     case function_byte_to_dword :
       
 22176     {
       
 22177         symbol_c *last_type_symbol = NULL;
       
 22178 
       
 22179         {
       
 22180             symbol_c *IN_type_symbol = param_data_type;
       
 22181             last_type_symbol = param_data_type;
       
 22182             
       
 22183             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22184             {
       
 22185         
       
 22186                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22187                 return return_type_symbol;
       
 22188                 
       
 22189             }
       
 22190             
       
 22191             ERROR;
       
 22192         }
       
 22193         
       
 22194     }/*function_byte_to_dword*/
       
 22195     break;
       
 22196 
       
 22197 /****
       
 22198  *BYTE_TO_LWORD
       
 22199  */
       
 22200     case function_byte_to_lword :
       
 22201     {
       
 22202         symbol_c *last_type_symbol = NULL;
       
 22203 
       
 22204         {
       
 22205             symbol_c *IN_type_symbol = param_data_type;
       
 22206             last_type_symbol = param_data_type;
       
 22207             
       
 22208             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
       
 22209             {
       
 22210         
       
 22211                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22212                 return return_type_symbol;
       
 22213                 
       
 22214             }
       
 22215             
       
 22216             ERROR;
       
 22217         }
       
 22218         
       
 22219     }/*function_byte_to_lword*/
       
 22220     break;
       
 22221 
       
 22222 /****
       
 22223  *WORD_TO_BOOL
       
 22224  */
       
 22225     case function_word_to_bool :
       
 22226     {
       
 22227         symbol_c *last_type_symbol = NULL;
       
 22228 
       
 22229         {
       
 22230             symbol_c *IN_type_symbol = param_data_type;
       
 22231             last_type_symbol = param_data_type;
       
 22232             
       
 22233             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22234             {
       
 22235         
       
 22236                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22237                 return return_type_symbol;
       
 22238                 
       
 22239             }
       
 22240             
       
 22241             ERROR;
       
 22242         }
       
 22243         
       
 22244     }/*function_word_to_bool*/
       
 22245     break;
       
 22246 
       
 22247 /****
       
 22248  *WORD_TO_SINT
       
 22249  */
       
 22250     case function_word_to_sint :
       
 22251     {
       
 22252         symbol_c *last_type_symbol = NULL;
       
 22253 
       
 22254         {
       
 22255             symbol_c *IN_type_symbol = param_data_type;
       
 22256             last_type_symbol = param_data_type;
       
 22257             
       
 22258             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22259             {
       
 22260         
       
 22261                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22262                 return return_type_symbol;
       
 22263                 
       
 22264             }
       
 22265             
       
 22266             ERROR;
       
 22267         }
       
 22268         
       
 22269     }/*function_word_to_sint*/
       
 22270     break;
       
 22271 
       
 22272 /****
       
 22273  *WORD_TO_INT
       
 22274  */
       
 22275     case function_word_to_int :
       
 22276     {
       
 22277         symbol_c *last_type_symbol = NULL;
       
 22278 
       
 22279         {
       
 22280             symbol_c *IN_type_symbol = param_data_type;
       
 22281             last_type_symbol = param_data_type;
       
 22282             
       
 22283             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22284             {
       
 22285         
       
 22286                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22287                 return return_type_symbol;
       
 22288                 
       
 22289             }
       
 22290             
       
 22291             ERROR;
       
 22292         }
       
 22293         
       
 22294     }/*function_word_to_int*/
       
 22295     break;
       
 22296 
       
 22297 /****
       
 22298  *WORD_TO_DINT
       
 22299  */
       
 22300     case function_word_to_dint :
       
 22301     {
       
 22302         symbol_c *last_type_symbol = NULL;
       
 22303 
       
 22304         {
       
 22305             symbol_c *IN_type_symbol = param_data_type;
       
 22306             last_type_symbol = param_data_type;
       
 22307             
       
 22308             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22309             {
       
 22310         
       
 22311                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22312                 return return_type_symbol;
       
 22313                 
       
 22314             }
       
 22315             
       
 22316             ERROR;
       
 22317         }
       
 22318         
       
 22319     }/*function_word_to_dint*/
       
 22320     break;
       
 22321 
       
 22322 /****
       
 22323  *WORD_TO_LINT
       
 22324  */
       
 22325     case function_word_to_lint :
       
 22326     {
       
 22327         symbol_c *last_type_symbol = NULL;
       
 22328 
       
 22329         {
       
 22330             symbol_c *IN_type_symbol = param_data_type;
       
 22331             last_type_symbol = param_data_type;
       
 22332             
       
 22333             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22334             {
       
 22335         
       
 22336                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22337                 return return_type_symbol;
       
 22338                 
       
 22339             }
       
 22340             
       
 22341             ERROR;
       
 22342         }
       
 22343         
       
 22344     }/*function_word_to_lint*/
       
 22345     break;
       
 22346 
       
 22347 /****
       
 22348  *WORD_TO_USINT
       
 22349  */
       
 22350     case function_word_to_usint :
       
 22351     {
       
 22352         symbol_c *last_type_symbol = NULL;
       
 22353 
       
 22354         {
       
 22355             symbol_c *IN_type_symbol = param_data_type;
       
 22356             last_type_symbol = param_data_type;
       
 22357             
       
 22358             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22359             {
       
 22360         
       
 22361                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22362                 return return_type_symbol;
       
 22363                 
       
 22364             }
       
 22365             
       
 22366             ERROR;
       
 22367         }
       
 22368         
       
 22369     }/*function_word_to_usint*/
       
 22370     break;
       
 22371 
       
 22372 /****
       
 22373  *WORD_TO_UINT
       
 22374  */
       
 22375     case function_word_to_uint :
       
 22376     {
       
 22377         symbol_c *last_type_symbol = NULL;
       
 22378 
       
 22379         {
       
 22380             symbol_c *IN_type_symbol = param_data_type;
       
 22381             last_type_symbol = param_data_type;
       
 22382             
       
 22383             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22384             {
       
 22385         
       
 22386                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22387                 return return_type_symbol;
       
 22388                 
       
 22389             }
       
 22390             
       
 22391             ERROR;
       
 22392         }
       
 22393         
       
 22394     }/*function_word_to_uint*/
       
 22395     break;
       
 22396 
       
 22397 /****
       
 22398  *WORD_TO_UDINT
       
 22399  */
       
 22400     case function_word_to_udint :
       
 22401     {
       
 22402         symbol_c *last_type_symbol = NULL;
       
 22403 
       
 22404         {
       
 22405             symbol_c *IN_type_symbol = param_data_type;
       
 22406             last_type_symbol = param_data_type;
       
 22407             
       
 22408             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22409             {
       
 22410         
       
 22411                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22412                 return return_type_symbol;
       
 22413                 
       
 22414             }
       
 22415             
       
 22416             ERROR;
       
 22417         }
       
 22418         
       
 22419     }/*function_word_to_udint*/
       
 22420     break;
       
 22421 
       
 22422 /****
       
 22423  *WORD_TO_ULINT
       
 22424  */
       
 22425     case function_word_to_ulint :
       
 22426     {
       
 22427         symbol_c *last_type_symbol = NULL;
       
 22428 
       
 22429         {
       
 22430             symbol_c *IN_type_symbol = param_data_type;
       
 22431             last_type_symbol = param_data_type;
       
 22432             
       
 22433             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22434             {
       
 22435         
       
 22436                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22437                 return return_type_symbol;
       
 22438                 
       
 22439             }
       
 22440             
       
 22441             ERROR;
       
 22442         }
       
 22443         
       
 22444     }/*function_word_to_ulint*/
       
 22445     break;
       
 22446 
       
 22447 /****
       
 22448  *WORD_TO_REAL
       
 22449  */
       
 22450     case function_word_to_real :
       
 22451     {
       
 22452         symbol_c *last_type_symbol = NULL;
       
 22453 
       
 22454         {
       
 22455             symbol_c *IN_type_symbol = param_data_type;
       
 22456             last_type_symbol = param_data_type;
       
 22457             
       
 22458             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22459             {
       
 22460         
       
 22461                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22462                 return return_type_symbol;
       
 22463                 
       
 22464             }
       
 22465             
       
 22466             ERROR;
       
 22467         }
       
 22468         
       
 22469     }/*function_word_to_real*/
       
 22470     break;
       
 22471 
       
 22472 /****
       
 22473  *WORD_TO_LREAL
       
 22474  */
       
 22475     case function_word_to_lreal :
       
 22476     {
       
 22477         symbol_c *last_type_symbol = NULL;
       
 22478 
       
 22479         {
       
 22480             symbol_c *IN_type_symbol = param_data_type;
       
 22481             last_type_symbol = param_data_type;
       
 22482             
       
 22483             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22484             {
       
 22485         
       
 22486                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22487                 return return_type_symbol;
       
 22488                 
       
 22489             }
       
 22490             
       
 22491             ERROR;
       
 22492         }
       
 22493         
       
 22494     }/*function_word_to_lreal*/
       
 22495     break;
       
 22496 
       
 22497 /****
       
 22498  *WORD_TO_TIME
       
 22499  */
       
 22500     case function_word_to_time :
       
 22501     {
       
 22502         symbol_c *last_type_symbol = NULL;
       
 22503 
       
 22504         {
       
 22505             symbol_c *IN_type_symbol = param_data_type;
       
 22506             last_type_symbol = param_data_type;
       
 22507             
       
 22508             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22509             {
       
 22510         
       
 22511                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22512                 return return_type_symbol;
       
 22513                 
       
 22514             }
       
 22515             
       
 22516             ERROR;
       
 22517         }
       
 22518         
       
 22519     }/*function_word_to_time*/
       
 22520     break;
       
 22521 
       
 22522 /****
       
 22523  *WORD_TO_DATE
       
 22524  */
       
 22525     case function_word_to_date :
       
 22526     {
       
 22527         symbol_c *last_type_symbol = NULL;
       
 22528 
       
 22529         {
       
 22530             symbol_c *IN_type_symbol = param_data_type;
       
 22531             last_type_symbol = param_data_type;
       
 22532             
       
 22533             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22534             {
       
 22535         
       
 22536                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22537                 return return_type_symbol;
       
 22538                 
       
 22539             }
       
 22540             
       
 22541             ERROR;
       
 22542         }
       
 22543         
       
 22544     }/*function_word_to_date*/
       
 22545     break;
       
 22546 
       
 22547 /****
       
 22548  *WORD_TO_TOD
       
 22549  */
       
 22550     case function_word_to_tod :
       
 22551     {
       
 22552         symbol_c *last_type_symbol = NULL;
       
 22553 
       
 22554         {
       
 22555             symbol_c *IN_type_symbol = param_data_type;
       
 22556             last_type_symbol = param_data_type;
       
 22557             
       
 22558             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22559             {
       
 22560         
       
 22561                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22562                 return return_type_symbol;
       
 22563                 
       
 22564             }
       
 22565             
       
 22566             ERROR;
       
 22567         }
       
 22568         
       
 22569     }/*function_word_to_tod*/
       
 22570     break;
       
 22571 
       
 22572 /****
       
 22573  *WORD_TO_DT
       
 22574  */
       
 22575     case function_word_to_dt :
       
 22576     {
       
 22577         symbol_c *last_type_symbol = NULL;
       
 22578 
       
 22579         {
       
 22580             symbol_c *IN_type_symbol = param_data_type;
       
 22581             last_type_symbol = param_data_type;
       
 22582             
       
 22583             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22584             {
       
 22585         
       
 22586                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22587                 return return_type_symbol;
       
 22588                 
       
 22589             }
       
 22590             
       
 22591             ERROR;
       
 22592         }
       
 22593         
       
 22594     }/*function_word_to_dt*/
       
 22595     break;
       
 22596 
       
 22597 /****
       
 22598  *WORD_TO_STRING
       
 22599  */
       
 22600     case function_word_to_string :
       
 22601     {
       
 22602         symbol_c *last_type_symbol = NULL;
       
 22603 
       
 22604         {
       
 22605             symbol_c *IN_type_symbol = param_data_type;
       
 22606             last_type_symbol = param_data_type;
       
 22607             
       
 22608             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22609             {
       
 22610         
       
 22611                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22612                 return return_type_symbol;
       
 22613                 
       
 22614             }
       
 22615             
       
 22616             ERROR;
       
 22617         }
       
 22618         
       
 22619     }/*function_word_to_string*/
       
 22620     break;
       
 22621 
       
 22622 /****
       
 22623  *WORD_TO_BYTE
       
 22624  */
       
 22625     case function_word_to_byte :
       
 22626     {
       
 22627         symbol_c *last_type_symbol = NULL;
       
 22628 
       
 22629         {
       
 22630             symbol_c *IN_type_symbol = param_data_type;
       
 22631             last_type_symbol = param_data_type;
       
 22632             
       
 22633             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
 20212             {
 22634             {
 20213         
 22635         
 20214                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 22636                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 20215                 return return_type_symbol;
 22637                 return return_type_symbol;
 20216                 
 22638                 
 20217             }
 22639             }
 20218             
 22640             
 20219             ERROR;
 22641             ERROR;
 20220         }
 22642         }
 20221         
 22643         
 20222     }/*function_time_to_byte*/
 22644     }/*function_word_to_byte*/
 20223     break;
 22645     break;
 20224 
 22646 
 20225 /****
 22647 /****
 20226  *TIME_TO_WORD
 22648  *WORD_TO_DWORD
 20227  */
 22649  */
 20228     case function_time_to_word :
 22650     case function_word_to_dword :
 20229     {
 22651     {
 20230         symbol_c *last_type_symbol = NULL;
 22652         symbol_c *last_type_symbol = NULL;
 20231 
 22653 
 20232         {
 22654         {
 20233             symbol_c *IN_type_symbol = param_data_type;
 22655             symbol_c *IN_type_symbol = param_data_type;
 20234             last_type_symbol = param_data_type;
 22656             last_type_symbol = param_data_type;
 20235             
 22657             
 20236             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 22658             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22659             {
       
 22660         
       
 22661                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22662                 return return_type_symbol;
       
 22663                 
       
 22664             }
       
 22665             
       
 22666             ERROR;
       
 22667         }
       
 22668         
       
 22669     }/*function_word_to_dword*/
       
 22670     break;
       
 22671 
       
 22672 /****
       
 22673  *WORD_TO_LWORD
       
 22674  */
       
 22675     case function_word_to_lword :
       
 22676     {
       
 22677         symbol_c *last_type_symbol = NULL;
       
 22678 
       
 22679         {
       
 22680             symbol_c *IN_type_symbol = param_data_type;
       
 22681             last_type_symbol = param_data_type;
       
 22682             
       
 22683             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
       
 22684             {
       
 22685         
       
 22686                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22687                 return return_type_symbol;
       
 22688                 
       
 22689             }
       
 22690             
       
 22691             ERROR;
       
 22692         }
       
 22693         
       
 22694     }/*function_word_to_lword*/
       
 22695     break;
       
 22696 
       
 22697 /****
       
 22698  *DWORD_TO_BOOL
       
 22699  */
       
 22700     case function_dword_to_bool :
       
 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::dword_type_name, last_type_symbol))
       
 22709             {
       
 22710         
       
 22711                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22712                 return return_type_symbol;
       
 22713                 
       
 22714             }
       
 22715             
       
 22716             ERROR;
       
 22717         }
       
 22718         
       
 22719     }/*function_dword_to_bool*/
       
 22720     break;
       
 22721 
       
 22722 /****
       
 22723  *DWORD_TO_SINT
       
 22724  */
       
 22725     case function_dword_to_sint :
       
 22726     {
       
 22727         symbol_c *last_type_symbol = NULL;
       
 22728 
       
 22729         {
       
 22730             symbol_c *IN_type_symbol = param_data_type;
       
 22731             last_type_symbol = param_data_type;
       
 22732             
       
 22733             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22734             {
       
 22735         
       
 22736                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22737                 return return_type_symbol;
       
 22738                 
       
 22739             }
       
 22740             
       
 22741             ERROR;
       
 22742         }
       
 22743         
       
 22744     }/*function_dword_to_sint*/
       
 22745     break;
       
 22746 
       
 22747 /****
       
 22748  *DWORD_TO_INT
       
 22749  */
       
 22750     case function_dword_to_int :
       
 22751     {
       
 22752         symbol_c *last_type_symbol = NULL;
       
 22753 
       
 22754         {
       
 22755             symbol_c *IN_type_symbol = param_data_type;
       
 22756             last_type_symbol = param_data_type;
       
 22757             
       
 22758             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22759             {
       
 22760         
       
 22761                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22762                 return return_type_symbol;
       
 22763                 
       
 22764             }
       
 22765             
       
 22766             ERROR;
       
 22767         }
       
 22768         
       
 22769     }/*function_dword_to_int*/
       
 22770     break;
       
 22771 
       
 22772 /****
       
 22773  *DWORD_TO_DINT
       
 22774  */
       
 22775     case function_dword_to_dint :
       
 22776     {
       
 22777         symbol_c *last_type_symbol = NULL;
       
 22778 
       
 22779         {
       
 22780             symbol_c *IN_type_symbol = param_data_type;
       
 22781             last_type_symbol = param_data_type;
       
 22782             
       
 22783             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22784             {
       
 22785         
       
 22786                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22787                 return return_type_symbol;
       
 22788                 
       
 22789             }
       
 22790             
       
 22791             ERROR;
       
 22792         }
       
 22793         
       
 22794     }/*function_dword_to_dint*/
       
 22795     break;
       
 22796 
       
 22797 /****
       
 22798  *DWORD_TO_LINT
       
 22799  */
       
 22800     case function_dword_to_lint :
       
 22801     {
       
 22802         symbol_c *last_type_symbol = NULL;
       
 22803 
       
 22804         {
       
 22805             symbol_c *IN_type_symbol = param_data_type;
       
 22806             last_type_symbol = param_data_type;
       
 22807             
       
 22808             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22809             {
       
 22810         
       
 22811                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22812                 return return_type_symbol;
       
 22813                 
       
 22814             }
       
 22815             
       
 22816             ERROR;
       
 22817         }
       
 22818         
       
 22819     }/*function_dword_to_lint*/
       
 22820     break;
       
 22821 
       
 22822 /****
       
 22823  *DWORD_TO_USINT
       
 22824  */
       
 22825     case function_dword_to_usint :
       
 22826     {
       
 22827         symbol_c *last_type_symbol = NULL;
       
 22828 
       
 22829         {
       
 22830             symbol_c *IN_type_symbol = param_data_type;
       
 22831             last_type_symbol = param_data_type;
       
 22832             
       
 22833             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22834             {
       
 22835         
       
 22836                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22837                 return return_type_symbol;
       
 22838                 
       
 22839             }
       
 22840             
       
 22841             ERROR;
       
 22842         }
       
 22843         
       
 22844     }/*function_dword_to_usint*/
       
 22845     break;
       
 22846 
       
 22847 /****
       
 22848  *DWORD_TO_UINT
       
 22849  */
       
 22850     case function_dword_to_uint :
       
 22851     {
       
 22852         symbol_c *last_type_symbol = NULL;
       
 22853 
       
 22854         {
       
 22855             symbol_c *IN_type_symbol = param_data_type;
       
 22856             last_type_symbol = param_data_type;
       
 22857             
       
 22858             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22859             {
       
 22860         
       
 22861                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22862                 return return_type_symbol;
       
 22863                 
       
 22864             }
       
 22865             
       
 22866             ERROR;
       
 22867         }
       
 22868         
       
 22869     }/*function_dword_to_uint*/
       
 22870     break;
       
 22871 
       
 22872 /****
       
 22873  *DWORD_TO_UDINT
       
 22874  */
       
 22875     case function_dword_to_udint :
       
 22876     {
       
 22877         symbol_c *last_type_symbol = NULL;
       
 22878 
       
 22879         {
       
 22880             symbol_c *IN_type_symbol = param_data_type;
       
 22881             last_type_symbol = param_data_type;
       
 22882             
       
 22883             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22884             {
       
 22885         
       
 22886                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22887                 return return_type_symbol;
       
 22888                 
       
 22889             }
       
 22890             
       
 22891             ERROR;
       
 22892         }
       
 22893         
       
 22894     }/*function_dword_to_udint*/
       
 22895     break;
       
 22896 
       
 22897 /****
       
 22898  *DWORD_TO_ULINT
       
 22899  */
       
 22900     case function_dword_to_ulint :
       
 22901     {
       
 22902         symbol_c *last_type_symbol = NULL;
       
 22903 
       
 22904         {
       
 22905             symbol_c *IN_type_symbol = param_data_type;
       
 22906             last_type_symbol = param_data_type;
       
 22907             
       
 22908             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22909             {
       
 22910         
       
 22911                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22912                 return return_type_symbol;
       
 22913                 
       
 22914             }
       
 22915             
       
 22916             ERROR;
       
 22917         }
       
 22918         
       
 22919     }/*function_dword_to_ulint*/
       
 22920     break;
       
 22921 
       
 22922 /****
       
 22923  *DWORD_TO_REAL
       
 22924  */
       
 22925     case function_dword_to_real :
       
 22926     {
       
 22927         symbol_c *last_type_symbol = NULL;
       
 22928 
       
 22929         {
       
 22930             symbol_c *IN_type_symbol = param_data_type;
       
 22931             last_type_symbol = param_data_type;
       
 22932             
       
 22933             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22934             {
       
 22935         
       
 22936                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22937                 return return_type_symbol;
       
 22938                 
       
 22939             }
       
 22940             
       
 22941             ERROR;
       
 22942         }
       
 22943         
       
 22944     }/*function_dword_to_real*/
       
 22945     break;
       
 22946 
       
 22947 /****
       
 22948  *DWORD_TO_LREAL
       
 22949  */
       
 22950     case function_dword_to_lreal :
       
 22951     {
       
 22952         symbol_c *last_type_symbol = NULL;
       
 22953 
       
 22954         {
       
 22955             symbol_c *IN_type_symbol = param_data_type;
       
 22956             last_type_symbol = param_data_type;
       
 22957             
       
 22958             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22959             {
       
 22960         
       
 22961                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22962                 return return_type_symbol;
       
 22963                 
       
 22964             }
       
 22965             
       
 22966             ERROR;
       
 22967         }
       
 22968         
       
 22969     }/*function_dword_to_lreal*/
       
 22970     break;
       
 22971 
       
 22972 /****
       
 22973  *DWORD_TO_TIME
       
 22974  */
       
 22975     case function_dword_to_time :
       
 22976     {
       
 22977         symbol_c *last_type_symbol = NULL;
       
 22978 
       
 22979         {
       
 22980             symbol_c *IN_type_symbol = param_data_type;
       
 22981             last_type_symbol = param_data_type;
       
 22982             
       
 22983             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 22984             {
       
 22985         
       
 22986                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22987                 return return_type_symbol;
       
 22988                 
       
 22989             }
       
 22990             
       
 22991             ERROR;
       
 22992         }
       
 22993         
       
 22994     }/*function_dword_to_time*/
       
 22995     break;
       
 22996 
       
 22997 /****
       
 22998  *DWORD_TO_DATE
       
 22999  */
       
 23000     case function_dword_to_date :
       
 23001     {
       
 23002         symbol_c *last_type_symbol = NULL;
       
 23003 
       
 23004         {
       
 23005             symbol_c *IN_type_symbol = param_data_type;
       
 23006             last_type_symbol = param_data_type;
       
 23007             
       
 23008             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23009             {
       
 23010         
       
 23011                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23012                 return return_type_symbol;
       
 23013                 
       
 23014             }
       
 23015             
       
 23016             ERROR;
       
 23017         }
       
 23018         
       
 23019     }/*function_dword_to_date*/
       
 23020     break;
       
 23021 
       
 23022 /****
       
 23023  *DWORD_TO_TOD
       
 23024  */
       
 23025     case function_dword_to_tod :
       
 23026     {
       
 23027         symbol_c *last_type_symbol = NULL;
       
 23028 
       
 23029         {
       
 23030             symbol_c *IN_type_symbol = param_data_type;
       
 23031             last_type_symbol = param_data_type;
       
 23032             
       
 23033             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23034             {
       
 23035         
       
 23036                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23037                 return return_type_symbol;
       
 23038                 
       
 23039             }
       
 23040             
       
 23041             ERROR;
       
 23042         }
       
 23043         
       
 23044     }/*function_dword_to_tod*/
       
 23045     break;
       
 23046 
       
 23047 /****
       
 23048  *DWORD_TO_DT
       
 23049  */
       
 23050     case function_dword_to_dt :
       
 23051     {
       
 23052         symbol_c *last_type_symbol = NULL;
       
 23053 
       
 23054         {
       
 23055             symbol_c *IN_type_symbol = param_data_type;
       
 23056             last_type_symbol = param_data_type;
       
 23057             
       
 23058             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23059             {
       
 23060         
       
 23061                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23062                 return return_type_symbol;
       
 23063                 
       
 23064             }
       
 23065             
       
 23066             ERROR;
       
 23067         }
       
 23068         
       
 23069     }/*function_dword_to_dt*/
       
 23070     break;
       
 23071 
       
 23072 /****
       
 23073  *DWORD_TO_STRING
       
 23074  */
       
 23075     case function_dword_to_string :
       
 23076     {
       
 23077         symbol_c *last_type_symbol = NULL;
       
 23078 
       
 23079         {
       
 23080             symbol_c *IN_type_symbol = param_data_type;
       
 23081             last_type_symbol = param_data_type;
       
 23082             
       
 23083             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23084             {
       
 23085         
       
 23086                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23087                 return return_type_symbol;
       
 23088                 
       
 23089             }
       
 23090             
       
 23091             ERROR;
       
 23092         }
       
 23093         
       
 23094     }/*function_dword_to_string*/
       
 23095     break;
       
 23096 
       
 23097 /****
       
 23098  *DWORD_TO_BYTE
       
 23099  */
       
 23100     case function_dword_to_byte :
       
 23101     {
       
 23102         symbol_c *last_type_symbol = NULL;
       
 23103 
       
 23104         {
       
 23105             symbol_c *IN_type_symbol = param_data_type;
       
 23106             last_type_symbol = param_data_type;
       
 23107             
       
 23108             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23109             {
       
 23110         
       
 23111                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23112                 return return_type_symbol;
       
 23113                 
       
 23114             }
       
 23115             
       
 23116             ERROR;
       
 23117         }
       
 23118         
       
 23119     }/*function_dword_to_byte*/
       
 23120     break;
       
 23121 
       
 23122 /****
       
 23123  *DWORD_TO_WORD
       
 23124  */
       
 23125     case function_dword_to_word :
       
 23126     {
       
 23127         symbol_c *last_type_symbol = NULL;
       
 23128 
       
 23129         {
       
 23130             symbol_c *IN_type_symbol = param_data_type;
       
 23131             last_type_symbol = param_data_type;
       
 23132             
       
 23133             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
 20237             {
 23134             {
 20238         
 23135         
 20239                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 23136                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
 20240                 return return_type_symbol;
 23137                 return return_type_symbol;
 20241                 
 23138                 
 20242             }
 23139             }
 20243             
 23140             
 20244             ERROR;
 23141             ERROR;
 20245         }
 23142         }
 20246         
 23143         
 20247     }/*function_time_to_word*/
 23144     }/*function_dword_to_word*/
 20248     break;
 23145     break;
 20249 
 23146 
 20250 /****
 23147 /****
 20251  *TIME_TO_DWORD
 23148  *DWORD_TO_LWORD
 20252  */
 23149  */
 20253     case function_time_to_dword :
 23150     case function_dword_to_lword :
 20254     {
 23151     {
 20255         symbol_c *last_type_symbol = NULL;
 23152         symbol_c *last_type_symbol = NULL;
 20256 
 23153 
 20257         {
 23154         {
 20258             symbol_c *IN_type_symbol = param_data_type;
 23155             symbol_c *IN_type_symbol = param_data_type;
 20259             last_type_symbol = param_data_type;
 23156             last_type_symbol = param_data_type;
 20260             
 23157             
 20261             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 23158             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
       
 23159             {
       
 23160         
       
 23161                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23162                 return return_type_symbol;
       
 23163                 
       
 23164             }
       
 23165             
       
 23166             ERROR;
       
 23167         }
       
 23168         
       
 23169     }/*function_dword_to_lword*/
       
 23170     break;
       
 23171 
       
 23172 /****
       
 23173  *LWORD_TO_BOOL
       
 23174  */
       
 23175     case function_lword_to_bool :
       
 23176     {
       
 23177         symbol_c *last_type_symbol = NULL;
       
 23178 
       
 23179         {
       
 23180             symbol_c *IN_type_symbol = param_data_type;
       
 23181             last_type_symbol = param_data_type;
       
 23182             
       
 23183             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23184             {
       
 23185         
       
 23186                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23187                 return return_type_symbol;
       
 23188                 
       
 23189             }
       
 23190             
       
 23191             ERROR;
       
 23192         }
       
 23193         
       
 23194     }/*function_lword_to_bool*/
       
 23195     break;
       
 23196 
       
 23197 /****
       
 23198  *LWORD_TO_SINT
       
 23199  */
       
 23200     case function_lword_to_sint :
       
 23201     {
       
 23202         symbol_c *last_type_symbol = NULL;
       
 23203 
       
 23204         {
       
 23205             symbol_c *IN_type_symbol = param_data_type;
       
 23206             last_type_symbol = param_data_type;
       
 23207             
       
 23208             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23209             {
       
 23210         
       
 23211                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23212                 return return_type_symbol;
       
 23213                 
       
 23214             }
       
 23215             
       
 23216             ERROR;
       
 23217         }
       
 23218         
       
 23219     }/*function_lword_to_sint*/
       
 23220     break;
       
 23221 
       
 23222 /****
       
 23223  *LWORD_TO_INT
       
 23224  */
       
 23225     case function_lword_to_int :
       
 23226     {
       
 23227         symbol_c *last_type_symbol = NULL;
       
 23228 
       
 23229         {
       
 23230             symbol_c *IN_type_symbol = param_data_type;
       
 23231             last_type_symbol = param_data_type;
       
 23232             
       
 23233             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23234             {
       
 23235         
       
 23236                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23237                 return return_type_symbol;
       
 23238                 
       
 23239             }
       
 23240             
       
 23241             ERROR;
       
 23242         }
       
 23243         
       
 23244     }/*function_lword_to_int*/
       
 23245     break;
       
 23246 
       
 23247 /****
       
 23248  *LWORD_TO_DINT
       
 23249  */
       
 23250     case function_lword_to_dint :
       
 23251     {
       
 23252         symbol_c *last_type_symbol = NULL;
       
 23253 
       
 23254         {
       
 23255             symbol_c *IN_type_symbol = param_data_type;
       
 23256             last_type_symbol = param_data_type;
       
 23257             
       
 23258             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23259             {
       
 23260         
       
 23261                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23262                 return return_type_symbol;
       
 23263                 
       
 23264             }
       
 23265             
       
 23266             ERROR;
       
 23267         }
       
 23268         
       
 23269     }/*function_lword_to_dint*/
       
 23270     break;
       
 23271 
       
 23272 /****
       
 23273  *LWORD_TO_LINT
       
 23274  */
       
 23275     case function_lword_to_lint :
       
 23276     {
       
 23277         symbol_c *last_type_symbol = NULL;
       
 23278 
       
 23279         {
       
 23280             symbol_c *IN_type_symbol = param_data_type;
       
 23281             last_type_symbol = param_data_type;
       
 23282             
       
 23283             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23284             {
       
 23285         
       
 23286                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23287                 return return_type_symbol;
       
 23288                 
       
 23289             }
       
 23290             
       
 23291             ERROR;
       
 23292         }
       
 23293         
       
 23294     }/*function_lword_to_lint*/
       
 23295     break;
       
 23296 
       
 23297 /****
       
 23298  *LWORD_TO_USINT
       
 23299  */
       
 23300     case function_lword_to_usint :
       
 23301     {
       
 23302         symbol_c *last_type_symbol = NULL;
       
 23303 
       
 23304         {
       
 23305             symbol_c *IN_type_symbol = param_data_type;
       
 23306             last_type_symbol = param_data_type;
       
 23307             
       
 23308             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23309             {
       
 23310         
       
 23311                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23312                 return return_type_symbol;
       
 23313                 
       
 23314             }
       
 23315             
       
 23316             ERROR;
       
 23317         }
       
 23318         
       
 23319     }/*function_lword_to_usint*/
       
 23320     break;
       
 23321 
       
 23322 /****
       
 23323  *LWORD_TO_UINT
       
 23324  */
       
 23325     case function_lword_to_uint :
       
 23326     {
       
 23327         symbol_c *last_type_symbol = NULL;
       
 23328 
       
 23329         {
       
 23330             symbol_c *IN_type_symbol = param_data_type;
       
 23331             last_type_symbol = param_data_type;
       
 23332             
       
 23333             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23334             {
       
 23335         
       
 23336                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23337                 return return_type_symbol;
       
 23338                 
       
 23339             }
       
 23340             
       
 23341             ERROR;
       
 23342         }
       
 23343         
       
 23344     }/*function_lword_to_uint*/
       
 23345     break;
       
 23346 
       
 23347 /****
       
 23348  *LWORD_TO_UDINT
       
 23349  */
       
 23350     case function_lword_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::lword_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             ERROR;
       
 23367         }
       
 23368         
       
 23369     }/*function_lword_to_udint*/
       
 23370     break;
       
 23371 
       
 23372 /****
       
 23373  *LWORD_TO_ULINT
       
 23374  */
       
 23375     case function_lword_to_ulint :
       
 23376     {
       
 23377         symbol_c *last_type_symbol = NULL;
       
 23378 
       
 23379         {
       
 23380             symbol_c *IN_type_symbol = param_data_type;
       
 23381             last_type_symbol = param_data_type;
       
 23382             
       
 23383             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23384             {
       
 23385         
       
 23386                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23387                 return return_type_symbol;
       
 23388                 
       
 23389             }
       
 23390             
       
 23391             ERROR;
       
 23392         }
       
 23393         
       
 23394     }/*function_lword_to_ulint*/
       
 23395     break;
       
 23396 
       
 23397 /****
       
 23398  *LWORD_TO_REAL
       
 23399  */
       
 23400     case function_lword_to_real :
       
 23401     {
       
 23402         symbol_c *last_type_symbol = NULL;
       
 23403 
       
 23404         {
       
 23405             symbol_c *IN_type_symbol = param_data_type;
       
 23406             last_type_symbol = param_data_type;
       
 23407             
       
 23408             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23409             {
       
 23410         
       
 23411                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23412                 return return_type_symbol;
       
 23413                 
       
 23414             }
       
 23415             
       
 23416             ERROR;
       
 23417         }
       
 23418         
       
 23419     }/*function_lword_to_real*/
       
 23420     break;
       
 23421 
       
 23422 /****
       
 23423  *LWORD_TO_LREAL
       
 23424  */
       
 23425     case function_lword_to_lreal :
       
 23426     {
       
 23427         symbol_c *last_type_symbol = NULL;
       
 23428 
       
 23429         {
       
 23430             symbol_c *IN_type_symbol = param_data_type;
       
 23431             last_type_symbol = param_data_type;
       
 23432             
       
 23433             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23434             {
       
 23435         
       
 23436                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23437                 return return_type_symbol;
       
 23438                 
       
 23439             }
       
 23440             
       
 23441             ERROR;
       
 23442         }
       
 23443         
       
 23444     }/*function_lword_to_lreal*/
       
 23445     break;
       
 23446 
       
 23447 /****
       
 23448  *LWORD_TO_TIME
       
 23449  */
       
 23450     case function_lword_to_time :
       
 23451     {
       
 23452         symbol_c *last_type_symbol = NULL;
       
 23453 
       
 23454         {
       
 23455             symbol_c *IN_type_symbol = param_data_type;
       
 23456             last_type_symbol = param_data_type;
       
 23457             
       
 23458             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23459             {
       
 23460         
       
 23461                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23462                 return return_type_symbol;
       
 23463                 
       
 23464             }
       
 23465             
       
 23466             ERROR;
       
 23467         }
       
 23468         
       
 23469     }/*function_lword_to_time*/
       
 23470     break;
       
 23471 
       
 23472 /****
       
 23473  *LWORD_TO_DATE
       
 23474  */
       
 23475     case function_lword_to_date :
       
 23476     {
       
 23477         symbol_c *last_type_symbol = NULL;
       
 23478 
       
 23479         {
       
 23480             symbol_c *IN_type_symbol = param_data_type;
       
 23481             last_type_symbol = param_data_type;
       
 23482             
       
 23483             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23484             {
       
 23485         
       
 23486                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23487                 return return_type_symbol;
       
 23488                 
       
 23489             }
       
 23490             
       
 23491             ERROR;
       
 23492         }
       
 23493         
       
 23494     }/*function_lword_to_date*/
       
 23495     break;
       
 23496 
       
 23497 /****
       
 23498  *LWORD_TO_TOD
       
 23499  */
       
 23500     case function_lword_to_tod :
       
 23501     {
       
 23502         symbol_c *last_type_symbol = NULL;
       
 23503 
       
 23504         {
       
 23505             symbol_c *IN_type_symbol = param_data_type;
       
 23506             last_type_symbol = param_data_type;
       
 23507             
       
 23508             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23509             {
       
 23510         
       
 23511                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23512                 return return_type_symbol;
       
 23513                 
       
 23514             }
       
 23515             
       
 23516             ERROR;
       
 23517         }
       
 23518         
       
 23519     }/*function_lword_to_tod*/
       
 23520     break;
       
 23521 
       
 23522 /****
       
 23523  *LWORD_TO_DT
       
 23524  */
       
 23525     case function_lword_to_dt :
       
 23526     {
       
 23527         symbol_c *last_type_symbol = NULL;
       
 23528 
       
 23529         {
       
 23530             symbol_c *IN_type_symbol = param_data_type;
       
 23531             last_type_symbol = param_data_type;
       
 23532             
       
 23533             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23534             {
       
 23535         
       
 23536                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23537                 return return_type_symbol;
       
 23538                 
       
 23539             }
       
 23540             
       
 23541             ERROR;
       
 23542         }
       
 23543         
       
 23544     }/*function_lword_to_dt*/
       
 23545     break;
       
 23546 
       
 23547 /****
       
 23548  *LWORD_TO_STRING
       
 23549  */
       
 23550     case function_lword_to_string :
       
 23551     {
       
 23552         symbol_c *last_type_symbol = NULL;
       
 23553 
       
 23554         {
       
 23555             symbol_c *IN_type_symbol = param_data_type;
       
 23556             last_type_symbol = param_data_type;
       
 23557             
       
 23558             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23559             {
       
 23560         
       
 23561                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23562                 return return_type_symbol;
       
 23563                 
       
 23564             }
       
 23565             
       
 23566             ERROR;
       
 23567         }
       
 23568         
       
 23569     }/*function_lword_to_string*/
       
 23570     break;
       
 23571 
       
 23572 /****
       
 23573  *LWORD_TO_BYTE
       
 23574  */
       
 23575     case function_lword_to_byte :
       
 23576     {
       
 23577         symbol_c *last_type_symbol = NULL;
       
 23578 
       
 23579         {
       
 23580             symbol_c *IN_type_symbol = param_data_type;
       
 23581             last_type_symbol = param_data_type;
       
 23582             
       
 23583             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23584             {
       
 23585         
       
 23586                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23587                 return return_type_symbol;
       
 23588                 
       
 23589             }
       
 23590             
       
 23591             ERROR;
       
 23592         }
       
 23593         
       
 23594     }/*function_lword_to_byte*/
       
 23595     break;
       
 23596 
       
 23597 /****
       
 23598  *LWORD_TO_WORD
       
 23599  */
       
 23600     case function_lword_to_word :
       
 23601     {
       
 23602         symbol_c *last_type_symbol = NULL;
       
 23603 
       
 23604         {
       
 23605             symbol_c *IN_type_symbol = param_data_type;
       
 23606             last_type_symbol = param_data_type;
       
 23607             
       
 23608             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
       
 23609             {
       
 23610         
       
 23611                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23612                 return return_type_symbol;
       
 23613                 
       
 23614             }
       
 23615             
       
 23616             ERROR;
       
 23617         }
       
 23618         
       
 23619     }/*function_lword_to_word*/
       
 23620     break;
       
 23621 
       
 23622 /****
       
 23623  *LWORD_TO_DWORD
       
 23624  */
       
 23625     case function_lword_to_dword :
       
 23626     {
       
 23627         symbol_c *last_type_symbol = NULL;
       
 23628 
       
 23629         {
       
 23630             symbol_c *IN_type_symbol = param_data_type;
       
 23631             last_type_symbol = param_data_type;
       
 23632             
       
 23633             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
 20262             {
 23634             {
 20263         
 23635         
 20264                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 23636                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
 20265                 return return_type_symbol;
 23637                 return return_type_symbol;
 20266                 
 23638                 
 20267             }
 23639             }
 20268             
 23640             
 20269             ERROR;
 23641             ERROR;
 20270         }
 23642         }
 20271         
 23643         
 20272     }/*function_time_to_dword*/
 23644     }/*function_lword_to_dword*/
 20273     break;
 23645     break;
 20274 
 23646 
 20275 /****
 23647 /****
 20276  *TIME_TO_LWORD
 23648  *TRUNC
 20277  */
 23649  */
 20278     case function_time_to_lword :
 23650     case function_trunc :
 20279     {
 23651     {
 20280         symbol_c *last_type_symbol = NULL;
 23652         symbol_c *last_type_symbol = NULL;
 20281 
 23653 
 20282         {
 23654         {
 20283             symbol_c *IN_type_symbol = param_data_type;
 23655             symbol_c *IN_type_symbol = param_data_type;
 20284             last_type_symbol = param_data_type;
 23656             last_type_symbol = param_data_type;
 20285             
 23657             
 20286             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 23658             if(search_expression_type->is_real_type(IN_type_symbol))
 20287             {
 23659             {
 20288         
 23660         
 20289                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
 23661                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 20290                 return return_type_symbol;
 23662                 return return_type_symbol;
 20291                 
 23663                 
 20292             }
 23664             }
 20293             
 23665             
 20294             ERROR;
 23666             ERROR;
 20295         }
 23667         }
 20296         
 23668         
 20297     }/*function_time_to_lword*/
 23669     }/*function_trunc*/
 20298     break;
 23670     break;
 20299 
 23671 
 20300 /****
 23672 /****
 20301  *DATE_TO_BOOL
 23673  *BCD_TO_USINT
 20302  */
 23674  */
 20303     case function_date_to_bool :
 23675     case function_bcd_to_usint :
 20304     {
 23676     {
 20305         symbol_c *last_type_symbol = NULL;
 23677         symbol_c *last_type_symbol = NULL;
 20306 
 23678 
 20307         {
 23679         {
 20308             symbol_c *IN_type_symbol = param_data_type;
 23680             symbol_c *IN_type_symbol = param_data_type;
 20309             last_type_symbol = param_data_type;
 23681             last_type_symbol = param_data_type;
 20310             
 23682             
 20311             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 23683             if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol))
 20312             {
       
 20313         
       
 20314                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 20315                 return return_type_symbol;
       
 20316                 
       
 20317             }
       
 20318             
       
 20319             ERROR;
       
 20320         }
       
 20321         
       
 20322     }/*function_date_to_bool*/
       
 20323     break;
       
 20324 
       
 20325 /****
       
 20326  *DATE_TO_SINT
       
 20327  */
       
 20328     case function_date_to_sint :
       
 20329     {
       
 20330         symbol_c *last_type_symbol = NULL;
       
 20331 
       
 20332         {
       
 20333             symbol_c *IN_type_symbol = param_data_type;
       
 20334             last_type_symbol = param_data_type;
       
 20335             
       
 20336             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 20337             {
       
 20338         
       
 20339                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20340                 return return_type_symbol;
       
 20341                 
       
 20342             }
       
 20343             
       
 20344             ERROR;
       
 20345         }
       
 20346         
       
 20347     }/*function_date_to_sint*/
       
 20348     break;
       
 20349 
       
 20350 /****
       
 20351  *DATE_TO_INT
       
 20352  */
       
 20353     case function_date_to_int :
       
 20354     {
       
 20355         symbol_c *last_type_symbol = NULL;
       
 20356 
       
 20357         {
       
 20358             symbol_c *IN_type_symbol = param_data_type;
       
 20359             last_type_symbol = param_data_type;
       
 20360             
       
 20361             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 20362             {
       
 20363         
       
 20364                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20365                 return return_type_symbol;
       
 20366                 
       
 20367             }
       
 20368             
       
 20369             ERROR;
       
 20370         }
       
 20371         
       
 20372     }/*function_date_to_int*/
       
 20373     break;
       
 20374 
       
 20375 /****
       
 20376  *DATE_TO_DINT
       
 20377  */
       
 20378     case function_date_to_dint :
       
 20379     {
       
 20380         symbol_c *last_type_symbol = NULL;
       
 20381 
       
 20382         {
       
 20383             symbol_c *IN_type_symbol = param_data_type;
       
 20384             last_type_symbol = param_data_type;
       
 20385             
       
 20386             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 20387             {
       
 20388         
       
 20389                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20390                 return return_type_symbol;
       
 20391                 
       
 20392             }
       
 20393             
       
 20394             ERROR;
       
 20395         }
       
 20396         
       
 20397     }/*function_date_to_dint*/
       
 20398     break;
       
 20399 
       
 20400 /****
       
 20401  *DATE_TO_LINT
       
 20402  */
       
 20403     case function_date_to_lint :
       
 20404     {
       
 20405         symbol_c *last_type_symbol = NULL;
       
 20406 
       
 20407         {
       
 20408             symbol_c *IN_type_symbol = param_data_type;
       
 20409             last_type_symbol = param_data_type;
       
 20410             
       
 20411             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 20412             {
       
 20413         
       
 20414                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20415                 return return_type_symbol;
       
 20416                 
       
 20417             }
       
 20418             
       
 20419             ERROR;
       
 20420         }
       
 20421         
       
 20422     }/*function_date_to_lint*/
       
 20423     break;
       
 20424 
       
 20425 /****
       
 20426  *DATE_TO_USINT
       
 20427  */
       
 20428     case function_date_to_usint :
       
 20429     {
       
 20430         symbol_c *last_type_symbol = NULL;
       
 20431 
       
 20432         {
       
 20433             symbol_c *IN_type_symbol = param_data_type;
       
 20434             last_type_symbol = param_data_type;
       
 20435             
       
 20436             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 20437             {
 23684             {
 20438         
 23685         
 20439                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 23686                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
 20440                 return return_type_symbol;
 23687                 return return_type_symbol;
 20441                 
 23688                 
 20442             }
 23689             }
 20443             
 23690             
 20444             ERROR;
 23691             ERROR;
 20445         }
 23692         }
 20446         
 23693         
 20447     }/*function_date_to_usint*/
 23694     }/*function_bcd_to_usint*/
 20448     break;
 23695     break;
 20449 
 23696 
 20450 /****
 23697 /****
 20451  *DATE_TO_UINT
 23698  *BCD_TO_UINT
 20452  */
 23699  */
 20453     case function_date_to_uint :
 23700     case function_bcd_to_uint :
 20454     {
 23701     {
 20455         symbol_c *last_type_symbol = NULL;
 23702         symbol_c *last_type_symbol = NULL;
 20456 
 23703 
 20457         {
 23704         {
 20458             symbol_c *IN_type_symbol = param_data_type;
 23705             symbol_c *IN_type_symbol = param_data_type;
 20459             last_type_symbol = param_data_type;
 23706             last_type_symbol = param_data_type;
 20460             
 23707             
 20461             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 23708             if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol))
 20462             {
 23709             {
 20463         
 23710         
 20464                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 23711                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
 20465                 return return_type_symbol;
 23712                 return return_type_symbol;
 20466                 
 23713                 
 20467             }
 23714             }
 20468             
 23715             
 20469             ERROR;
 23716             ERROR;
 20470         }
 23717         }
 20471         
 23718         
 20472     }/*function_date_to_uint*/
 23719     }/*function_bcd_to_uint*/
 20473     break;
 23720     break;
 20474 
 23721 
 20475 /****
 23722 /****
 20476  *DATE_TO_UDINT
 23723  *BCD_TO_UDINT
 20477  */
 23724  */
 20478     case function_date_to_udint :
 23725     case function_bcd_to_udint :
 20479     {
 23726     {
 20480         symbol_c *last_type_symbol = NULL;
 23727         symbol_c *last_type_symbol = NULL;
 20481 
 23728 
 20482         {
 23729         {
 20483             symbol_c *IN_type_symbol = param_data_type;
 23730             symbol_c *IN_type_symbol = param_data_type;
 20484             last_type_symbol = param_data_type;
 23731             last_type_symbol = param_data_type;
 20485             
 23732             
 20486             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 23733             if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol))
 20487             {
 23734             {
 20488         
 23735         
 20489                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 23736                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
 20490                 return return_type_symbol;
 23737                 return return_type_symbol;
 20491                 
 23738                 
 20492             }
 23739             }
 20493             
 23740             
 20494             ERROR;
 23741             ERROR;
 20495         }
 23742         }
 20496         
 23743         
 20497     }/*function_date_to_udint*/
 23744     }/*function_bcd_to_udint*/
 20498     break;
 23745     break;
 20499 
 23746 
 20500 /****
 23747 /****
 20501  *DATE_TO_ULINT
 23748  *BCD_TO_ULINT
 20502  */
 23749  */
 20503     case function_date_to_ulint :
 23750     case function_bcd_to_ulint :
 20504     {
 23751     {
 20505         symbol_c *last_type_symbol = NULL;
 23752         symbol_c *last_type_symbol = NULL;
 20506 
 23753 
 20507         {
 23754         {
 20508             symbol_c *IN_type_symbol = param_data_type;
 23755             symbol_c *IN_type_symbol = param_data_type;
 20509             last_type_symbol = param_data_type;
 23756             last_type_symbol = param_data_type;
 20510             
 23757             
 20511             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 23758             if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol))
 20512             {
 23759             {
 20513         
 23760         
 20514                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 23761                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
 20515                 return return_type_symbol;
 23762                 return return_type_symbol;
 20516                 
 23763                 
 20517             }
 23764             }
 20518             
 23765             
 20519             ERROR;
 23766             ERROR;
 20520         }
 23767         }
 20521         
 23768         
 20522     }/*function_date_to_ulint*/
 23769     }/*function_bcd_to_ulint*/
 20523     break;
 23770     break;
 20524 
 23771 
 20525 /****
 23772 /****
 20526  *DATE_TO_REAL
 23773  *USINT_TO_BCD
 20527  */
 23774  */
 20528     case function_date_to_real :
 23775     case function_usint_to_bcd :
 20529     {
 23776     {
 20530         symbol_c *last_type_symbol = NULL;
 23777         symbol_c *last_type_symbol = NULL;
 20531 
 23778 
 20532         {
 23779         {
 20533             symbol_c *IN_type_symbol = param_data_type;
 23780             symbol_c *IN_type_symbol = param_data_type;
 20534             last_type_symbol = param_data_type;
 23781             last_type_symbol = param_data_type;
 20535             
 23782             
 20536             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 23783             if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol))
 20537             {
 23784             {
 20538         
 23785         
 20539                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
 23786                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 20540                 return return_type_symbol;
 23787                 return return_type_symbol;
 20541                 
 23788                 
 20542             }
 23789             }
 20543             
 23790             
 20544             ERROR;
 23791             ERROR;
 20545         }
 23792         }
 20546         
 23793         
 20547     }/*function_date_to_real*/
 23794     }/*function_usint_to_bcd*/
 20548     break;
 23795     break;
 20549 
 23796 
 20550 /****
 23797 /****
 20551  *DATE_TO_LREAL
 23798  *UINT_TO_BCD
 20552  */
 23799  */
 20553     case function_date_to_lreal :
 23800     case function_uint_to_bcd :
 20554     {
 23801     {
 20555         symbol_c *last_type_symbol = NULL;
 23802         symbol_c *last_type_symbol = NULL;
 20556 
 23803 
 20557         {
 23804         {
 20558             symbol_c *IN_type_symbol = param_data_type;
 23805             symbol_c *IN_type_symbol = param_data_type;
 20559             last_type_symbol = param_data_type;
 23806             last_type_symbol = param_data_type;
 20560             
 23807             
 20561             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 23808             if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol))
 20562             {
 23809             {
 20563         
 23810         
 20564                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
 23811                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 20565                 return return_type_symbol;
 23812                 return return_type_symbol;
 20566                 
 23813                 
 20567             }
 23814             }
 20568             
 23815             
 20569             ERROR;
 23816             ERROR;
 20570         }
 23817         }
 20571         
 23818         
 20572     }/*function_date_to_lreal*/
 23819     }/*function_uint_to_bcd*/
 20573     break;
 23820     break;
 20574 
 23821 
 20575 /****
 23822 /****
 20576  *DATE_TO_STRING
 23823  *UDINT_TO_BCD
 20577  */
 23824  */
 20578     case function_date_to_string :
 23825     case function_udint_to_bcd :
 20579     {
 23826     {
 20580         symbol_c *last_type_symbol = NULL;
 23827         symbol_c *last_type_symbol = NULL;
 20581 
 23828 
 20582         {
 23829         {
 20583             symbol_c *IN_type_symbol = param_data_type;
 23830             symbol_c *IN_type_symbol = param_data_type;
 20584             last_type_symbol = param_data_type;
 23831             last_type_symbol = param_data_type;
 20585             
 23832             
 20586             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 23833             if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol))
 20587             {
 23834             {
 20588         
 23835         
 20589                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 23836                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 20590                 return return_type_symbol;
 23837                 return return_type_symbol;
 20591                 
 23838                 
 20592             }
 23839             }
 20593             
 23840             
 20594             ERROR;
 23841             ERROR;
 20595         }
 23842         }
 20596         
 23843         
 20597     }/*function_date_to_string*/
 23844     }/*function_udint_to_bcd*/
 20598     break;
 23845     break;
 20599 
 23846 
 20600 /****
 23847 /****
 20601  *DATE_TO_BYTE
 23848  *ULINT_TO_BCD
 20602  */
 23849  */
 20603     case function_date_to_byte :
 23850     case function_ulint_to_bcd :
 20604     {
 23851     {
 20605         symbol_c *last_type_symbol = NULL;
 23852         symbol_c *last_type_symbol = NULL;
 20606 
 23853 
 20607         {
 23854         {
 20608             symbol_c *IN_type_symbol = param_data_type;
 23855             symbol_c *IN_type_symbol = param_data_type;
 20609             last_type_symbol = param_data_type;
 23856             last_type_symbol = param_data_type;
 20610             
 23857             
 20611             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 23858             if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol))
 20612             {
 23859             {
 20613         
 23860         
 20614                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
 23861                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
 20615                 return return_type_symbol;
 23862                 return return_type_symbol;
 20616                 
 23863                 
 20617             }
 23864             }
 20618             
 23865             
 20619             ERROR;
 23866             ERROR;
 20620         }
 23867         }
 20621         
 23868         
 20622     }/*function_date_to_byte*/
 23869     }/*function_ulint_to_bcd*/
 20623     break;
 23870     break;
 20624 
 23871 
 20625 /****
 23872 /****
 20626  *DATE_TO_WORD
 23873  *DATE_AND_TIME_TO_TIME_OF_DAY
 20627  */
 23874  */
 20628     case function_date_to_word :
 23875     case function_date_and_time_to_time_of_day :
 20629     {
 23876     {
 20630         symbol_c *last_type_symbol = NULL;
 23877         symbol_c *last_type_symbol = NULL;
 20631 
 23878 
 20632         {
 23879         {
 20633             symbol_c *IN_type_symbol = param_data_type;
 23880             symbol_c *IN_type_symbol = param_data_type;
 20634             last_type_symbol = param_data_type;
 23881             last_type_symbol = param_data_type;
 20635             
 23882             
 20636             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 23883             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 20637             {
       
 20638         
       
 20639                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 20640                 return return_type_symbol;
       
 20641                 
       
 20642             }
       
 20643             
       
 20644             ERROR;
       
 20645         }
       
 20646         
       
 20647     }/*function_date_to_word*/
       
 20648     break;
       
 20649 
       
 20650 /****
       
 20651  *DATE_TO_DWORD
       
 20652  */
       
 20653     case function_date_to_dword :
       
 20654     {
       
 20655         symbol_c *last_type_symbol = NULL;
       
 20656 
       
 20657         {
       
 20658             symbol_c *IN_type_symbol = param_data_type;
       
 20659             last_type_symbol = param_data_type;
       
 20660             
       
 20661             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 20662             {
       
 20663         
       
 20664                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 20665                 return return_type_symbol;
       
 20666                 
       
 20667             }
       
 20668             
       
 20669             ERROR;
       
 20670         }
       
 20671         
       
 20672     }/*function_date_to_dword*/
       
 20673     break;
       
 20674 
       
 20675 /****
       
 20676  *DATE_TO_LWORD
       
 20677  */
       
 20678     case function_date_to_lword :
       
 20679     {
       
 20680         symbol_c *last_type_symbol = NULL;
       
 20681 
       
 20682         {
       
 20683             symbol_c *IN_type_symbol = param_data_type;
       
 20684             last_type_symbol = param_data_type;
       
 20685             
       
 20686             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
       
 20687             {
       
 20688         
       
 20689                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 20690                 return return_type_symbol;
       
 20691                 
       
 20692             }
       
 20693             
       
 20694             ERROR;
       
 20695         }
       
 20696         
       
 20697     }/*function_date_to_lword*/
       
 20698     break;
       
 20699 
       
 20700 /****
       
 20701  *TOD_TO_BOOL
       
 20702  */
       
 20703     case function_tod_to_bool :
       
 20704     {
       
 20705         symbol_c *last_type_symbol = NULL;
       
 20706 
       
 20707         {
       
 20708             symbol_c *IN_type_symbol = param_data_type;
       
 20709             last_type_symbol = param_data_type;
       
 20710             
       
 20711             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20712             {
       
 20713         
       
 20714                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 20715                 return return_type_symbol;
       
 20716                 
       
 20717             }
       
 20718             
       
 20719             ERROR;
       
 20720         }
       
 20721         
       
 20722     }/*function_tod_to_bool*/
       
 20723     break;
       
 20724 
       
 20725 /****
       
 20726  *TOD_TO_SINT
       
 20727  */
       
 20728     case function_tod_to_sint :
       
 20729     {
       
 20730         symbol_c *last_type_symbol = NULL;
       
 20731 
       
 20732         {
       
 20733             symbol_c *IN_type_symbol = param_data_type;
       
 20734             last_type_symbol = param_data_type;
       
 20735             
       
 20736             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20737             {
       
 20738         
       
 20739                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 20740                 return return_type_symbol;
       
 20741                 
       
 20742             }
       
 20743             
       
 20744             ERROR;
       
 20745         }
       
 20746         
       
 20747     }/*function_tod_to_sint*/
       
 20748     break;
       
 20749 
       
 20750 /****
       
 20751  *TOD_TO_INT
       
 20752  */
       
 20753     case function_tod_to_int :
       
 20754     {
       
 20755         symbol_c *last_type_symbol = NULL;
       
 20756 
       
 20757         {
       
 20758             symbol_c *IN_type_symbol = param_data_type;
       
 20759             last_type_symbol = param_data_type;
       
 20760             
       
 20761             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20762             {
       
 20763         
       
 20764                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 20765                 return return_type_symbol;
       
 20766                 
       
 20767             }
       
 20768             
       
 20769             ERROR;
       
 20770         }
       
 20771         
       
 20772     }/*function_tod_to_int*/
       
 20773     break;
       
 20774 
       
 20775 /****
       
 20776  *TOD_TO_DINT
       
 20777  */
       
 20778     case function_tod_to_dint :
       
 20779     {
       
 20780         symbol_c *last_type_symbol = NULL;
       
 20781 
       
 20782         {
       
 20783             symbol_c *IN_type_symbol = param_data_type;
       
 20784             last_type_symbol = param_data_type;
       
 20785             
       
 20786             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20787             {
       
 20788         
       
 20789                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 20790                 return return_type_symbol;
       
 20791                 
       
 20792             }
       
 20793             
       
 20794             ERROR;
       
 20795         }
       
 20796         
       
 20797     }/*function_tod_to_dint*/
       
 20798     break;
       
 20799 
       
 20800 /****
       
 20801  *TOD_TO_LINT
       
 20802  */
       
 20803     case function_tod_to_lint :
       
 20804     {
       
 20805         symbol_c *last_type_symbol = NULL;
       
 20806 
       
 20807         {
       
 20808             symbol_c *IN_type_symbol = param_data_type;
       
 20809             last_type_symbol = param_data_type;
       
 20810             
       
 20811             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20812             {
       
 20813         
       
 20814                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 20815                 return return_type_symbol;
       
 20816                 
       
 20817             }
       
 20818             
       
 20819             ERROR;
       
 20820         }
       
 20821         
       
 20822     }/*function_tod_to_lint*/
       
 20823     break;
       
 20824 
       
 20825 /****
       
 20826  *TOD_TO_USINT
       
 20827  */
       
 20828     case function_tod_to_usint :
       
 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 (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20837             {
       
 20838         
       
 20839                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 20840                 return return_type_symbol;
       
 20841                 
       
 20842             }
       
 20843             
       
 20844             ERROR;
       
 20845         }
       
 20846         
       
 20847     }/*function_tod_to_usint*/
       
 20848     break;
       
 20849 
       
 20850 /****
       
 20851  *TOD_TO_UINT
       
 20852  */
       
 20853     case function_tod_to_uint :
       
 20854     {
       
 20855         symbol_c *last_type_symbol = NULL;
       
 20856 
       
 20857         {
       
 20858             symbol_c *IN_type_symbol = param_data_type;
       
 20859             last_type_symbol = param_data_type;
       
 20860             
       
 20861             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20862             {
       
 20863         
       
 20864                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 20865                 return return_type_symbol;
       
 20866                 
       
 20867             }
       
 20868             
       
 20869             ERROR;
       
 20870         }
       
 20871         
       
 20872     }/*function_tod_to_uint*/
       
 20873     break;
       
 20874 
       
 20875 /****
       
 20876  *TOD_TO_UDINT
       
 20877  */
       
 20878     case function_tod_to_udint :
       
 20879     {
       
 20880         symbol_c *last_type_symbol = NULL;
       
 20881 
       
 20882         {
       
 20883             symbol_c *IN_type_symbol = param_data_type;
       
 20884             last_type_symbol = param_data_type;
       
 20885             
       
 20886             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20887             {
       
 20888         
       
 20889                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 20890                 return return_type_symbol;
       
 20891                 
       
 20892             }
       
 20893             
       
 20894             ERROR;
       
 20895         }
       
 20896         
       
 20897     }/*function_tod_to_udint*/
       
 20898     break;
       
 20899 
       
 20900 /****
       
 20901  *TOD_TO_ULINT
       
 20902  */
       
 20903     case function_tod_to_ulint :
       
 20904     {
       
 20905         symbol_c *last_type_symbol = NULL;
       
 20906 
       
 20907         {
       
 20908             symbol_c *IN_type_symbol = param_data_type;
       
 20909             last_type_symbol = param_data_type;
       
 20910             
       
 20911             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20912             {
       
 20913         
       
 20914                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 20915                 return return_type_symbol;
       
 20916                 
       
 20917             }
       
 20918             
       
 20919             ERROR;
       
 20920         }
       
 20921         
       
 20922     }/*function_tod_to_ulint*/
       
 20923     break;
       
 20924 
       
 20925 /****
       
 20926  *TOD_TO_REAL
       
 20927  */
       
 20928     case function_tod_to_real :
       
 20929     {
       
 20930         symbol_c *last_type_symbol = NULL;
       
 20931 
       
 20932         {
       
 20933             symbol_c *IN_type_symbol = param_data_type;
       
 20934             last_type_symbol = param_data_type;
       
 20935             
       
 20936             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20937             {
       
 20938         
       
 20939                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 20940                 return return_type_symbol;
       
 20941                 
       
 20942             }
       
 20943             
       
 20944             ERROR;
       
 20945         }
       
 20946         
       
 20947     }/*function_tod_to_real*/
       
 20948     break;
       
 20949 
       
 20950 /****
       
 20951  *TOD_TO_LREAL
       
 20952  */
       
 20953     case function_tod_to_lreal :
       
 20954     {
       
 20955         symbol_c *last_type_symbol = NULL;
       
 20956 
       
 20957         {
       
 20958             symbol_c *IN_type_symbol = param_data_type;
       
 20959             last_type_symbol = param_data_type;
       
 20960             
       
 20961             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20962             {
       
 20963         
       
 20964                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 20965                 return return_type_symbol;
       
 20966                 
       
 20967             }
       
 20968             
       
 20969             ERROR;
       
 20970         }
       
 20971         
       
 20972     }/*function_tod_to_lreal*/
       
 20973     break;
       
 20974 
       
 20975 /****
       
 20976  *TOD_TO_STRING
       
 20977  */
       
 20978     case function_tod_to_string :
       
 20979     {
       
 20980         symbol_c *last_type_symbol = NULL;
       
 20981 
       
 20982         {
       
 20983             symbol_c *IN_type_symbol = param_data_type;
       
 20984             last_type_symbol = param_data_type;
       
 20985             
       
 20986             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 20987             {
       
 20988         
       
 20989                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 20990                 return return_type_symbol;
       
 20991                 
       
 20992             }
       
 20993             
       
 20994             ERROR;
       
 20995         }
       
 20996         
       
 20997     }/*function_tod_to_string*/
       
 20998     break;
       
 20999 
       
 21000 /****
       
 21001  *TOD_TO_BYTE
       
 21002  */
       
 21003     case function_tod_to_byte :
       
 21004     {
       
 21005         symbol_c *last_type_symbol = NULL;
       
 21006 
       
 21007         {
       
 21008             symbol_c *IN_type_symbol = param_data_type;
       
 21009             last_type_symbol = param_data_type;
       
 21010             
       
 21011             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 21012             {
       
 21013         
       
 21014                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21015                 return return_type_symbol;
       
 21016                 
       
 21017             }
       
 21018             
       
 21019             ERROR;
       
 21020         }
       
 21021         
       
 21022     }/*function_tod_to_byte*/
       
 21023     break;
       
 21024 
       
 21025 /****
       
 21026  *TOD_TO_WORD
       
 21027  */
       
 21028     case function_tod_to_word :
       
 21029     {
       
 21030         symbol_c *last_type_symbol = NULL;
       
 21031 
       
 21032         {
       
 21033             symbol_c *IN_type_symbol = param_data_type;
       
 21034             last_type_symbol = param_data_type;
       
 21035             
       
 21036             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 21037             {
       
 21038         
       
 21039                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21040                 return return_type_symbol;
       
 21041                 
       
 21042             }
       
 21043             
       
 21044             ERROR;
       
 21045         }
       
 21046         
       
 21047     }/*function_tod_to_word*/
       
 21048     break;
       
 21049 
       
 21050 /****
       
 21051  *TOD_TO_DWORD
       
 21052  */
       
 21053     case function_tod_to_dword :
       
 21054     {
       
 21055         symbol_c *last_type_symbol = NULL;
       
 21056 
       
 21057         {
       
 21058             symbol_c *IN_type_symbol = param_data_type;
       
 21059             last_type_symbol = param_data_type;
       
 21060             
       
 21061             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 21062             {
       
 21063         
       
 21064                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21065                 return return_type_symbol;
       
 21066                 
       
 21067             }
       
 21068             
       
 21069             ERROR;
       
 21070         }
       
 21071         
       
 21072     }/*function_tod_to_dword*/
       
 21073     break;
       
 21074 
       
 21075 /****
       
 21076  *TOD_TO_LWORD
       
 21077  */
       
 21078     case function_tod_to_lword :
       
 21079     {
       
 21080         symbol_c *last_type_symbol = NULL;
       
 21081 
       
 21082         {
       
 21083             symbol_c *IN_type_symbol = param_data_type;
       
 21084             last_type_symbol = param_data_type;
       
 21085             
       
 21086             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
       
 21087             {
       
 21088         
       
 21089                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21090                 return return_type_symbol;
       
 21091                 
       
 21092             }
       
 21093             
       
 21094             ERROR;
       
 21095         }
       
 21096         
       
 21097     }/*function_tod_to_lword*/
       
 21098     break;
       
 21099 
       
 21100 /****
       
 21101  *DT_TO_BOOL
       
 21102  */
       
 21103     case function_dt_to_bool :
       
 21104     {
       
 21105         symbol_c *last_type_symbol = NULL;
       
 21106 
       
 21107         {
       
 21108             symbol_c *IN_type_symbol = param_data_type;
       
 21109             last_type_symbol = param_data_type;
       
 21110             
       
 21111             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21112             {
       
 21113         
       
 21114                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21115                 return return_type_symbol;
       
 21116                 
       
 21117             }
       
 21118             
       
 21119             ERROR;
       
 21120         }
       
 21121         
       
 21122     }/*function_dt_to_bool*/
       
 21123     break;
       
 21124 
       
 21125 /****
       
 21126  *DT_TO_SINT
       
 21127  */
       
 21128     case function_dt_to_sint :
       
 21129     {
       
 21130         symbol_c *last_type_symbol = NULL;
       
 21131 
       
 21132         {
       
 21133             symbol_c *IN_type_symbol = param_data_type;
       
 21134             last_type_symbol = param_data_type;
       
 21135             
       
 21136             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21137             {
       
 21138         
       
 21139                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21140                 return return_type_symbol;
       
 21141                 
       
 21142             }
       
 21143             
       
 21144             ERROR;
       
 21145         }
       
 21146         
       
 21147     }/*function_dt_to_sint*/
       
 21148     break;
       
 21149 
       
 21150 /****
       
 21151  *DT_TO_INT
       
 21152  */
       
 21153     case function_dt_to_int :
       
 21154     {
       
 21155         symbol_c *last_type_symbol = NULL;
       
 21156 
       
 21157         {
       
 21158             symbol_c *IN_type_symbol = param_data_type;
       
 21159             last_type_symbol = param_data_type;
       
 21160             
       
 21161             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21162             {
       
 21163         
       
 21164                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21165                 return return_type_symbol;
       
 21166                 
       
 21167             }
       
 21168             
       
 21169             ERROR;
       
 21170         }
       
 21171         
       
 21172     }/*function_dt_to_int*/
       
 21173     break;
       
 21174 
       
 21175 /****
       
 21176  *DT_TO_DINT
       
 21177  */
       
 21178     case function_dt_to_dint :
       
 21179     {
       
 21180         symbol_c *last_type_symbol = NULL;
       
 21181 
       
 21182         {
       
 21183             symbol_c *IN_type_symbol = param_data_type;
       
 21184             last_type_symbol = param_data_type;
       
 21185             
       
 21186             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21187             {
       
 21188         
       
 21189                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21190                 return return_type_symbol;
       
 21191                 
       
 21192             }
       
 21193             
       
 21194             ERROR;
       
 21195         }
       
 21196         
       
 21197     }/*function_dt_to_dint*/
       
 21198     break;
       
 21199 
       
 21200 /****
       
 21201  *DT_TO_LINT
       
 21202  */
       
 21203     case function_dt_to_lint :
       
 21204     {
       
 21205         symbol_c *last_type_symbol = NULL;
       
 21206 
       
 21207         {
       
 21208             symbol_c *IN_type_symbol = param_data_type;
       
 21209             last_type_symbol = param_data_type;
       
 21210             
       
 21211             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21212             {
       
 21213         
       
 21214                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21215                 return return_type_symbol;
       
 21216                 
       
 21217             }
       
 21218             
       
 21219             ERROR;
       
 21220         }
       
 21221         
       
 21222     }/*function_dt_to_lint*/
       
 21223     break;
       
 21224 
       
 21225 /****
       
 21226  *DT_TO_USINT
       
 21227  */
       
 21228     case function_dt_to_usint :
       
 21229     {
       
 21230         symbol_c *last_type_symbol = NULL;
       
 21231 
       
 21232         {
       
 21233             symbol_c *IN_type_symbol = param_data_type;
       
 21234             last_type_symbol = param_data_type;
       
 21235             
       
 21236             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21237             {
       
 21238         
       
 21239                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21240                 return return_type_symbol;
       
 21241                 
       
 21242             }
       
 21243             
       
 21244             ERROR;
       
 21245         }
       
 21246         
       
 21247     }/*function_dt_to_usint*/
       
 21248     break;
       
 21249 
       
 21250 /****
       
 21251  *DT_TO_UINT
       
 21252  */
       
 21253     case function_dt_to_uint :
       
 21254     {
       
 21255         symbol_c *last_type_symbol = NULL;
       
 21256 
       
 21257         {
       
 21258             symbol_c *IN_type_symbol = param_data_type;
       
 21259             last_type_symbol = param_data_type;
       
 21260             
       
 21261             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21262             {
       
 21263         
       
 21264                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21265                 return return_type_symbol;
       
 21266                 
       
 21267             }
       
 21268             
       
 21269             ERROR;
       
 21270         }
       
 21271         
       
 21272     }/*function_dt_to_uint*/
       
 21273     break;
       
 21274 
       
 21275 /****
       
 21276  *DT_TO_UDINT
       
 21277  */
       
 21278     case function_dt_to_udint :
       
 21279     {
       
 21280         symbol_c *last_type_symbol = NULL;
       
 21281 
       
 21282         {
       
 21283             symbol_c *IN_type_symbol = param_data_type;
       
 21284             last_type_symbol = param_data_type;
       
 21285             
       
 21286             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21287             {
       
 21288         
       
 21289                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21290                 return return_type_symbol;
       
 21291                 
       
 21292             }
       
 21293             
       
 21294             ERROR;
       
 21295         }
       
 21296         
       
 21297     }/*function_dt_to_udint*/
       
 21298     break;
       
 21299 
       
 21300 /****
       
 21301  *DT_TO_ULINT
       
 21302  */
       
 21303     case function_dt_to_ulint :
       
 21304     {
       
 21305         symbol_c *last_type_symbol = NULL;
       
 21306 
       
 21307         {
       
 21308             symbol_c *IN_type_symbol = param_data_type;
       
 21309             last_type_symbol = param_data_type;
       
 21310             
       
 21311             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21312             {
       
 21313         
       
 21314                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21315                 return return_type_symbol;
       
 21316                 
       
 21317             }
       
 21318             
       
 21319             ERROR;
       
 21320         }
       
 21321         
       
 21322     }/*function_dt_to_ulint*/
       
 21323     break;
       
 21324 
       
 21325 /****
       
 21326  *DT_TO_REAL
       
 21327  */
       
 21328     case function_dt_to_real :
       
 21329     {
       
 21330         symbol_c *last_type_symbol = NULL;
       
 21331 
       
 21332         {
       
 21333             symbol_c *IN_type_symbol = param_data_type;
       
 21334             last_type_symbol = param_data_type;
       
 21335             
       
 21336             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21337             {
       
 21338         
       
 21339                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21340                 return return_type_symbol;
       
 21341                 
       
 21342             }
       
 21343             
       
 21344             ERROR;
       
 21345         }
       
 21346         
       
 21347     }/*function_dt_to_real*/
       
 21348     break;
       
 21349 
       
 21350 /****
       
 21351  *DT_TO_LREAL
       
 21352  */
       
 21353     case function_dt_to_lreal :
       
 21354     {
       
 21355         symbol_c *last_type_symbol = NULL;
       
 21356 
       
 21357         {
       
 21358             symbol_c *IN_type_symbol = param_data_type;
       
 21359             last_type_symbol = param_data_type;
       
 21360             
       
 21361             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21362             {
       
 21363         
       
 21364                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21365                 return return_type_symbol;
       
 21366                 
       
 21367             }
       
 21368             
       
 21369             ERROR;
       
 21370         }
       
 21371         
       
 21372     }/*function_dt_to_lreal*/
       
 21373     break;
       
 21374 
       
 21375 /****
       
 21376  *DT_TO_STRING
       
 21377  */
       
 21378     case function_dt_to_string :
       
 21379     {
       
 21380         symbol_c *last_type_symbol = NULL;
       
 21381 
       
 21382         {
       
 21383             symbol_c *IN_type_symbol = param_data_type;
       
 21384             last_type_symbol = param_data_type;
       
 21385             
       
 21386             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21387             {
       
 21388         
       
 21389                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 21390                 return return_type_symbol;
       
 21391                 
       
 21392             }
       
 21393             
       
 21394             ERROR;
       
 21395         }
       
 21396         
       
 21397     }/*function_dt_to_string*/
       
 21398     break;
       
 21399 
       
 21400 /****
       
 21401  *DT_TO_BYTE
       
 21402  */
       
 21403     case function_dt_to_byte :
       
 21404     {
       
 21405         symbol_c *last_type_symbol = NULL;
       
 21406 
       
 21407         {
       
 21408             symbol_c *IN_type_symbol = param_data_type;
       
 21409             last_type_symbol = param_data_type;
       
 21410             
       
 21411             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21412             {
       
 21413         
       
 21414                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21415                 return return_type_symbol;
       
 21416                 
       
 21417             }
       
 21418             
       
 21419             ERROR;
       
 21420         }
       
 21421         
       
 21422     }/*function_dt_to_byte*/
       
 21423     break;
       
 21424 
       
 21425 /****
       
 21426  *DT_TO_WORD
       
 21427  */
       
 21428     case function_dt_to_word :
       
 21429     {
       
 21430         symbol_c *last_type_symbol = NULL;
       
 21431 
       
 21432         {
       
 21433             symbol_c *IN_type_symbol = param_data_type;
       
 21434             last_type_symbol = param_data_type;
       
 21435             
       
 21436             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21437             {
       
 21438         
       
 21439                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21440                 return return_type_symbol;
       
 21441                 
       
 21442             }
       
 21443             
       
 21444             ERROR;
       
 21445         }
       
 21446         
       
 21447     }/*function_dt_to_word*/
       
 21448     break;
       
 21449 
       
 21450 /****
       
 21451  *DT_TO_DWORD
       
 21452  */
       
 21453     case function_dt_to_dword :
       
 21454     {
       
 21455         symbol_c *last_type_symbol = NULL;
       
 21456 
       
 21457         {
       
 21458             symbol_c *IN_type_symbol = param_data_type;
       
 21459             last_type_symbol = param_data_type;
       
 21460             
       
 21461             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21462             {
       
 21463         
       
 21464                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21465                 return return_type_symbol;
       
 21466                 
       
 21467             }
       
 21468             
       
 21469             ERROR;
       
 21470         }
       
 21471         
       
 21472     }/*function_dt_to_dword*/
       
 21473     break;
       
 21474 
       
 21475 /****
       
 21476  *DT_TO_LWORD
       
 21477  */
       
 21478     case function_dt_to_lword :
       
 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 (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 21487             {
       
 21488         
       
 21489                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21490                 return return_type_symbol;
       
 21491                 
       
 21492             }
       
 21493             
       
 21494             ERROR;
       
 21495         }
       
 21496         
       
 21497     }/*function_dt_to_lword*/
       
 21498     break;
       
 21499 
       
 21500 /****
       
 21501  *STRING_TO_BOOL
       
 21502  */
       
 21503     case function_string_to_bool :
       
 21504     {
       
 21505         symbol_c *last_type_symbol = NULL;
       
 21506 
       
 21507         {
       
 21508             symbol_c *IN_type_symbol = param_data_type;
       
 21509             last_type_symbol = param_data_type;
       
 21510             
       
 21511             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21512             {
       
 21513         
       
 21514                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21515                 return return_type_symbol;
       
 21516                 
       
 21517             }
       
 21518             
       
 21519             ERROR;
       
 21520         }
       
 21521         
       
 21522     }/*function_string_to_bool*/
       
 21523     break;
       
 21524 
       
 21525 /****
       
 21526  *STRING_TO_SINT
       
 21527  */
       
 21528     case function_string_to_sint :
       
 21529     {
       
 21530         symbol_c *last_type_symbol = NULL;
       
 21531 
       
 21532         {
       
 21533             symbol_c *IN_type_symbol = param_data_type;
       
 21534             last_type_symbol = param_data_type;
       
 21535             
       
 21536             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21537             {
       
 21538         
       
 21539                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 21540                 return return_type_symbol;
       
 21541                 
       
 21542             }
       
 21543             
       
 21544             ERROR;
       
 21545         }
       
 21546         
       
 21547     }/*function_string_to_sint*/
       
 21548     break;
       
 21549 
       
 21550 /****
       
 21551  *STRING_TO_INT
       
 21552  */
       
 21553     case function_string_to_int :
       
 21554     {
       
 21555         symbol_c *last_type_symbol = NULL;
       
 21556 
       
 21557         {
       
 21558             symbol_c *IN_type_symbol = param_data_type;
       
 21559             last_type_symbol = param_data_type;
       
 21560             
       
 21561             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21562             {
       
 21563         
       
 21564                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 21565                 return return_type_symbol;
       
 21566                 
       
 21567             }
       
 21568             
       
 21569             ERROR;
       
 21570         }
       
 21571         
       
 21572     }/*function_string_to_int*/
       
 21573     break;
       
 21574 
       
 21575 /****
       
 21576  *STRING_TO_DINT
       
 21577  */
       
 21578     case function_string_to_dint :
       
 21579     {
       
 21580         symbol_c *last_type_symbol = NULL;
       
 21581 
       
 21582         {
       
 21583             symbol_c *IN_type_symbol = param_data_type;
       
 21584             last_type_symbol = param_data_type;
       
 21585             
       
 21586             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21587             {
       
 21588         
       
 21589                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 21590                 return return_type_symbol;
       
 21591                 
       
 21592             }
       
 21593             
       
 21594             ERROR;
       
 21595         }
       
 21596         
       
 21597     }/*function_string_to_dint*/
       
 21598     break;
       
 21599 
       
 21600 /****
       
 21601  *STRING_TO_LINT
       
 21602  */
       
 21603     case function_string_to_lint :
       
 21604     {
       
 21605         symbol_c *last_type_symbol = NULL;
       
 21606 
       
 21607         {
       
 21608             symbol_c *IN_type_symbol = param_data_type;
       
 21609             last_type_symbol = param_data_type;
       
 21610             
       
 21611             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21612             {
       
 21613         
       
 21614                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 21615                 return return_type_symbol;
       
 21616                 
       
 21617             }
       
 21618             
       
 21619             ERROR;
       
 21620         }
       
 21621         
       
 21622     }/*function_string_to_lint*/
       
 21623     break;
       
 21624 
       
 21625 /****
       
 21626  *STRING_TO_USINT
       
 21627  */
       
 21628     case function_string_to_usint :
       
 21629     {
       
 21630         symbol_c *last_type_symbol = NULL;
       
 21631 
       
 21632         {
       
 21633             symbol_c *IN_type_symbol = param_data_type;
       
 21634             last_type_symbol = param_data_type;
       
 21635             
       
 21636             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21637             {
       
 21638         
       
 21639                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 21640                 return return_type_symbol;
       
 21641                 
       
 21642             }
       
 21643             
       
 21644             ERROR;
       
 21645         }
       
 21646         
       
 21647     }/*function_string_to_usint*/
       
 21648     break;
       
 21649 
       
 21650 /****
       
 21651  *STRING_TO_UINT
       
 21652  */
       
 21653     case function_string_to_uint :
       
 21654     {
       
 21655         symbol_c *last_type_symbol = NULL;
       
 21656 
       
 21657         {
       
 21658             symbol_c *IN_type_symbol = param_data_type;
       
 21659             last_type_symbol = param_data_type;
       
 21660             
       
 21661             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21662             {
       
 21663         
       
 21664                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 21665                 return return_type_symbol;
       
 21666                 
       
 21667             }
       
 21668             
       
 21669             ERROR;
       
 21670         }
       
 21671         
       
 21672     }/*function_string_to_uint*/
       
 21673     break;
       
 21674 
       
 21675 /****
       
 21676  *STRING_TO_UDINT
       
 21677  */
       
 21678     case function_string_to_udint :
       
 21679     {
       
 21680         symbol_c *last_type_symbol = NULL;
       
 21681 
       
 21682         {
       
 21683             symbol_c *IN_type_symbol = param_data_type;
       
 21684             last_type_symbol = param_data_type;
       
 21685             
       
 21686             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21687             {
       
 21688         
       
 21689                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 21690                 return return_type_symbol;
       
 21691                 
       
 21692             }
       
 21693             
       
 21694             ERROR;
       
 21695         }
       
 21696         
       
 21697     }/*function_string_to_udint*/
       
 21698     break;
       
 21699 
       
 21700 /****
       
 21701  *STRING_TO_ULINT
       
 21702  */
       
 21703     case function_string_to_ulint :
       
 21704     {
       
 21705         symbol_c *last_type_symbol = NULL;
       
 21706 
       
 21707         {
       
 21708             symbol_c *IN_type_symbol = param_data_type;
       
 21709             last_type_symbol = param_data_type;
       
 21710             
       
 21711             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21712             {
       
 21713         
       
 21714                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 21715                 return return_type_symbol;
       
 21716                 
       
 21717             }
       
 21718             
       
 21719             ERROR;
       
 21720         }
       
 21721         
       
 21722     }/*function_string_to_ulint*/
       
 21723     break;
       
 21724 
       
 21725 /****
       
 21726  *STRING_TO_REAL
       
 21727  */
       
 21728     case function_string_to_real :
       
 21729     {
       
 21730         symbol_c *last_type_symbol = NULL;
       
 21731 
       
 21732         {
       
 21733             symbol_c *IN_type_symbol = param_data_type;
       
 21734             last_type_symbol = param_data_type;
       
 21735             
       
 21736             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21737             {
       
 21738         
       
 21739                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 21740                 return return_type_symbol;
       
 21741                 
       
 21742             }
       
 21743             
       
 21744             ERROR;
       
 21745         }
       
 21746         
       
 21747     }/*function_string_to_real*/
       
 21748     break;
       
 21749 
       
 21750 /****
       
 21751  *STRING_TO_LREAL
       
 21752  */
       
 21753     case function_string_to_lreal :
       
 21754     {
       
 21755         symbol_c *last_type_symbol = NULL;
       
 21756 
       
 21757         {
       
 21758             symbol_c *IN_type_symbol = param_data_type;
       
 21759             last_type_symbol = param_data_type;
       
 21760             
       
 21761             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21762             {
       
 21763         
       
 21764                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 21765                 return return_type_symbol;
       
 21766                 
       
 21767             }
       
 21768             
       
 21769             ERROR;
       
 21770         }
       
 21771         
       
 21772     }/*function_string_to_lreal*/
       
 21773     break;
       
 21774 
       
 21775 /****
       
 21776  *STRING_TO_TIME
       
 21777  */
       
 21778     case function_string_to_time :
       
 21779     {
       
 21780         symbol_c *last_type_symbol = NULL;
       
 21781 
       
 21782         {
       
 21783             symbol_c *IN_type_symbol = param_data_type;
       
 21784             last_type_symbol = param_data_type;
       
 21785             
       
 21786             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21787             {
       
 21788         
       
 21789                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 21790                 return return_type_symbol;
       
 21791                 
       
 21792             }
       
 21793             
       
 21794             ERROR;
       
 21795         }
       
 21796         
       
 21797     }/*function_string_to_time*/
       
 21798     break;
       
 21799 
       
 21800 /****
       
 21801  *STRING_TO_DATE
       
 21802  */
       
 21803     case function_string_to_date :
       
 21804     {
       
 21805         symbol_c *last_type_symbol = NULL;
       
 21806 
       
 21807         {
       
 21808             symbol_c *IN_type_symbol = param_data_type;
       
 21809             last_type_symbol = param_data_type;
       
 21810             
       
 21811             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21812             {
       
 21813         
       
 21814                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 21815                 return return_type_symbol;
       
 21816                 
       
 21817             }
       
 21818             
       
 21819             ERROR;
       
 21820         }
       
 21821         
       
 21822     }/*function_string_to_date*/
       
 21823     break;
       
 21824 
       
 21825 /****
       
 21826  *STRING_TO_TOD
       
 21827  */
       
 21828     case function_string_to_tod :
       
 21829     {
       
 21830         symbol_c *last_type_symbol = NULL;
       
 21831 
       
 21832         {
       
 21833             symbol_c *IN_type_symbol = param_data_type;
       
 21834             last_type_symbol = param_data_type;
       
 21835             
       
 21836             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21837             {
 23884             {
 21838         
 23885         
 21839                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 23886                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 21840                 return return_type_symbol;
 23887                 return return_type_symbol;
 21841                 
 23888                 
 21842             }
 23889             }
 21843             
 23890             
 21844             ERROR;
 23891             ERROR;
 21845         }
 23892         }
 21846         
 23893         
 21847     }/*function_string_to_tod*/
       
 21848     break;
       
 21849 
       
 21850 /****
       
 21851  *STRING_TO_DT
       
 21852  */
       
 21853     case function_string_to_dt :
       
 21854     {
       
 21855         symbol_c *last_type_symbol = NULL;
       
 21856 
       
 21857         {
       
 21858             symbol_c *IN_type_symbol = param_data_type;
       
 21859             last_type_symbol = param_data_type;
       
 21860             
       
 21861             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21862             {
       
 21863         
       
 21864                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 21865                 return return_type_symbol;
       
 21866                 
       
 21867             }
       
 21868             
       
 21869             ERROR;
       
 21870         }
       
 21871         
       
 21872     }/*function_string_to_dt*/
       
 21873     break;
       
 21874 
       
 21875 /****
       
 21876  *STRING_TO_BYTE
       
 21877  */
       
 21878     case function_string_to_byte :
       
 21879     {
       
 21880         symbol_c *last_type_symbol = NULL;
       
 21881 
       
 21882         {
       
 21883             symbol_c *IN_type_symbol = param_data_type;
       
 21884             last_type_symbol = param_data_type;
       
 21885             
       
 21886             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21887             {
       
 21888         
       
 21889                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 21890                 return return_type_symbol;
       
 21891                 
       
 21892             }
       
 21893             
       
 21894             ERROR;
       
 21895         }
       
 21896         
       
 21897     }/*function_string_to_byte*/
       
 21898     break;
       
 21899 
       
 21900 /****
       
 21901  *STRING_TO_WORD
       
 21902  */
       
 21903     case function_string_to_word :
       
 21904     {
       
 21905         symbol_c *last_type_symbol = NULL;
       
 21906 
       
 21907         {
       
 21908             symbol_c *IN_type_symbol = param_data_type;
       
 21909             last_type_symbol = param_data_type;
       
 21910             
       
 21911             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21912             {
       
 21913         
       
 21914                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 21915                 return return_type_symbol;
       
 21916                 
       
 21917             }
       
 21918             
       
 21919             ERROR;
       
 21920         }
       
 21921         
       
 21922     }/*function_string_to_word*/
       
 21923     break;
       
 21924 
       
 21925 /****
       
 21926  *STRING_TO_DWORD
       
 21927  */
       
 21928     case function_string_to_dword :
       
 21929     {
       
 21930         symbol_c *last_type_symbol = NULL;
       
 21931 
       
 21932         {
       
 21933             symbol_c *IN_type_symbol = param_data_type;
       
 21934             last_type_symbol = param_data_type;
       
 21935             
       
 21936             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21937             {
       
 21938         
       
 21939                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 21940                 return return_type_symbol;
       
 21941                 
       
 21942             }
       
 21943             
       
 21944             ERROR;
       
 21945         }
       
 21946         
       
 21947     }/*function_string_to_dword*/
       
 21948     break;
       
 21949 
       
 21950 /****
       
 21951  *STRING_TO_LWORD
       
 21952  */
       
 21953     case function_string_to_lword :
       
 21954     {
       
 21955         symbol_c *last_type_symbol = NULL;
       
 21956 
       
 21957         {
       
 21958             symbol_c *IN_type_symbol = param_data_type;
       
 21959             last_type_symbol = param_data_type;
       
 21960             
       
 21961             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
       
 21962             {
       
 21963         
       
 21964                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 21965                 return return_type_symbol;
       
 21966                 
       
 21967             }
       
 21968             
       
 21969             ERROR;
       
 21970         }
       
 21971         
       
 21972     }/*function_string_to_lword*/
       
 21973     break;
       
 21974 
       
 21975 /****
       
 21976  *BYTE_TO_BOOL
       
 21977  */
       
 21978     case function_byte_to_bool :
       
 21979     {
       
 21980         symbol_c *last_type_symbol = NULL;
       
 21981 
       
 21982         {
       
 21983             symbol_c *IN_type_symbol = param_data_type;
       
 21984             last_type_symbol = param_data_type;
       
 21985             
       
 21986             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 21987             {
       
 21988         
       
 21989                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 21990                 return return_type_symbol;
       
 21991                 
       
 21992             }
       
 21993             
       
 21994             ERROR;
       
 21995         }
       
 21996         
       
 21997     }/*function_byte_to_bool*/
       
 21998     break;
       
 21999 
       
 22000 /****
       
 22001  *BYTE_TO_SINT
       
 22002  */
       
 22003     case function_byte_to_sint :
       
 22004     {
       
 22005         symbol_c *last_type_symbol = NULL;
       
 22006 
       
 22007         {
       
 22008             symbol_c *IN_type_symbol = param_data_type;
       
 22009             last_type_symbol = param_data_type;
       
 22010             
       
 22011             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22012             {
       
 22013         
       
 22014                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22015                 return return_type_symbol;
       
 22016                 
       
 22017             }
       
 22018             
       
 22019             ERROR;
       
 22020         }
       
 22021         
       
 22022     }/*function_byte_to_sint*/
       
 22023     break;
       
 22024 
       
 22025 /****
       
 22026  *BYTE_TO_INT
       
 22027  */
       
 22028     case function_byte_to_int :
       
 22029     {
       
 22030         symbol_c *last_type_symbol = NULL;
       
 22031 
       
 22032         {
       
 22033             symbol_c *IN_type_symbol = param_data_type;
       
 22034             last_type_symbol = param_data_type;
       
 22035             
       
 22036             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22037             {
       
 22038         
       
 22039                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22040                 return return_type_symbol;
       
 22041                 
       
 22042             }
       
 22043             
       
 22044             ERROR;
       
 22045         }
       
 22046         
       
 22047     }/*function_byte_to_int*/
       
 22048     break;
       
 22049 
       
 22050 /****
       
 22051  *BYTE_TO_DINT
       
 22052  */
       
 22053     case function_byte_to_dint :
       
 22054     {
       
 22055         symbol_c *last_type_symbol = NULL;
       
 22056 
       
 22057         {
       
 22058             symbol_c *IN_type_symbol = param_data_type;
       
 22059             last_type_symbol = param_data_type;
       
 22060             
       
 22061             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22062             {
       
 22063         
       
 22064                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22065                 return return_type_symbol;
       
 22066                 
       
 22067             }
       
 22068             
       
 22069             ERROR;
       
 22070         }
       
 22071         
       
 22072     }/*function_byte_to_dint*/
       
 22073     break;
       
 22074 
       
 22075 /****
       
 22076  *BYTE_TO_LINT
       
 22077  */
       
 22078     case function_byte_to_lint :
       
 22079     {
       
 22080         symbol_c *last_type_symbol = NULL;
       
 22081 
       
 22082         {
       
 22083             symbol_c *IN_type_symbol = param_data_type;
       
 22084             last_type_symbol = param_data_type;
       
 22085             
       
 22086             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22087             {
       
 22088         
       
 22089                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22090                 return return_type_symbol;
       
 22091                 
       
 22092             }
       
 22093             
       
 22094             ERROR;
       
 22095         }
       
 22096         
       
 22097     }/*function_byte_to_lint*/
       
 22098     break;
       
 22099 
       
 22100 /****
       
 22101  *BYTE_TO_USINT
       
 22102  */
       
 22103     case function_byte_to_usint :
       
 22104     {
       
 22105         symbol_c *last_type_symbol = NULL;
       
 22106 
       
 22107         {
       
 22108             symbol_c *IN_type_symbol = param_data_type;
       
 22109             last_type_symbol = param_data_type;
       
 22110             
       
 22111             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22112             {
       
 22113         
       
 22114                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22115                 return return_type_symbol;
       
 22116                 
       
 22117             }
       
 22118             
       
 22119             ERROR;
       
 22120         }
       
 22121         
       
 22122     }/*function_byte_to_usint*/
       
 22123     break;
       
 22124 
       
 22125 /****
       
 22126  *BYTE_TO_UINT
       
 22127  */
       
 22128     case function_byte_to_uint :
       
 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 (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22137             {
       
 22138         
       
 22139                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22140                 return return_type_symbol;
       
 22141                 
       
 22142             }
       
 22143             
       
 22144             ERROR;
       
 22145         }
       
 22146         
       
 22147     }/*function_byte_to_uint*/
       
 22148     break;
       
 22149 
       
 22150 /****
       
 22151  *BYTE_TO_UDINT
       
 22152  */
       
 22153     case function_byte_to_udint :
       
 22154     {
       
 22155         symbol_c *last_type_symbol = NULL;
       
 22156 
       
 22157         {
       
 22158             symbol_c *IN_type_symbol = param_data_type;
       
 22159             last_type_symbol = param_data_type;
       
 22160             
       
 22161             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22162             {
       
 22163         
       
 22164                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22165                 return return_type_symbol;
       
 22166                 
       
 22167             }
       
 22168             
       
 22169             ERROR;
       
 22170         }
       
 22171         
       
 22172     }/*function_byte_to_udint*/
       
 22173     break;
       
 22174 
       
 22175 /****
       
 22176  *BYTE_TO_ULINT
       
 22177  */
       
 22178     case function_byte_to_ulint :
       
 22179     {
       
 22180         symbol_c *last_type_symbol = NULL;
       
 22181 
       
 22182         {
       
 22183             symbol_c *IN_type_symbol = param_data_type;
       
 22184             last_type_symbol = param_data_type;
       
 22185             
       
 22186             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22187             {
       
 22188         
       
 22189                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22190                 return return_type_symbol;
       
 22191                 
       
 22192             }
       
 22193             
       
 22194             ERROR;
       
 22195         }
       
 22196         
       
 22197     }/*function_byte_to_ulint*/
       
 22198     break;
       
 22199 
       
 22200 /****
       
 22201  *BYTE_TO_REAL
       
 22202  */
       
 22203     case function_byte_to_real :
       
 22204     {
       
 22205         symbol_c *last_type_symbol = NULL;
       
 22206 
       
 22207         {
       
 22208             symbol_c *IN_type_symbol = param_data_type;
       
 22209             last_type_symbol = param_data_type;
       
 22210             
       
 22211             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22212             {
       
 22213         
       
 22214                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22215                 return return_type_symbol;
       
 22216                 
       
 22217             }
       
 22218             
       
 22219             ERROR;
       
 22220         }
       
 22221         
       
 22222     }/*function_byte_to_real*/
       
 22223     break;
       
 22224 
       
 22225 /****
       
 22226  *BYTE_TO_LREAL
       
 22227  */
       
 22228     case function_byte_to_lreal :
       
 22229     {
       
 22230         symbol_c *last_type_symbol = NULL;
       
 22231 
       
 22232         {
       
 22233             symbol_c *IN_type_symbol = param_data_type;
       
 22234             last_type_symbol = param_data_type;
       
 22235             
       
 22236             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22237             {
       
 22238         
       
 22239                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22240                 return return_type_symbol;
       
 22241                 
       
 22242             }
       
 22243             
       
 22244             ERROR;
       
 22245         }
       
 22246         
       
 22247     }/*function_byte_to_lreal*/
       
 22248     break;
       
 22249 
       
 22250 /****
       
 22251  *BYTE_TO_TIME
       
 22252  */
       
 22253     case function_byte_to_time :
       
 22254     {
       
 22255         symbol_c *last_type_symbol = NULL;
       
 22256 
       
 22257         {
       
 22258             symbol_c *IN_type_symbol = param_data_type;
       
 22259             last_type_symbol = param_data_type;
       
 22260             
       
 22261             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22262             {
       
 22263         
       
 22264                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22265                 return return_type_symbol;
       
 22266                 
       
 22267             }
       
 22268             
       
 22269             ERROR;
       
 22270         }
       
 22271         
       
 22272     }/*function_byte_to_time*/
       
 22273     break;
       
 22274 
       
 22275 /****
       
 22276  *BYTE_TO_DATE
       
 22277  */
       
 22278     case function_byte_to_date :
       
 22279     {
       
 22280         symbol_c *last_type_symbol = NULL;
       
 22281 
       
 22282         {
       
 22283             symbol_c *IN_type_symbol = param_data_type;
       
 22284             last_type_symbol = param_data_type;
       
 22285             
       
 22286             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22287             {
       
 22288         
       
 22289                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22290                 return return_type_symbol;
       
 22291                 
       
 22292             }
       
 22293             
       
 22294             ERROR;
       
 22295         }
       
 22296         
       
 22297     }/*function_byte_to_date*/
       
 22298     break;
       
 22299 
       
 22300 /****
       
 22301  *BYTE_TO_TOD
       
 22302  */
       
 22303     case function_byte_to_tod :
       
 22304     {
       
 22305         symbol_c *last_type_symbol = NULL;
       
 22306 
       
 22307         {
       
 22308             symbol_c *IN_type_symbol = param_data_type;
       
 22309             last_type_symbol = param_data_type;
       
 22310             
       
 22311             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22312             {
       
 22313         
       
 22314                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22315                 return return_type_symbol;
       
 22316                 
       
 22317             }
       
 22318             
       
 22319             ERROR;
       
 22320         }
       
 22321         
       
 22322     }/*function_byte_to_tod*/
       
 22323     break;
       
 22324 
       
 22325 /****
       
 22326  *BYTE_TO_DT
       
 22327  */
       
 22328     case function_byte_to_dt :
       
 22329     {
       
 22330         symbol_c *last_type_symbol = NULL;
       
 22331 
       
 22332         {
       
 22333             symbol_c *IN_type_symbol = param_data_type;
       
 22334             last_type_symbol = param_data_type;
       
 22335             
       
 22336             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22337             {
       
 22338         
       
 22339                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22340                 return return_type_symbol;
       
 22341                 
       
 22342             }
       
 22343             
       
 22344             ERROR;
       
 22345         }
       
 22346         
       
 22347     }/*function_byte_to_dt*/
       
 22348     break;
       
 22349 
       
 22350 /****
       
 22351  *BYTE_TO_STRING
       
 22352  */
       
 22353     case function_byte_to_string :
       
 22354     {
       
 22355         symbol_c *last_type_symbol = NULL;
       
 22356 
       
 22357         {
       
 22358             symbol_c *IN_type_symbol = param_data_type;
       
 22359             last_type_symbol = param_data_type;
       
 22360             
       
 22361             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22362             {
       
 22363         
       
 22364                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22365                 return return_type_symbol;
       
 22366                 
       
 22367             }
       
 22368             
       
 22369             ERROR;
       
 22370         }
       
 22371         
       
 22372     }/*function_byte_to_string*/
       
 22373     break;
       
 22374 
       
 22375 /****
       
 22376  *BYTE_TO_WORD
       
 22377  */
       
 22378     case function_byte_to_word :
       
 22379     {
       
 22380         symbol_c *last_type_symbol = NULL;
       
 22381 
       
 22382         {
       
 22383             symbol_c *IN_type_symbol = param_data_type;
       
 22384             last_type_symbol = param_data_type;
       
 22385             
       
 22386             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22387             {
       
 22388         
       
 22389                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 22390                 return return_type_symbol;
       
 22391                 
       
 22392             }
       
 22393             
       
 22394             ERROR;
       
 22395         }
       
 22396         
       
 22397     }/*function_byte_to_word*/
       
 22398     break;
       
 22399 
       
 22400 /****
       
 22401  *BYTE_TO_DWORD
       
 22402  */
       
 22403     case function_byte_to_dword :
       
 22404     {
       
 22405         symbol_c *last_type_symbol = NULL;
       
 22406 
       
 22407         {
       
 22408             symbol_c *IN_type_symbol = param_data_type;
       
 22409             last_type_symbol = param_data_type;
       
 22410             
       
 22411             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22412             {
       
 22413         
       
 22414                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22415                 return return_type_symbol;
       
 22416                 
       
 22417             }
       
 22418             
       
 22419             ERROR;
       
 22420         }
       
 22421         
       
 22422     }/*function_byte_to_dword*/
       
 22423     break;
       
 22424 
       
 22425 /****
       
 22426  *BYTE_TO_LWORD
       
 22427  */
       
 22428     case function_byte_to_lword :
       
 22429     {
       
 22430         symbol_c *last_type_symbol = NULL;
       
 22431 
       
 22432         {
       
 22433             symbol_c *IN_type_symbol = param_data_type;
       
 22434             last_type_symbol = param_data_type;
       
 22435             
       
 22436             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 22437             {
       
 22438         
       
 22439                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22440                 return return_type_symbol;
       
 22441                 
       
 22442             }
       
 22443             
       
 22444             ERROR;
       
 22445         }
       
 22446         
       
 22447     }/*function_byte_to_lword*/
       
 22448     break;
       
 22449 
       
 22450 /****
       
 22451  *WORD_TO_BOOL
       
 22452  */
       
 22453     case function_word_to_bool :
       
 22454     {
       
 22455         symbol_c *last_type_symbol = NULL;
       
 22456 
       
 22457         {
       
 22458             symbol_c *IN_type_symbol = param_data_type;
       
 22459             last_type_symbol = param_data_type;
       
 22460             
       
 22461             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22462             {
       
 22463         
       
 22464                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22465                 return return_type_symbol;
       
 22466                 
       
 22467             }
       
 22468             
       
 22469             ERROR;
       
 22470         }
       
 22471         
       
 22472     }/*function_word_to_bool*/
       
 22473     break;
       
 22474 
       
 22475 /****
       
 22476  *WORD_TO_SINT
       
 22477  */
       
 22478     case function_word_to_sint :
       
 22479     {
       
 22480         symbol_c *last_type_symbol = NULL;
       
 22481 
       
 22482         {
       
 22483             symbol_c *IN_type_symbol = param_data_type;
       
 22484             last_type_symbol = param_data_type;
       
 22485             
       
 22486             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22487             {
       
 22488         
       
 22489                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22490                 return return_type_symbol;
       
 22491                 
       
 22492             }
       
 22493             
       
 22494             ERROR;
       
 22495         }
       
 22496         
       
 22497     }/*function_word_to_sint*/
       
 22498     break;
       
 22499 
       
 22500 /****
       
 22501  *WORD_TO_INT
       
 22502  */
       
 22503     case function_word_to_int :
       
 22504     {
       
 22505         symbol_c *last_type_symbol = NULL;
       
 22506 
       
 22507         {
       
 22508             symbol_c *IN_type_symbol = param_data_type;
       
 22509             last_type_symbol = param_data_type;
       
 22510             
       
 22511             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22512             {
       
 22513         
       
 22514                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22515                 return return_type_symbol;
       
 22516                 
       
 22517             }
       
 22518             
       
 22519             ERROR;
       
 22520         }
       
 22521         
       
 22522     }/*function_word_to_int*/
       
 22523     break;
       
 22524 
       
 22525 /****
       
 22526  *WORD_TO_DINT
       
 22527  */
       
 22528     case function_word_to_dint :
       
 22529     {
       
 22530         symbol_c *last_type_symbol = NULL;
       
 22531 
       
 22532         {
       
 22533             symbol_c *IN_type_symbol = param_data_type;
       
 22534             last_type_symbol = param_data_type;
       
 22535             
       
 22536             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22537             {
       
 22538         
       
 22539                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 22540                 return return_type_symbol;
       
 22541                 
       
 22542             }
       
 22543             
       
 22544             ERROR;
       
 22545         }
       
 22546         
       
 22547     }/*function_word_to_dint*/
       
 22548     break;
       
 22549 
       
 22550 /****
       
 22551  *WORD_TO_LINT
       
 22552  */
       
 22553     case function_word_to_lint :
       
 22554     {
       
 22555         symbol_c *last_type_symbol = NULL;
       
 22556 
       
 22557         {
       
 22558             symbol_c *IN_type_symbol = param_data_type;
       
 22559             last_type_symbol = param_data_type;
       
 22560             
       
 22561             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22562             {
       
 22563         
       
 22564                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 22565                 return return_type_symbol;
       
 22566                 
       
 22567             }
       
 22568             
       
 22569             ERROR;
       
 22570         }
       
 22571         
       
 22572     }/*function_word_to_lint*/
       
 22573     break;
       
 22574 
       
 22575 /****
       
 22576  *WORD_TO_USINT
       
 22577  */
       
 22578     case function_word_to_usint :
       
 22579     {
       
 22580         symbol_c *last_type_symbol = NULL;
       
 22581 
       
 22582         {
       
 22583             symbol_c *IN_type_symbol = param_data_type;
       
 22584             last_type_symbol = param_data_type;
       
 22585             
       
 22586             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22587             {
       
 22588         
       
 22589                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 22590                 return return_type_symbol;
       
 22591                 
       
 22592             }
       
 22593             
       
 22594             ERROR;
       
 22595         }
       
 22596         
       
 22597     }/*function_word_to_usint*/
       
 22598     break;
       
 22599 
       
 22600 /****
       
 22601  *WORD_TO_UINT
       
 22602  */
       
 22603     case function_word_to_uint :
       
 22604     {
       
 22605         symbol_c *last_type_symbol = NULL;
       
 22606 
       
 22607         {
       
 22608             symbol_c *IN_type_symbol = param_data_type;
       
 22609             last_type_symbol = param_data_type;
       
 22610             
       
 22611             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22612             {
       
 22613         
       
 22614                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 22615                 return return_type_symbol;
       
 22616                 
       
 22617             }
       
 22618             
       
 22619             ERROR;
       
 22620         }
       
 22621         
       
 22622     }/*function_word_to_uint*/
       
 22623     break;
       
 22624 
       
 22625 /****
       
 22626  *WORD_TO_UDINT
       
 22627  */
       
 22628     case function_word_to_udint :
       
 22629     {
       
 22630         symbol_c *last_type_symbol = NULL;
       
 22631 
       
 22632         {
       
 22633             symbol_c *IN_type_symbol = param_data_type;
       
 22634             last_type_symbol = param_data_type;
       
 22635             
       
 22636             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22637             {
       
 22638         
       
 22639                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 22640                 return return_type_symbol;
       
 22641                 
       
 22642             }
       
 22643             
       
 22644             ERROR;
       
 22645         }
       
 22646         
       
 22647     }/*function_word_to_udint*/
       
 22648     break;
       
 22649 
       
 22650 /****
       
 22651  *WORD_TO_ULINT
       
 22652  */
       
 22653     case function_word_to_ulint :
       
 22654     {
       
 22655         symbol_c *last_type_symbol = NULL;
       
 22656 
       
 22657         {
       
 22658             symbol_c *IN_type_symbol = param_data_type;
       
 22659             last_type_symbol = param_data_type;
       
 22660             
       
 22661             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22662             {
       
 22663         
       
 22664                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 22665                 return return_type_symbol;
       
 22666                 
       
 22667             }
       
 22668             
       
 22669             ERROR;
       
 22670         }
       
 22671         
       
 22672     }/*function_word_to_ulint*/
       
 22673     break;
       
 22674 
       
 22675 /****
       
 22676  *WORD_TO_REAL
       
 22677  */
       
 22678     case function_word_to_real :
       
 22679     {
       
 22680         symbol_c *last_type_symbol = NULL;
       
 22681 
       
 22682         {
       
 22683             symbol_c *IN_type_symbol = param_data_type;
       
 22684             last_type_symbol = param_data_type;
       
 22685             
       
 22686             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22687             {
       
 22688         
       
 22689                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 22690                 return return_type_symbol;
       
 22691                 
       
 22692             }
       
 22693             
       
 22694             ERROR;
       
 22695         }
       
 22696         
       
 22697     }/*function_word_to_real*/
       
 22698     break;
       
 22699 
       
 22700 /****
       
 22701  *WORD_TO_LREAL
       
 22702  */
       
 22703     case function_word_to_lreal :
       
 22704     {
       
 22705         symbol_c *last_type_symbol = NULL;
       
 22706 
       
 22707         {
       
 22708             symbol_c *IN_type_symbol = param_data_type;
       
 22709             last_type_symbol = param_data_type;
       
 22710             
       
 22711             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22712             {
       
 22713         
       
 22714                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 22715                 return return_type_symbol;
       
 22716                 
       
 22717             }
       
 22718             
       
 22719             ERROR;
       
 22720         }
       
 22721         
       
 22722     }/*function_word_to_lreal*/
       
 22723     break;
       
 22724 
       
 22725 /****
       
 22726  *WORD_TO_TIME
       
 22727  */
       
 22728     case function_word_to_time :
       
 22729     {
       
 22730         symbol_c *last_type_symbol = NULL;
       
 22731 
       
 22732         {
       
 22733             symbol_c *IN_type_symbol = param_data_type;
       
 22734             last_type_symbol = param_data_type;
       
 22735             
       
 22736             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22737             {
       
 22738         
       
 22739                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 22740                 return return_type_symbol;
       
 22741                 
       
 22742             }
       
 22743             
       
 22744             ERROR;
       
 22745         }
       
 22746         
       
 22747     }/*function_word_to_time*/
       
 22748     break;
       
 22749 
       
 22750 /****
       
 22751  *WORD_TO_DATE
       
 22752  */
       
 22753     case function_word_to_date :
       
 22754     {
       
 22755         symbol_c *last_type_symbol = NULL;
       
 22756 
       
 22757         {
       
 22758             symbol_c *IN_type_symbol = param_data_type;
       
 22759             last_type_symbol = param_data_type;
       
 22760             
       
 22761             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22762             {
       
 22763         
       
 22764                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 22765                 return return_type_symbol;
       
 22766                 
       
 22767             }
       
 22768             
       
 22769             ERROR;
       
 22770         }
       
 22771         
       
 22772     }/*function_word_to_date*/
       
 22773     break;
       
 22774 
       
 22775 /****
       
 22776  *WORD_TO_TOD
       
 22777  */
       
 22778     case function_word_to_tod :
       
 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 (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22787             {
       
 22788         
       
 22789                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 22790                 return return_type_symbol;
       
 22791                 
       
 22792             }
       
 22793             
       
 22794             ERROR;
       
 22795         }
       
 22796         
       
 22797     }/*function_word_to_tod*/
       
 22798     break;
       
 22799 
       
 22800 /****
       
 22801  *WORD_TO_DT
       
 22802  */
       
 22803     case function_word_to_dt :
       
 22804     {
       
 22805         symbol_c *last_type_symbol = NULL;
       
 22806 
       
 22807         {
       
 22808             symbol_c *IN_type_symbol = param_data_type;
       
 22809             last_type_symbol = param_data_type;
       
 22810             
       
 22811             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22812             {
       
 22813         
       
 22814                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 22815                 return return_type_symbol;
       
 22816                 
       
 22817             }
       
 22818             
       
 22819             ERROR;
       
 22820         }
       
 22821         
       
 22822     }/*function_word_to_dt*/
       
 22823     break;
       
 22824 
       
 22825 /****
       
 22826  *WORD_TO_STRING
       
 22827  */
       
 22828     case function_word_to_string :
       
 22829     {
       
 22830         symbol_c *last_type_symbol = NULL;
       
 22831 
       
 22832         {
       
 22833             symbol_c *IN_type_symbol = param_data_type;
       
 22834             last_type_symbol = param_data_type;
       
 22835             
       
 22836             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22837             {
       
 22838         
       
 22839                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 22840                 return return_type_symbol;
       
 22841                 
       
 22842             }
       
 22843             
       
 22844             ERROR;
       
 22845         }
       
 22846         
       
 22847     }/*function_word_to_string*/
       
 22848     break;
       
 22849 
       
 22850 /****
       
 22851  *WORD_TO_BYTE
       
 22852  */
       
 22853     case function_word_to_byte :
       
 22854     {
       
 22855         symbol_c *last_type_symbol = NULL;
       
 22856 
       
 22857         {
       
 22858             symbol_c *IN_type_symbol = param_data_type;
       
 22859             last_type_symbol = param_data_type;
       
 22860             
       
 22861             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22862             {
       
 22863         
       
 22864                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 22865                 return return_type_symbol;
       
 22866                 
       
 22867             }
       
 22868             
       
 22869             ERROR;
       
 22870         }
       
 22871         
       
 22872     }/*function_word_to_byte*/
       
 22873     break;
       
 22874 
       
 22875 /****
       
 22876  *WORD_TO_DWORD
       
 22877  */
       
 22878     case function_word_to_dword :
       
 22879     {
       
 22880         symbol_c *last_type_symbol = NULL;
       
 22881 
       
 22882         {
       
 22883             symbol_c *IN_type_symbol = param_data_type;
       
 22884             last_type_symbol = param_data_type;
       
 22885             
       
 22886             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22887             {
       
 22888         
       
 22889                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 22890                 return return_type_symbol;
       
 22891                 
       
 22892             }
       
 22893             
       
 22894             ERROR;
       
 22895         }
       
 22896         
       
 22897     }/*function_word_to_dword*/
       
 22898     break;
       
 22899 
       
 22900 /****
       
 22901  *WORD_TO_LWORD
       
 22902  */
       
 22903     case function_word_to_lword :
       
 22904     {
       
 22905         symbol_c *last_type_symbol = NULL;
       
 22906 
       
 22907         {
       
 22908             symbol_c *IN_type_symbol = param_data_type;
       
 22909             last_type_symbol = param_data_type;
       
 22910             
       
 22911             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 22912             {
       
 22913         
       
 22914                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 22915                 return return_type_symbol;
       
 22916                 
       
 22917             }
       
 22918             
       
 22919             ERROR;
       
 22920         }
       
 22921         
       
 22922     }/*function_word_to_lword*/
       
 22923     break;
       
 22924 
       
 22925 /****
       
 22926  *DWORD_TO_BOOL
       
 22927  */
       
 22928     case function_dword_to_bool :
       
 22929     {
       
 22930         symbol_c *last_type_symbol = NULL;
       
 22931 
       
 22932         {
       
 22933             symbol_c *IN_type_symbol = param_data_type;
       
 22934             last_type_symbol = param_data_type;
       
 22935             
       
 22936             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 22937             {
       
 22938         
       
 22939                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 22940                 return return_type_symbol;
       
 22941                 
       
 22942             }
       
 22943             
       
 22944             ERROR;
       
 22945         }
       
 22946         
       
 22947     }/*function_dword_to_bool*/
       
 22948     break;
       
 22949 
       
 22950 /****
       
 22951  *DWORD_TO_SINT
       
 22952  */
       
 22953     case function_dword_to_sint :
       
 22954     {
       
 22955         symbol_c *last_type_symbol = NULL;
       
 22956 
       
 22957         {
       
 22958             symbol_c *IN_type_symbol = param_data_type;
       
 22959             last_type_symbol = param_data_type;
       
 22960             
       
 22961             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 22962             {
       
 22963         
       
 22964                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 22965                 return return_type_symbol;
       
 22966                 
       
 22967             }
       
 22968             
       
 22969             ERROR;
       
 22970         }
       
 22971         
       
 22972     }/*function_dword_to_sint*/
       
 22973     break;
       
 22974 
       
 22975 /****
       
 22976  *DWORD_TO_INT
       
 22977  */
       
 22978     case function_dword_to_int :
       
 22979     {
       
 22980         symbol_c *last_type_symbol = NULL;
       
 22981 
       
 22982         {
       
 22983             symbol_c *IN_type_symbol = param_data_type;
       
 22984             last_type_symbol = param_data_type;
       
 22985             
       
 22986             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 22987             {
       
 22988         
       
 22989                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 22990                 return return_type_symbol;
       
 22991                 
       
 22992             }
       
 22993             
       
 22994             ERROR;
       
 22995         }
       
 22996         
       
 22997     }/*function_dword_to_int*/
       
 22998     break;
       
 22999 
       
 23000 /****
       
 23001  *DWORD_TO_DINT
       
 23002  */
       
 23003     case function_dword_to_dint :
       
 23004     {
       
 23005         symbol_c *last_type_symbol = NULL;
       
 23006 
       
 23007         {
       
 23008             symbol_c *IN_type_symbol = param_data_type;
       
 23009             last_type_symbol = param_data_type;
       
 23010             
       
 23011             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23012             {
       
 23013         
       
 23014                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23015                 return return_type_symbol;
       
 23016                 
       
 23017             }
       
 23018             
       
 23019             ERROR;
       
 23020         }
       
 23021         
       
 23022     }/*function_dword_to_dint*/
       
 23023     break;
       
 23024 
       
 23025 /****
       
 23026  *DWORD_TO_LINT
       
 23027  */
       
 23028     case function_dword_to_lint :
       
 23029     {
       
 23030         symbol_c *last_type_symbol = NULL;
       
 23031 
       
 23032         {
       
 23033             symbol_c *IN_type_symbol = param_data_type;
       
 23034             last_type_symbol = param_data_type;
       
 23035             
       
 23036             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23037             {
       
 23038         
       
 23039                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23040                 return return_type_symbol;
       
 23041                 
       
 23042             }
       
 23043             
       
 23044             ERROR;
       
 23045         }
       
 23046         
       
 23047     }/*function_dword_to_lint*/
       
 23048     break;
       
 23049 
       
 23050 /****
       
 23051  *DWORD_TO_USINT
       
 23052  */
       
 23053     case function_dword_to_usint :
       
 23054     {
       
 23055         symbol_c *last_type_symbol = NULL;
       
 23056 
       
 23057         {
       
 23058             symbol_c *IN_type_symbol = param_data_type;
       
 23059             last_type_symbol = param_data_type;
       
 23060             
       
 23061             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23062             {
       
 23063         
       
 23064                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23065                 return return_type_symbol;
       
 23066                 
       
 23067             }
       
 23068             
       
 23069             ERROR;
       
 23070         }
       
 23071         
       
 23072     }/*function_dword_to_usint*/
       
 23073     break;
       
 23074 
       
 23075 /****
       
 23076  *DWORD_TO_UINT
       
 23077  */
       
 23078     case function_dword_to_uint :
       
 23079     {
       
 23080         symbol_c *last_type_symbol = NULL;
       
 23081 
       
 23082         {
       
 23083             symbol_c *IN_type_symbol = param_data_type;
       
 23084             last_type_symbol = param_data_type;
       
 23085             
       
 23086             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23087             {
       
 23088         
       
 23089                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23090                 return return_type_symbol;
       
 23091                 
       
 23092             }
       
 23093             
       
 23094             ERROR;
       
 23095         }
       
 23096         
       
 23097     }/*function_dword_to_uint*/
       
 23098     break;
       
 23099 
       
 23100 /****
       
 23101  *DWORD_TO_UDINT
       
 23102  */
       
 23103     case function_dword_to_udint :
       
 23104     {
       
 23105         symbol_c *last_type_symbol = NULL;
       
 23106 
       
 23107         {
       
 23108             symbol_c *IN_type_symbol = param_data_type;
       
 23109             last_type_symbol = param_data_type;
       
 23110             
       
 23111             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23112             {
       
 23113         
       
 23114                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23115                 return return_type_symbol;
       
 23116                 
       
 23117             }
       
 23118             
       
 23119             ERROR;
       
 23120         }
       
 23121         
       
 23122     }/*function_dword_to_udint*/
       
 23123     break;
       
 23124 
       
 23125 /****
       
 23126  *DWORD_TO_ULINT
       
 23127  */
       
 23128     case function_dword_to_ulint :
       
 23129     {
       
 23130         symbol_c *last_type_symbol = NULL;
       
 23131 
       
 23132         {
       
 23133             symbol_c *IN_type_symbol = param_data_type;
       
 23134             last_type_symbol = param_data_type;
       
 23135             
       
 23136             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23137             {
       
 23138         
       
 23139                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23140                 return return_type_symbol;
       
 23141                 
       
 23142             }
       
 23143             
       
 23144             ERROR;
       
 23145         }
       
 23146         
       
 23147     }/*function_dword_to_ulint*/
       
 23148     break;
       
 23149 
       
 23150 /****
       
 23151  *DWORD_TO_REAL
       
 23152  */
       
 23153     case function_dword_to_real :
       
 23154     {
       
 23155         symbol_c *last_type_symbol = NULL;
       
 23156 
       
 23157         {
       
 23158             symbol_c *IN_type_symbol = param_data_type;
       
 23159             last_type_symbol = param_data_type;
       
 23160             
       
 23161             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23162             {
       
 23163         
       
 23164                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23165                 return return_type_symbol;
       
 23166                 
       
 23167             }
       
 23168             
       
 23169             ERROR;
       
 23170         }
       
 23171         
       
 23172     }/*function_dword_to_real*/
       
 23173     break;
       
 23174 
       
 23175 /****
       
 23176  *DWORD_TO_LREAL
       
 23177  */
       
 23178     case function_dword_to_lreal :
       
 23179     {
       
 23180         symbol_c *last_type_symbol = NULL;
       
 23181 
       
 23182         {
       
 23183             symbol_c *IN_type_symbol = param_data_type;
       
 23184             last_type_symbol = param_data_type;
       
 23185             
       
 23186             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23187             {
       
 23188         
       
 23189                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23190                 return return_type_symbol;
       
 23191                 
       
 23192             }
       
 23193             
       
 23194             ERROR;
       
 23195         }
       
 23196         
       
 23197     }/*function_dword_to_lreal*/
       
 23198     break;
       
 23199 
       
 23200 /****
       
 23201  *DWORD_TO_TIME
       
 23202  */
       
 23203     case function_dword_to_time :
       
 23204     {
       
 23205         symbol_c *last_type_symbol = NULL;
       
 23206 
       
 23207         {
       
 23208             symbol_c *IN_type_symbol = param_data_type;
       
 23209             last_type_symbol = param_data_type;
       
 23210             
       
 23211             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23212             {
       
 23213         
       
 23214                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23215                 return return_type_symbol;
       
 23216                 
       
 23217             }
       
 23218             
       
 23219             ERROR;
       
 23220         }
       
 23221         
       
 23222     }/*function_dword_to_time*/
       
 23223     break;
       
 23224 
       
 23225 /****
       
 23226  *DWORD_TO_DATE
       
 23227  */
       
 23228     case function_dword_to_date :
       
 23229     {
       
 23230         symbol_c *last_type_symbol = NULL;
       
 23231 
       
 23232         {
       
 23233             symbol_c *IN_type_symbol = param_data_type;
       
 23234             last_type_symbol = param_data_type;
       
 23235             
       
 23236             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23237             {
       
 23238         
       
 23239                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23240                 return return_type_symbol;
       
 23241                 
       
 23242             }
       
 23243             
       
 23244             ERROR;
       
 23245         }
       
 23246         
       
 23247     }/*function_dword_to_date*/
       
 23248     break;
       
 23249 
       
 23250 /****
       
 23251  *DWORD_TO_TOD
       
 23252  */
       
 23253     case function_dword_to_tod :
       
 23254     {
       
 23255         symbol_c *last_type_symbol = NULL;
       
 23256 
       
 23257         {
       
 23258             symbol_c *IN_type_symbol = param_data_type;
       
 23259             last_type_symbol = param_data_type;
       
 23260             
       
 23261             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23262             {
       
 23263         
       
 23264                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23265                 return return_type_symbol;
       
 23266                 
       
 23267             }
       
 23268             
       
 23269             ERROR;
       
 23270         }
       
 23271         
       
 23272     }/*function_dword_to_tod*/
       
 23273     break;
       
 23274 
       
 23275 /****
       
 23276  *DWORD_TO_DT
       
 23277  */
       
 23278     case function_dword_to_dt :
       
 23279     {
       
 23280         symbol_c *last_type_symbol = NULL;
       
 23281 
       
 23282         {
       
 23283             symbol_c *IN_type_symbol = param_data_type;
       
 23284             last_type_symbol = param_data_type;
       
 23285             
       
 23286             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23287             {
       
 23288         
       
 23289                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23290                 return return_type_symbol;
       
 23291                 
       
 23292             }
       
 23293             
       
 23294             ERROR;
       
 23295         }
       
 23296         
       
 23297     }/*function_dword_to_dt*/
       
 23298     break;
       
 23299 
       
 23300 /****
       
 23301  *DWORD_TO_STRING
       
 23302  */
       
 23303     case function_dword_to_string :
       
 23304     {
       
 23305         symbol_c *last_type_symbol = NULL;
       
 23306 
       
 23307         {
       
 23308             symbol_c *IN_type_symbol = param_data_type;
       
 23309             last_type_symbol = param_data_type;
       
 23310             
       
 23311             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23312             {
       
 23313         
       
 23314                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23315                 return return_type_symbol;
       
 23316                 
       
 23317             }
       
 23318             
       
 23319             ERROR;
       
 23320         }
       
 23321         
       
 23322     }/*function_dword_to_string*/
       
 23323     break;
       
 23324 
       
 23325 /****
       
 23326  *DWORD_TO_BYTE
       
 23327  */
       
 23328     case function_dword_to_byte :
       
 23329     {
       
 23330         symbol_c *last_type_symbol = NULL;
       
 23331 
       
 23332         {
       
 23333             symbol_c *IN_type_symbol = param_data_type;
       
 23334             last_type_symbol = param_data_type;
       
 23335             
       
 23336             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23337             {
       
 23338         
       
 23339                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23340                 return return_type_symbol;
       
 23341                 
       
 23342             }
       
 23343             
       
 23344             ERROR;
       
 23345         }
       
 23346         
       
 23347     }/*function_dword_to_byte*/
       
 23348     break;
       
 23349 
       
 23350 /****
       
 23351  *DWORD_TO_WORD
       
 23352  */
       
 23353     case function_dword_to_word :
       
 23354     {
       
 23355         symbol_c *last_type_symbol = NULL;
       
 23356 
       
 23357         {
       
 23358             symbol_c *IN_type_symbol = param_data_type;
       
 23359             last_type_symbol = param_data_type;
       
 23360             
       
 23361             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23362             {
       
 23363         
       
 23364                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23365                 return return_type_symbol;
       
 23366                 
       
 23367             }
       
 23368             
       
 23369             ERROR;
       
 23370         }
       
 23371         
       
 23372     }/*function_dword_to_word*/
       
 23373     break;
       
 23374 
       
 23375 /****
       
 23376  *DWORD_TO_LWORD
       
 23377  */
       
 23378     case function_dword_to_lword :
       
 23379     {
       
 23380         symbol_c *last_type_symbol = NULL;
       
 23381 
       
 23382         {
       
 23383             symbol_c *IN_type_symbol = param_data_type;
       
 23384             last_type_symbol = param_data_type;
       
 23385             
       
 23386             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23387             {
       
 23388         
       
 23389                 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name;
       
 23390                 return return_type_symbol;
       
 23391                 
       
 23392             }
       
 23393             
       
 23394             ERROR;
       
 23395         }
       
 23396         
       
 23397     }/*function_dword_to_lword*/
       
 23398     break;
       
 23399 
       
 23400 /****
       
 23401  *LWORD_TO_BOOL
       
 23402  */
       
 23403     case function_lword_to_bool :
       
 23404     {
       
 23405         symbol_c *last_type_symbol = NULL;
       
 23406 
       
 23407         {
       
 23408             symbol_c *IN_type_symbol = param_data_type;
       
 23409             last_type_symbol = param_data_type;
       
 23410             
       
 23411             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23412             {
       
 23413         
       
 23414                 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name;
       
 23415                 return return_type_symbol;
       
 23416                 
       
 23417             }
       
 23418             
       
 23419             ERROR;
       
 23420         }
       
 23421         
       
 23422     }/*function_lword_to_bool*/
       
 23423     break;
       
 23424 
       
 23425 /****
       
 23426  *LWORD_TO_SINT
       
 23427  */
       
 23428     case function_lword_to_sint :
       
 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 (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23437             {
       
 23438         
       
 23439                 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name;
       
 23440                 return return_type_symbol;
       
 23441                 
       
 23442             }
       
 23443             
       
 23444             ERROR;
       
 23445         }
       
 23446         
       
 23447     }/*function_lword_to_sint*/
       
 23448     break;
       
 23449 
       
 23450 /****
       
 23451  *LWORD_TO_INT
       
 23452  */
       
 23453     case function_lword_to_int :
       
 23454     {
       
 23455         symbol_c *last_type_symbol = NULL;
       
 23456 
       
 23457         {
       
 23458             symbol_c *IN_type_symbol = param_data_type;
       
 23459             last_type_symbol = param_data_type;
       
 23460             
       
 23461             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23462             {
       
 23463         
       
 23464                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
       
 23465                 return return_type_symbol;
       
 23466                 
       
 23467             }
       
 23468             
       
 23469             ERROR;
       
 23470         }
       
 23471         
       
 23472     }/*function_lword_to_int*/
       
 23473     break;
       
 23474 
       
 23475 /****
       
 23476  *LWORD_TO_DINT
       
 23477  */
       
 23478     case function_lword_to_dint :
       
 23479     {
       
 23480         symbol_c *last_type_symbol = NULL;
       
 23481 
       
 23482         {
       
 23483             symbol_c *IN_type_symbol = param_data_type;
       
 23484             last_type_symbol = param_data_type;
       
 23485             
       
 23486             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23487             {
       
 23488         
       
 23489                 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name;
       
 23490                 return return_type_symbol;
       
 23491                 
       
 23492             }
       
 23493             
       
 23494             ERROR;
       
 23495         }
       
 23496         
       
 23497     }/*function_lword_to_dint*/
       
 23498     break;
       
 23499 
       
 23500 /****
       
 23501  *LWORD_TO_LINT
       
 23502  */
       
 23503     case function_lword_to_lint :
       
 23504     {
       
 23505         symbol_c *last_type_symbol = NULL;
       
 23506 
       
 23507         {
       
 23508             symbol_c *IN_type_symbol = param_data_type;
       
 23509             last_type_symbol = param_data_type;
       
 23510             
       
 23511             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23512             {
       
 23513         
       
 23514                 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name;
       
 23515                 return return_type_symbol;
       
 23516                 
       
 23517             }
       
 23518             
       
 23519             ERROR;
       
 23520         }
       
 23521         
       
 23522     }/*function_lword_to_lint*/
       
 23523     break;
       
 23524 
       
 23525 /****
       
 23526  *LWORD_TO_USINT
       
 23527  */
       
 23528     case function_lword_to_usint :
       
 23529     {
       
 23530         symbol_c *last_type_symbol = NULL;
       
 23531 
       
 23532         {
       
 23533             symbol_c *IN_type_symbol = param_data_type;
       
 23534             last_type_symbol = param_data_type;
       
 23535             
       
 23536             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23537             {
       
 23538         
       
 23539                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23540                 return return_type_symbol;
       
 23541                 
       
 23542             }
       
 23543             
       
 23544             ERROR;
       
 23545         }
       
 23546         
       
 23547     }/*function_lword_to_usint*/
       
 23548     break;
       
 23549 
       
 23550 /****
       
 23551  *LWORD_TO_UINT
       
 23552  */
       
 23553     case function_lword_to_uint :
       
 23554     {
       
 23555         symbol_c *last_type_symbol = NULL;
       
 23556 
       
 23557         {
       
 23558             symbol_c *IN_type_symbol = param_data_type;
       
 23559             last_type_symbol = param_data_type;
       
 23560             
       
 23561             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23562             {
       
 23563         
       
 23564                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23565                 return return_type_symbol;
       
 23566                 
       
 23567             }
       
 23568             
       
 23569             ERROR;
       
 23570         }
       
 23571         
       
 23572     }/*function_lword_to_uint*/
       
 23573     break;
       
 23574 
       
 23575 /****
       
 23576  *LWORD_TO_UDINT
       
 23577  */
       
 23578     case function_lword_to_udint :
       
 23579     {
       
 23580         symbol_c *last_type_symbol = NULL;
       
 23581 
       
 23582         {
       
 23583             symbol_c *IN_type_symbol = param_data_type;
       
 23584             last_type_symbol = param_data_type;
       
 23585             
       
 23586             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23587             {
       
 23588         
       
 23589                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23590                 return return_type_symbol;
       
 23591                 
       
 23592             }
       
 23593             
       
 23594             ERROR;
       
 23595         }
       
 23596         
       
 23597     }/*function_lword_to_udint*/
       
 23598     break;
       
 23599 
       
 23600 /****
       
 23601  *LWORD_TO_ULINT
       
 23602  */
       
 23603     case function_lword_to_ulint :
       
 23604     {
       
 23605         symbol_c *last_type_symbol = NULL;
       
 23606 
       
 23607         {
       
 23608             symbol_c *IN_type_symbol = param_data_type;
       
 23609             last_type_symbol = param_data_type;
       
 23610             
       
 23611             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23612             {
       
 23613         
       
 23614                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23615                 return return_type_symbol;
       
 23616                 
       
 23617             }
       
 23618             
       
 23619             ERROR;
       
 23620         }
       
 23621         
       
 23622     }/*function_lword_to_ulint*/
       
 23623     break;
       
 23624 
       
 23625 /****
       
 23626  *LWORD_TO_REAL
       
 23627  */
       
 23628     case function_lword_to_real :
       
 23629     {
       
 23630         symbol_c *last_type_symbol = NULL;
       
 23631 
       
 23632         {
       
 23633             symbol_c *IN_type_symbol = param_data_type;
       
 23634             last_type_symbol = param_data_type;
       
 23635             
       
 23636             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23637             {
       
 23638         
       
 23639                 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name;
       
 23640                 return return_type_symbol;
       
 23641                 
       
 23642             }
       
 23643             
       
 23644             ERROR;
       
 23645         }
       
 23646         
       
 23647     }/*function_lword_to_real*/
       
 23648     break;
       
 23649 
       
 23650 /****
       
 23651  *LWORD_TO_LREAL
       
 23652  */
       
 23653     case function_lword_to_lreal :
       
 23654     {
       
 23655         symbol_c *last_type_symbol = NULL;
       
 23656 
       
 23657         {
       
 23658             symbol_c *IN_type_symbol = param_data_type;
       
 23659             last_type_symbol = param_data_type;
       
 23660             
       
 23661             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23662             {
       
 23663         
       
 23664                 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name;
       
 23665                 return return_type_symbol;
       
 23666                 
       
 23667             }
       
 23668             
       
 23669             ERROR;
       
 23670         }
       
 23671         
       
 23672     }/*function_lword_to_lreal*/
       
 23673     break;
       
 23674 
       
 23675 /****
       
 23676  *LWORD_TO_TIME
       
 23677  */
       
 23678     case function_lword_to_time :
       
 23679     {
       
 23680         symbol_c *last_type_symbol = NULL;
       
 23681 
       
 23682         {
       
 23683             symbol_c *IN_type_symbol = param_data_type;
       
 23684             last_type_symbol = param_data_type;
       
 23685             
       
 23686             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23687             {
       
 23688         
       
 23689                 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
       
 23690                 return return_type_symbol;
       
 23691                 
       
 23692             }
       
 23693             
       
 23694             ERROR;
       
 23695         }
       
 23696         
       
 23697     }/*function_lword_to_time*/
       
 23698     break;
       
 23699 
       
 23700 /****
       
 23701  *LWORD_TO_DATE
       
 23702  */
       
 23703     case function_lword_to_date :
       
 23704     {
       
 23705         symbol_c *last_type_symbol = NULL;
       
 23706 
       
 23707         {
       
 23708             symbol_c *IN_type_symbol = param_data_type;
       
 23709             last_type_symbol = param_data_type;
       
 23710             
       
 23711             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23712             {
       
 23713         
       
 23714                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
       
 23715                 return return_type_symbol;
       
 23716                 
       
 23717             }
       
 23718             
       
 23719             ERROR;
       
 23720         }
       
 23721         
       
 23722     }/*function_lword_to_date*/
       
 23723     break;
       
 23724 
       
 23725 /****
       
 23726  *LWORD_TO_TOD
       
 23727  */
       
 23728     case function_lword_to_tod :
       
 23729     {
       
 23730         symbol_c *last_type_symbol = NULL;
       
 23731 
       
 23732         {
       
 23733             symbol_c *IN_type_symbol = param_data_type;
       
 23734             last_type_symbol = param_data_type;
       
 23735             
       
 23736             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23737             {
       
 23738         
       
 23739                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 23740                 return return_type_symbol;
       
 23741                 
       
 23742             }
       
 23743             
       
 23744             ERROR;
       
 23745         }
       
 23746         
       
 23747     }/*function_lword_to_tod*/
       
 23748     break;
       
 23749 
       
 23750 /****
       
 23751  *LWORD_TO_DT
       
 23752  */
       
 23753     case function_lword_to_dt :
       
 23754     {
       
 23755         symbol_c *last_type_symbol = NULL;
       
 23756 
       
 23757         {
       
 23758             symbol_c *IN_type_symbol = param_data_type;
       
 23759             last_type_symbol = param_data_type;
       
 23760             
       
 23761             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23762             {
       
 23763         
       
 23764                 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
       
 23765                 return return_type_symbol;
       
 23766                 
       
 23767             }
       
 23768             
       
 23769             ERROR;
       
 23770         }
       
 23771         
       
 23772     }/*function_lword_to_dt*/
       
 23773     break;
       
 23774 
       
 23775 /****
       
 23776  *LWORD_TO_STRING
       
 23777  */
       
 23778     case function_lword_to_string :
       
 23779     {
       
 23780         symbol_c *last_type_symbol = NULL;
       
 23781 
       
 23782         {
       
 23783             symbol_c *IN_type_symbol = param_data_type;
       
 23784             last_type_symbol = param_data_type;
       
 23785             
       
 23786             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23787             {
       
 23788         
       
 23789                 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
       
 23790                 return return_type_symbol;
       
 23791                 
       
 23792             }
       
 23793             
       
 23794             ERROR;
       
 23795         }
       
 23796         
       
 23797     }/*function_lword_to_string*/
       
 23798     break;
       
 23799 
       
 23800 /****
       
 23801  *LWORD_TO_BYTE
       
 23802  */
       
 23803     case function_lword_to_byte :
       
 23804     {
       
 23805         symbol_c *last_type_symbol = NULL;
       
 23806 
       
 23807         {
       
 23808             symbol_c *IN_type_symbol = param_data_type;
       
 23809             last_type_symbol = param_data_type;
       
 23810             
       
 23811             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23812             {
       
 23813         
       
 23814                 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name;
       
 23815                 return return_type_symbol;
       
 23816                 
       
 23817             }
       
 23818             
       
 23819             ERROR;
       
 23820         }
       
 23821         
       
 23822     }/*function_lword_to_byte*/
       
 23823     break;
       
 23824 
       
 23825 /****
       
 23826  *LWORD_TO_WORD
       
 23827  */
       
 23828     case function_lword_to_word :
       
 23829     {
       
 23830         symbol_c *last_type_symbol = NULL;
       
 23831 
       
 23832         {
       
 23833             symbol_c *IN_type_symbol = param_data_type;
       
 23834             last_type_symbol = param_data_type;
       
 23835             
       
 23836             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23837             {
       
 23838         
       
 23839                 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name;
       
 23840                 return return_type_symbol;
       
 23841                 
       
 23842             }
       
 23843             
       
 23844             ERROR;
       
 23845         }
       
 23846         
       
 23847     }/*function_lword_to_word*/
       
 23848     break;
       
 23849 
       
 23850 /****
       
 23851  *LWORD_TO_DWORD
       
 23852  */
       
 23853     case function_lword_to_dword :
       
 23854     {
       
 23855         symbol_c *last_type_symbol = NULL;
       
 23856 
       
 23857         {
       
 23858             symbol_c *IN_type_symbol = param_data_type;
       
 23859             last_type_symbol = param_data_type;
       
 23860             
       
 23861             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23862             {
       
 23863         
       
 23864                 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name;
       
 23865                 return return_type_symbol;
       
 23866                 
       
 23867             }
       
 23868             
       
 23869             ERROR;
       
 23870         }
       
 23871         
       
 23872     }/*function_lword_to_dword*/
       
 23873     break;
       
 23874 
       
 23875 /****
       
 23876  *TRUNC
       
 23877  */
       
 23878     case function_trunc :
       
 23879     {
       
 23880         symbol_c *last_type_symbol = NULL;
       
 23881 
       
 23882         {
       
 23883             symbol_c *IN_type_symbol = param_data_type;
       
 23884             last_type_symbol = param_data_type;
       
 23885             
       
 23886             if(search_expression_type->is_real_type(IN_type_symbol))
       
 23887             {
       
 23888         
       
 23889                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 23890                 return return_type_symbol;
       
 23891                 
       
 23892             }
       
 23893             
       
 23894             ERROR;
       
 23895         }
       
 23896         
       
 23897     }/*function_trunc*/
       
 23898     break;
       
 23899 
       
 23900 /****
       
 23901  *BCD_TO_USINT
       
 23902  */
       
 23903     case function_bcd_to_usint :
       
 23904     {
       
 23905         symbol_c *last_type_symbol = NULL;
       
 23906 
       
 23907         {
       
 23908             symbol_c *IN_type_symbol = param_data_type;
       
 23909             last_type_symbol = param_data_type;
       
 23910             
       
 23911             if (typeid(*last_type_symbol) == typeid(byte_type_name_c))
       
 23912             {
       
 23913         
       
 23914                 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name;
       
 23915                 return return_type_symbol;
       
 23916                 
       
 23917             }
       
 23918             
       
 23919             ERROR;
       
 23920         }
       
 23921         
       
 23922     }/*function_bcd_to_usint*/
       
 23923     break;
       
 23924 
       
 23925 /****
       
 23926  *BCD_TO_UINT
       
 23927  */
       
 23928     case function_bcd_to_uint :
       
 23929     {
       
 23930         symbol_c *last_type_symbol = NULL;
       
 23931 
       
 23932         {
       
 23933             symbol_c *IN_type_symbol = param_data_type;
       
 23934             last_type_symbol = param_data_type;
       
 23935             
       
 23936             if (typeid(*last_type_symbol) == typeid(word_type_name_c))
       
 23937             {
       
 23938         
       
 23939                 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name;
       
 23940                 return return_type_symbol;
       
 23941                 
       
 23942             }
       
 23943             
       
 23944             ERROR;
       
 23945         }
       
 23946         
       
 23947     }/*function_bcd_to_uint*/
       
 23948     break;
       
 23949 
       
 23950 /****
       
 23951  *BCD_TO_UDINT
       
 23952  */
       
 23953     case function_bcd_to_udint :
       
 23954     {
       
 23955         symbol_c *last_type_symbol = NULL;
       
 23956 
       
 23957         {
       
 23958             symbol_c *IN_type_symbol = param_data_type;
       
 23959             last_type_symbol = param_data_type;
       
 23960             
       
 23961             if (typeid(*last_type_symbol) == typeid(dword_type_name_c))
       
 23962             {
       
 23963         
       
 23964                 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name;
       
 23965                 return return_type_symbol;
       
 23966                 
       
 23967             }
       
 23968             
       
 23969             ERROR;
       
 23970         }
       
 23971         
       
 23972     }/*function_bcd_to_udint*/
       
 23973     break;
       
 23974 
       
 23975 /****
       
 23976  *BCD_TO_ULINT
       
 23977  */
       
 23978     case function_bcd_to_ulint :
       
 23979     {
       
 23980         symbol_c *last_type_symbol = NULL;
       
 23981 
       
 23982         {
       
 23983             symbol_c *IN_type_symbol = param_data_type;
       
 23984             last_type_symbol = param_data_type;
       
 23985             
       
 23986             if (typeid(*last_type_symbol) == typeid(lword_type_name_c))
       
 23987             {
       
 23988         
       
 23989                 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name;
       
 23990                 return return_type_symbol;
       
 23991                 
       
 23992             }
       
 23993             
       
 23994             ERROR;
       
 23995         }
       
 23996         
       
 23997     }/*function_bcd_to_ulint*/
       
 23998     break;
       
 23999 
       
 24000 /****
       
 24001  *USINT_TO_BCD
       
 24002  */
       
 24003     case function_usint_to_bcd :
       
 24004     {
       
 24005         symbol_c *last_type_symbol = NULL;
       
 24006 
       
 24007         {
       
 24008             symbol_c *IN_type_symbol = param_data_type;
       
 24009             last_type_symbol = param_data_type;
       
 24010             
       
 24011             if (typeid(*last_type_symbol) == typeid(usint_type_name_c))
       
 24012             {
       
 24013         
       
 24014                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 24015                 return return_type_symbol;
       
 24016                 
       
 24017             }
       
 24018             
       
 24019             ERROR;
       
 24020         }
       
 24021         
       
 24022     }/*function_usint_to_bcd*/
       
 24023     break;
       
 24024 
       
 24025 /****
       
 24026  *UINT_TO_BCD
       
 24027  */
       
 24028     case function_uint_to_bcd :
       
 24029     {
       
 24030         symbol_c *last_type_symbol = NULL;
       
 24031 
       
 24032         {
       
 24033             symbol_c *IN_type_symbol = param_data_type;
       
 24034             last_type_symbol = param_data_type;
       
 24035             
       
 24036             if (typeid(*last_type_symbol) == typeid(uint_type_name_c))
       
 24037             {
       
 24038         
       
 24039                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 24040                 return return_type_symbol;
       
 24041                 
       
 24042             }
       
 24043             
       
 24044             ERROR;
       
 24045         }
       
 24046         
       
 24047     }/*function_uint_to_bcd*/
       
 24048     break;
       
 24049 
       
 24050 /****
       
 24051  *UDINT_TO_BCD
       
 24052  */
       
 24053     case function_udint_to_bcd :
       
 24054     {
       
 24055         symbol_c *last_type_symbol = NULL;
       
 24056 
       
 24057         {
       
 24058             symbol_c *IN_type_symbol = param_data_type;
       
 24059             last_type_symbol = param_data_type;
       
 24060             
       
 24061             if (typeid(*last_type_symbol) == typeid(udint_type_name_c))
       
 24062             {
       
 24063         
       
 24064                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 24065                 return return_type_symbol;
       
 24066                 
       
 24067             }
       
 24068             
       
 24069             ERROR;
       
 24070         }
       
 24071         
       
 24072     }/*function_udint_to_bcd*/
       
 24073     break;
       
 24074 
       
 24075 /****
       
 24076  *ULINT_TO_BCD
       
 24077  */
       
 24078     case function_ulint_to_bcd :
       
 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 (typeid(*last_type_symbol) == typeid(ulint_type_name_c))
       
 24087             {
       
 24088         
       
 24089                 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name;
       
 24090                 return return_type_symbol;
       
 24091                 
       
 24092             }
       
 24093             
       
 24094             ERROR;
       
 24095         }
       
 24096         
       
 24097     }/*function_ulint_to_bcd*/
       
 24098     break;
       
 24099 
       
 24100 /****
       
 24101  *DATE_AND_TIME_TO_TIME_OF_DAY
       
 24102  */
       
 24103     case function_date_and_time_to_time_of_day :
       
 24104     {
       
 24105         symbol_c *last_type_symbol = NULL;
       
 24106 
       
 24107         {
       
 24108             symbol_c *IN_type_symbol = param_data_type;
       
 24109             last_type_symbol = param_data_type;
       
 24110             
       
 24111             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
       
 24112             {
       
 24113         
       
 24114                 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
       
 24115                 return return_type_symbol;
       
 24116                 
       
 24117             }
       
 24118             
       
 24119             ERROR;
       
 24120         }
       
 24121         
       
 24122     }/*function_date_and_time_to_time_of_day*/
 23894     }/*function_date_and_time_to_time_of_day*/
 24123     break;
 23895     break;
 24124 
 23896 
 24125 /****
 23897 /****
 24126  *DATE_AND_TIME_TO_DATE
 23898  *DATE_AND_TIME_TO_DATE
 24131 
 23903 
 24132         {
 23904         {
 24133             symbol_c *IN_type_symbol = param_data_type;
 23905             symbol_c *IN_type_symbol = param_data_type;
 24134             last_type_symbol = param_data_type;
 23906             last_type_symbol = param_data_type;
 24135             
 23907             
 24136             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 23908             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 24137             {
 23909             {
 24138         
 23910         
 24139                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 23911                 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name;
 24140                 return return_type_symbol;
 23912                 return return_type_symbol;
 24141                 
 23913                 
 24458                     ERROR;
 24230                     ERROR;
 24459                 }
 24231                 }
 24460                 
 24232                 
 24461             }
 24233             }
 24462             
 24234             
 24463             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 24235             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 24464             {
 24236             {
 24465         
 24237         
 24466                 {
 24238                 {
 24467                     identifier_c param_name("IN2");
 24239                     identifier_c param_name("IN2");
 24468                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24240                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24472                     if (IN2_param_value == NULL)
 24244                     if (IN2_param_value == NULL)
 24473                       IN2_param_value = function_call_param_iterator.next();
 24245                       IN2_param_value = function_call_param_iterator.next();
 24474                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24246                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24475                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24247                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24476                     
 24248                     
 24477                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24249                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24478                     {
 24250                     {
 24479                 
 24251                 
 24480                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 24252                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 24481                         return return_type_symbol;
 24253                         return return_type_symbol;
 24482                         
 24254                         
 24485                     ERROR;
 24257                     ERROR;
 24486                 }
 24258                 }
 24487                 
 24259                 
 24488             }
 24260             }
 24489             
 24261             
 24490             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 24262             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 24491             {
 24263             {
 24492         
 24264         
 24493                 {
 24265                 {
 24494                     identifier_c param_name("IN2");
 24266                     identifier_c param_name("IN2");
 24495                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24267                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24499                     if (IN2_param_value == NULL)
 24271                     if (IN2_param_value == NULL)
 24500                       IN2_param_value = function_call_param_iterator.next();
 24272                       IN2_param_value = function_call_param_iterator.next();
 24501                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24273                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24502                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24274                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24503                     
 24275                     
 24504                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24276                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24505                     {
 24277                     {
 24506                 
 24278                 
 24507                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 24279                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 24508                         return return_type_symbol;
 24280                         return return_type_symbol;
 24509                         
 24281                         
 24512                     ERROR;
 24284                     ERROR;
 24513                 }
 24285                 }
 24514                 
 24286                 
 24515             }
 24287             }
 24516             
 24288             
 24517             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24289             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24518             {
 24290             {
 24519         
 24291         
 24520                 {
 24292                 {
 24521                     identifier_c param_name("IN2");
 24293                     identifier_c param_name("IN2");
 24522                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24294                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24526                     if (IN2_param_value == NULL)
 24298                     if (IN2_param_value == NULL)
 24527                       IN2_param_value = function_call_param_iterator.next();
 24299                       IN2_param_value = function_call_param_iterator.next();
 24528                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24300                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24529                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24301                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24530                     
 24302                     
 24531                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24303                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24532                     {
 24304                     {
 24533                 
 24305                 
 24534                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24306                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24535                         return return_type_symbol;
 24307                         return return_type_symbol;
 24536                         
 24308                         
 24583                     ERROR;
 24355                     ERROR;
 24584                 }
 24356                 }
 24585                 
 24357                 
 24586             }
 24358             }
 24587             
 24359             
 24588             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24360             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24589             {
 24361             {
 24590         
 24362         
 24591                 {
 24363                 {
 24592                     identifier_c param_name("IN2");
 24364                     identifier_c param_name("IN2");
 24593                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24365                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24654                     ERROR;
 24426                     ERROR;
 24655                 }
 24427                 }
 24656                 
 24428                 
 24657             }
 24429             }
 24658             
 24430             
 24659             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 24431             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 24660             {
 24432             {
 24661         
 24433         
 24662                 {
 24434                 {
 24663                     identifier_c param_name("IN2");
 24435                     identifier_c param_name("IN2");
 24664                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24436                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24668                     if (IN2_param_value == NULL)
 24440                     if (IN2_param_value == NULL)
 24669                       IN2_param_value = function_call_param_iterator.next();
 24441                       IN2_param_value = function_call_param_iterator.next();
 24670                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24442                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24671                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24443                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24672                     
 24444                     
 24673                     if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 24445                     if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 24674                     {
 24446                     {
 24675                 
 24447                 
 24676                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24448                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24677                         return return_type_symbol;
 24449                         return return_type_symbol;
 24678                         
 24450                         
 24681                     ERROR;
 24453                     ERROR;
 24682                 }
 24454                 }
 24683                 
 24455                 
 24684             }
 24456             }
 24685             
 24457             
 24686             if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 24458             if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 24687             {
 24459             {
 24688         
 24460         
 24689                 {
 24461                 {
 24690                     identifier_c param_name("IN2");
 24462                     identifier_c param_name("IN2");
 24691                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24463                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24695                     if (IN2_param_value == NULL)
 24467                     if (IN2_param_value == NULL)
 24696                       IN2_param_value = function_call_param_iterator.next();
 24468                       IN2_param_value = function_call_param_iterator.next();
 24697                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24469                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24698                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24470                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24699                     
 24471                     
 24700                     if (typeid(*last_type_symbol) == typeid(dt_type_name_c))
 24472                     if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol))
 24701                     {
 24473                     {
 24702                 
 24474                 
 24703                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24475                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24704                         return return_type_symbol;
 24476                         return return_type_symbol;
 24705                         
 24477                         
 24706                     }
 24478                     }
 24707                     
 24479                     
 24708                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24480                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24709                     {
 24481                     {
 24710                 
 24482                 
 24711                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 24483                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 24712                         return return_type_symbol;
 24484                         return return_type_symbol;
 24713                         
 24485                         
 24716                     ERROR;
 24488                     ERROR;
 24717                 }
 24489                 }
 24718                 
 24490                 
 24719             }
 24491             }
 24720             
 24492             
 24721             if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 24493             if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 24722             {
 24494             {
 24723         
 24495         
 24724                 {
 24496                 {
 24725                     identifier_c param_name("IN2");
 24497                     identifier_c param_name("IN2");
 24726                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24498                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24730                     if (IN2_param_value == NULL)
 24502                     if (IN2_param_value == NULL)
 24731                       IN2_param_value = function_call_param_iterator.next();
 24503                       IN2_param_value = function_call_param_iterator.next();
 24732                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24504                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24733                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24505                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24734                     
 24506                     
 24735                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 24507                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 24736                     {
 24508                     {
 24737                 
 24509                 
 24738                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24510                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24739                         return return_type_symbol;
 24511                         return return_type_symbol;
 24740                         
 24512                         
 24741                     }
 24513                     }
 24742                     
 24514                     
 24743                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24515                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24744                     {
 24516                     {
 24745                 
 24517                 
 24746                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 24518                         symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name;
 24747                         return return_type_symbol;
 24519                         return return_type_symbol;
 24748                         
 24520                         
 24751                     ERROR;
 24523                     ERROR;
 24752                 }
 24524                 }
 24753                 
 24525                 
 24754             }
 24526             }
 24755             
 24527             
 24756             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24528             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24757             {
 24529             {
 24758         
 24530         
 24759                 {
 24531                 {
 24760                     identifier_c param_name("IN2");
 24532                     identifier_c param_name("IN2");
 24761                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24533                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24765                     if (IN2_param_value == NULL)
 24537                     if (IN2_param_value == NULL)
 24766                       IN2_param_value = function_call_param_iterator.next();
 24538                       IN2_param_value = function_call_param_iterator.next();
 24767                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24539                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 24768                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24540                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 24769                     
 24541                     
 24770                     if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24542                     if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24771                     {
 24543                     {
 24772                 
 24544                 
 24773                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24545                         symbol_c * return_type_symbol = &search_constant_type_c::time_type_name;
 24774                         return return_type_symbol;
 24546                         return return_type_symbol;
 24775                         
 24547                         
 24822                     ERROR;
 24594                     ERROR;
 24823                 }
 24595                 }
 24824                 
 24596                 
 24825             }
 24597             }
 24826             
 24598             
 24827             if (typeid(*last_type_symbol) == typeid(time_type_name_c))
 24599             if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol))
 24828             {
 24600             {
 24829         
 24601         
 24830                 {
 24602                 {
 24831                     identifier_c param_name("IN2");
 24603                     identifier_c param_name("IN2");
 24832                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 24604                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25312 
 25084 
 25313         {
 25085         {
 25314             symbol_c *G_type_symbol = param_data_type;
 25086             symbol_c *G_type_symbol = param_data_type;
 25315             last_type_symbol = param_data_type;
 25087             last_type_symbol = param_data_type;
 25316             
 25088             
 25317             if (typeid(*last_type_symbol) == typeid(bool_type_name_c))
 25089             if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol))
 25318             {
 25090             {
 25319         
 25091         
 25320                 {
 25092                 {
 25321                     identifier_c param_name("IN0");
 25093                     identifier_c param_name("IN0");
 25322                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25094                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25853 
 25625 
 25854         {
 25626         {
 25855             symbol_c *IN_type_symbol = param_data_type;
 25627             symbol_c *IN_type_symbol = param_data_type;
 25856             last_type_symbol = param_data_type;
 25628             last_type_symbol = param_data_type;
 25857             
 25629             
 25858             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 25630             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 25859             {
 25631             {
 25860         
 25632         
 25861                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 25633                 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 25862                 return return_type_symbol;
 25634                 return return_type_symbol;
 25863                 
 25635                 
 25878 
 25650 
 25879         {
 25651         {
 25880             symbol_c *IN_type_symbol = param_data_type;
 25652             symbol_c *IN_type_symbol = param_data_type;
 25881             last_type_symbol = param_data_type;
 25653             last_type_symbol = param_data_type;
 25882             
 25654             
 25883             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 25655             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 25884             {
 25656             {
 25885         
 25657         
 25886                 {
 25658                 {
 25887                     identifier_c param_name("L");
 25659                     identifier_c param_name("L");
 25888                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25660                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25922 
 25694 
 25923         {
 25695         {
 25924             symbol_c *IN_type_symbol = param_data_type;
 25696             symbol_c *IN_type_symbol = param_data_type;
 25925             last_type_symbol = param_data_type;
 25697             last_type_symbol = param_data_type;
 25926             
 25698             
 25927             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 25699             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 25928             {
 25700             {
 25929         
 25701         
 25930                 {
 25702                 {
 25931                     identifier_c param_name("L");
 25703                     identifier_c param_name("L");
 25932                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25704                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25966 
 25738 
 25967         {
 25739         {
 25968             symbol_c *IN_type_symbol = param_data_type;
 25740             symbol_c *IN_type_symbol = param_data_type;
 25969             last_type_symbol = param_data_type;
 25741             last_type_symbol = param_data_type;
 25970             
 25742             
 25971             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 25743             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 25972             {
 25744             {
 25973         
 25745         
 25974                 {
 25746                 {
 25975                     identifier_c param_name("L");
 25747                     identifier_c param_name("L");
 25976                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25748                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26029 
 25801 
 26030         {
 25802         {
 26031             symbol_c *IN1_type_symbol = param_data_type;
 25803             symbol_c *IN1_type_symbol = param_data_type;
 26032             last_type_symbol = param_data_type;
 25804             last_type_symbol = param_data_type;
 26033             
 25805             
 26034             if (typeid(*last_type_symbol) == typeid(date_type_name_c))
 25806             if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol))
 26035             {
 25807             {
 26036         
 25808         
 26037                 {
 25809                 {
 26038                     identifier_c param_name("IN2");
 25810                     identifier_c param_name("IN2");
 26039                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25811                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26043                     if (IN2_param_value == NULL)
 25815                     if (IN2_param_value == NULL)
 26044                       IN2_param_value = function_call_param_iterator.next();
 25816                       IN2_param_value = function_call_param_iterator.next();
 26045                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 25817                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26046                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 25818                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26047                     
 25819                     
 26048                     if (typeid(*last_type_symbol) == typeid(tod_type_name_c))
 25820                     if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol))
 26049                     {
 25821                     {
 26050                 
 25822                 
 26051                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 25823                         symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name;
 26052                         return return_type_symbol;
 25824                         return return_type_symbol;
 26053                         
 25825                         
 26056                     ERROR;
 25828                     ERROR;
 26057                 }
 25829                 }
 26058                 
 25830                 
 26059             }
 25831             }
 26060             
 25832             
 26061             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 25833             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 26062             {
 25834             {
 26063         
 25835         
 26064                 {
 25836                 {
 26065                     identifier_c param_name("IN2");
 25837                     identifier_c param_name("IN2");
 26066                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25838                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26070                     if (IN2_param_value == NULL)
 25842                     if (IN2_param_value == NULL)
 26071                       IN2_param_value = function_call_param_iterator.next();
 25843                       IN2_param_value = function_call_param_iterator.next();
 26072                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 25844                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26073                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 25845                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26074                     
 25846                     
 26075                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 25847                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 26076                     {
 25848                     {
 26077                 
 25849                 
 26078                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 25850                         symbol_c * return_type_symbol = &search_constant_type_c::string_type_name;
 26079                         return return_type_symbol;
 25851                         return return_type_symbol;
 26080                         
 25852                         
 26100 
 25872 
 26101         {
 25873         {
 26102             symbol_c *IN1_type_symbol = param_data_type;
 25874             symbol_c *IN1_type_symbol = param_data_type;
 26103             last_type_symbol = param_data_type;
 25875             last_type_symbol = param_data_type;
 26104             
 25876             
 26105             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 25877             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 26106             {
 25878             {
 26107         
 25879         
 26108                 {
 25880                 {
 26109                     identifier_c param_name("IN2");
 25881                     identifier_c param_name("IN2");
 26110                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25882                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26114                     if (IN2_param_value == NULL)
 25886                     if (IN2_param_value == NULL)
 26115                       IN2_param_value = function_call_param_iterator.next();
 25887                       IN2_param_value = function_call_param_iterator.next();
 26116                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 25888                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26117                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 25889                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26118                     
 25890                     
 26119                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 25891                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 26120                     {
 25892                     {
 26121                 
 25893                 
 26122                         {
 25894                         {
 26123                             identifier_c param_name("P");
 25895                             identifier_c param_name("P");
 26124                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 25896                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 26163 
 25935 
 26164         {
 25936         {
 26165             symbol_c *IN_type_symbol = param_data_type;
 25937             symbol_c *IN_type_symbol = param_data_type;
 26166             last_type_symbol = param_data_type;
 25938             last_type_symbol = param_data_type;
 26167             
 25939             
 26168             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 25940             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 26169             {
 25941             {
 26170         
 25942         
 26171                 {
 25943                 {
 26172                     identifier_c param_name("L");
 25944                     identifier_c param_name("L");
 26173                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 25945                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26226 
 25998 
 26227         {
 25999         {
 26228             symbol_c *IN1_type_symbol = param_data_type;
 26000             symbol_c *IN1_type_symbol = param_data_type;
 26229             last_type_symbol = param_data_type;
 26001             last_type_symbol = param_data_type;
 26230             
 26002             
 26231             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 26003             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 26232             {
 26004             {
 26233         
 26005         
 26234                 {
 26006                 {
 26235                     identifier_c param_name("IN2");
 26007                     identifier_c param_name("IN2");
 26236                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26008                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26240                     if (IN2_param_value == NULL)
 26012                     if (IN2_param_value == NULL)
 26241                       IN2_param_value = function_call_param_iterator.next();
 26013                       IN2_param_value = function_call_param_iterator.next();
 26242                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26014                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26243                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26015                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26244                     
 26016                     
 26245                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 26017                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 26246                     {
 26018                     {
 26247                 
 26019                 
 26248                         {
 26020                         {
 26249                             identifier_c param_name("L");
 26021                             identifier_c param_name("L");
 26250                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 26022                             /* Get the value from a foo(<param_name> = <param_value>) style call */
 26308 
 26080 
 26309         {
 26081         {
 26310             symbol_c *IN1_type_symbol = param_data_type;
 26082             symbol_c *IN1_type_symbol = param_data_type;
 26311             last_type_symbol = param_data_type;
 26083             last_type_symbol = param_data_type;
 26312             
 26084             
 26313             if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 26085             if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 26314             {
 26086             {
 26315         
 26087         
 26316                 {
 26088                 {
 26317                     identifier_c param_name("IN2");
 26089                     identifier_c param_name("IN2");
 26318                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26090                     /* Get the value from a foo(<param_name> = <param_value>) style call */
 26322                     if (IN2_param_value == NULL)
 26094                     if (IN2_param_value == NULL)
 26323                       IN2_param_value = function_call_param_iterator.next();
 26095                       IN2_param_value = function_call_param_iterator.next();
 26324                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26096                     symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value);
 26325                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26097                     last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ;
 26326                     
 26098                     
 26327                     if (typeid(*last_type_symbol) == typeid(string_type_name_c))
 26099                     if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol))
 26328                     {
 26100                     {
 26329                 
 26101                 
 26330                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 26102                         symbol_c * return_type_symbol = &search_constant_type_c::int_type_name;
 26331                         return return_type_symbol;
 26103                         return return_type_symbol;
 26332                         
 26104